[Iup-users] Problems building sample.c with minGW
Antonio Scuri
scuri at tecgraf.puc-rio.br
Tue Dec 4 10:24:34 GMT+3 2007
Hi Steven,
In gcc/g++ it is very important the order the libraries are passed to the
linker.
To test the MingW distribution I use the DevC++ IDE. And I specify
libraries in almost the same order as Jeremy:
-liupgl -liupcontrols -lcdiup -liup -lcd -lim -lim_process -lim_avi
-lim_fftw -lim_jp2 -lim_capture -lcomctl32 -lvfw32 -lole32 -lopengl32
-lglu32
I have to use g++ to link because of the IM libraries, as they are
implemented in C++.
Also in the MingW command line used by DevC++ I noticed the parameter
"-mwindows".
Best Regards,
Antonio Scuri
> -----Original Message-----
> From: iup-users-bounces at lists.luaforge.net
> [mailto:iup-users-bounces at lists.luaforge.net] On Behalf Of
> Jeremy Cowgar
> Sent: terça-feira, 4 de dezembro de 2007 11:08
> To: IUP discussion list.
> Subject: Re: [Iup-users] Problems building sample.c with minGW
>
> Steven,
>
> This may be overkill, but the lib line of my link looks like this:
>
> -Wl,--start-group \
> -luser32 -lwinspool -lcomctl32 -lcomdlg32 -lgdi32 -lole32
> -loleaut32 \ -luuid -lwinmm -lvfw32 -lwldap32 -lws2_32 \ -lcd
> -lcdiup -liup -liupcontrols -liupim -lim \ -Wl,--end-group
>
> I also link with g++.
>
> Jeremy Cowgar
>
> Steven Mak wrote:
> > Hi,
> >
> > I have changed the command line into this:
> > gcc.exe sample.c -I"C:\MinGW\include"
> > -I"C:\MinGW\local\lib\iup\include"
> > -I"C:\MinGW\lib\gcc\mingw32\3.4.5\include"
> > -L"C:\MinGW\local\lib\iup\lib\minGW3" -L"C:\MinGW\lib" -liup
> > -liupcontrols -lcd -lcdiup -lcomctl32 -lole32
> >
> > And now, the results are like this:
> >
> > /usr/local/lib/libiup.a(win.o):win.c:(.text+0x169c):
> undefined reference to `_CoInitializeEx at 8'
> > /usr/local/lib/libiup.a(win.o):win.c:(.text+0x16b8):
> undefined reference to `_InitCommonControlsEx at 4'
> > /usr/local/lib/libiup.a(win.o):win.c:(.text+0x17ca):
> undefined reference to `_GetDeviceCaps at 8'
> > /usr/local/lib/libiup.a(win.o):win.c:(.text+0x199a):
> undefined reference to `_CoUninitialize at 0'
> > /usr/local/lib/libiup.a(winproc.o):winproc.c:(.text+0x139):
> undefined reference to `_DeleteObject at 4'
> > /usr/local/lib/libiup.a(winproc.o):winproc.c:(.text+0xbde):
> undefined
> > reference to `_SetBkColor at 8'
> > /usr/local/lib/libiup.a(winproc.o):winproc.c:(.text+0xbf1):
> undefined reference to `_UnrealizeObject at 4'
> > /usr/local/lib/libiup.a(winproc.o):winproc.c:(.text+0xc31):
> undefined reference to `_SetBrushOrgEx at 16'
> >
> > (and a lot more similar to follow)
> >
> > Can anyone helped? thank you.
> >
> > Steven
> >
> >
> >
> ----------------------------------------------------------------------
> > -- Be a better friend, newshound, and know-it-all with
> Yahoo! Mobile.
> > Try it now.
> >
> <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06
> > i62sR8HDtDypao8Wcj9tAcJ%20>
> >
> >
> ----------------------------------------------------------------------
> > --
> >
> > _______________________________________________
> > iup-users mailing list
> > iup-users at lists.luaforge.net
> > http://lists.luaforge.net/cgi-bin/mailman/listinfo/iup-users
> >
>
>
> _______________________________________________
> iup-users mailing list
> iup-users at lists.luaforge.net
> http://lists.luaforge.net/cgi-bin/mailman/listinfo/iup-users
>
More information about the iup-users
mailing list