On 10/26/2011 08:01, Alen Skondro wrote:
> Hello guys,
> 
> I'm trying to compile the glew library against the mingw64 library.
> 
> While linking I get this errors - What library am I missing?
> 
> i686-w64-mingw32-gcc -c -O2 -Wall -W -Iinclude  -o src/glewinfo.o
> src/glewinfo.c
> i686-w64-mingw32-gcc -O2 -Wall -W -Iinclude  -o bin/glewinfo.exe
> src/glewinfo.o -Llib  -lglew32 -L/mingw/lib -lglu32 -lopengl32 -lgdi32
> -luser32 -lkernel32 -lmingwex
> j:/cross-gcc/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/lib/../lib/crt2.o:
> In function `pre_cpp_init':
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:138:
> undefined reference to `__newmode'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:143:
> undefined reference to `__dowildcard'
> j:/cross-gcc/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/lib/../lib/crt2.o:
> In function `check_managed_app':
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:335:
> undefined reference to `_mingw_initcharmax'
> j:/cross-gcc/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/lib/../lib/crt2.o:
> In function `pre_c_init':
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:110:
> undefined reference to `_mingw_app_type'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:114:
> undefined reference to `__encode_pointer'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:114:
> undefined reference to `___onexitend'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:114:
> undefined reference to `___onexitbegin'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:122:
> undefined reference to `__setargv'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:124:
> undefined reference to `__MINGW_INSTALL_DEBUG_MATHERR'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:126:
> undefined reference to `__matherr'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:126:
> undefined reference to `___mingw_setusermatherr'
> j:/cross-gcc/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/lib/../lib/crt2.o:
> In function `__tmainCRTStartup':
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:221:
> undefined reference to `_mingw_app_type'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:227:
> undefined reference to `___native_startup_lock'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:237:
> undefined reference to `___native_startup_state'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:241:
> undefined reference to `___native_startup_state'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:249:
> undefined reference to `___native_startup_state'
> j:/cross-gcc/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/lib/../lib/crt2.o:
> In function `InterlockedExchange':
> j:/cross-gcc/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/include/winnt.h:1982:
> undefined reference to `___native_startup_lock'
> j:/cross-gcc/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/lib/../lib/crt2.o:
> In function `__tmainCRTStartup':
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:262:
> undefined reference to `__gnu_exception_handler@4'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:262:
> undefined reference to `___mingw_oldexcpt_handler'
> j:/cross-gcc/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/lib/../lib/crt2.o:
> In function `__mingw_prepare_except_for_msvcr80_and_higher':
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:430:
> undefined reference to `___mingw_get_msvcrt_handle'
> j:/cross-gcc/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/lib/../lib/crt2.o:
> In function `__tmainCRTStartup':
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:270:
> undefined reference to `_mingw_app_type'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:237:
> undefined reference to `___native_startup_state'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:249:
> undefined reference to `___native_startup_state'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:251:
> undefined reference to `___xc_z'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:251:
> undefined reference to `___xc_a'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:252:
> undefined reference to `___native_startup_state'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:243:
> undefined reference to `___native_startup_state'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:244:
> undefined reference to `___xi_z'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:244:
> undefined reference to `___xi_a'
> j:/cross-gcc/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/lib/../lib/crt2.o:
> In function `WinMainCRTStartup':
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:163:
> undefined reference to `_mingw_app_type'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:164:
> undefined reference to `___security_init_cookie'
> j:/cross-gcc/bin/../lib/gcc/i686-w64-mingw32/4.7.0/../../../../i686-w64-mingw32/lib/../lib/crt2.o:
> In function `mainCRTStartup':
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:191:
> undefined reference to `_mingw_app_type'
> h:\FSF\POWERTOOLS\obj-w64-crt\mingw-w64-crt/../../mingw-w64/mingw-w64-crt/crt/crtexe.c:192:
> undefined reference to `___security_init_cookie'
> collect2.exe: error: ld returned 1 exit status
> make: *** [bin/glewinfo.exe] Error 1
> 

Try removing -lgdi32 -luser32 -lkernel32 -lmingwex. This error is very
strange, did you accidentally mix mingw.org code with mingw-w64 with
-L/mingw/lib?


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to