building programs

Rob D rddone at att.net
Sat Mar 5 15:17:00 CST 2005


I have attached 2 Makefiles that give me the unresolved main error on 
Solaris10.

AEP Makefile is supposed to make an executable from a few files and some 
libraries.
Netclient is supposed to make a static lib, and it works good, but it 
complains about missing main also.

Im not sure why I am having so many problems with this, but I tried 
compiling the same source and Makefiles on a Debian Linux machine, but got 
an error about ONLY_IN_WINELIB macro called without parameters or something.

Then... I installed the 20050211 binary package on ANOTHER Debian machine, 
but it couldnt find the windows includes, so I manually added a path, then 
it complained about could not find -lwine lib. I assumed this was referring 
to libwine.so.1 found in /usr/lib, so I tried adding /usr/lib to the 
LIBRARIES_PATH in the makefile, but then it complained about /usr/lib file 
not found.

Aaaaahh.



At 06:24 PM 3/4/2005, Vincent Béron wrote:
>Le ven 04/03/2005 à 19:41, Rob D a écrit :
> > Is it the spec file that determines whether wine looks for main or WinMain?
>
>No. If WinMain exists, it'll be used, even in the presence of main().
>
> >
> > The only info about spec files I could find was on page 20 of the winelib
> > guide (section 3.4.2), it says that it is very outdated and doesnt
> > currently describe winebuild and spec files.
> > Besides that, it doesnt have enough information about what to call the
> > file, or how to link it into my project.
>
>I don't think spec files for .exe are supported right now (sorry Ivan).
>
> >
> > Im thinking that this is why Im getting an unresolved reference to main
> > when I compile using winelib.
>
>I guess you can't share the whole app. Could you then provide us with a
>simple Makefile/.c file exhibiting the same problem?
>
>I don't see any difference between using main() and WinMain() for a
>"Hello, world!"-type app, on Linux.
>
>The .o in which main() is compiled is on the final linking list, right?
>
>Try modifying your Makefile so you pass -save-temps to winegcc while
>building the final .so, that way it won't erase temp files (mainly
>.spec.c, and .spec.i, .spec.s, .spec.o). Also play with -v (verbosity
>level, can be additive).
>
>Vincent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 2580 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20050305/e0b5789a/Makefile.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: application/octet-stream
Size: 3131 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20050305/e0b5789a/Makefile-0001.obj


More information about the wine-devel mailing list