Hi.
I need to cross-compile my OpenGL/GLU/GLUT program to Windows platform, but there’s trouble with winegcc.
>winegcc *.c -lGL -lglut
artifact.c: In function ‘draw_artifacts’:
artifact.c:38:5: warning: incompatible implicit declaration of built-in function ‘printf’
artifact.c: In function ‘set_artifacts’:
artifact.c:61:3: warning: incompatible implicit declaration of built-in function ‘printf’
bmp.c: In function ‘load_bitmap’:
bmp.c:18:3: warning: incompatible implicit declaration of built-in function ‘printf’
bmp.c:26:5: warning: incompatible implicit declaration of built-in function ‘exit’
bmp.c:32:5: warning: incompatible implicit declaration of built-in function ‘exit’
bmp.c:38:5: warning: incompatible implicit declaration of built-in function ‘exit’
bmp.c:42:34: warning: incompatible implicit declaration of built-in function ‘malloc’
bmp.c:47:5: warning: incompatible implicit declaration of built-in function ‘exit’
bmp.c:54:5: warning: incompatible implicit declaration of built-in function ‘exit’
creature.c: In function ‘animate_creature’:
creature.c:30:5: warning: incompatible implicit declaration of built-in function ‘printf’
creature.c: In function ‘creature_add_new’:
creature.c:84:5: warning: incompatible implicit declaration of built-in function ‘printf’
creature.c: In function ‘move_creature_forward’:
creature.c:120:5: warning: incompatible implicit declaration of built-in function ‘printf’
creature.c: In function ‘turn_to_player’:
creature.c:141:5: warning: incompatible implicit declaration of built-in function ‘printf’
creature.c: In function ‘see_player’:
creature.c:204:5: warning: incompatible implicit declaration of built-in function ‘printf’
creature.c: In function ‘process_creature’:
creature.c:291:5: warning: incompatible implicit declaration of built-in function ‘printf’
hero.c: In function ‘check_hero_collision_with_terrain’:
hero.c:40:3: warning: incompatible implicit declaration of built-in function ‘printf’
hero.c: In function ‘run_hero’:
hero.c:108:5: warning: incompatible implicit declaration of built-in function ‘printf’
hero.c: In function ‘hero_test_collision_with_artifact’:
hero.c:132:42: warning: initialization makes pointer from integer without a cast
hero.c:144:9: warning: incompatible implicit declaration of built-in function ‘printf’
hero.c: In function ‘hero_test_collision_with_creature’:
hero.c:190:42: warning: initialization makes pointer from integer without a cast
hero.c:202:9: warning: incompatible implicit declaration of built-in function ‘printf’
hero.c: In function ‘hero_run_from_creatures’:
hero.c:707:35: warning: initialization makes pointer from integer without a cast
hero.c: In function ‘hero_test_collision_with_creatures’:
hero.c:725:35: warning: initialization makes pointer from integer without a cast
hero.c: In function ‘move_hero_forward__’:
hero.c:766:3: warning: incompatible implicit declaration of built-in function ‘printf’
hero.c: In function ‘move_hero_backward__’:
hero.c:816:3: warning: incompatible implicit declaration of built-in function ‘printf’
hero.c: In function ‘rotate_hero_right’:
hero.c:883:3: warning: incompatible implicit declaration of built-in function ‘printf’
hero.c: In function ‘process_hero’:
hero.c:943:5: warning: incompatible implicit declaration of built-in function ‘printf’
hero.c:1020:5: warning: incompatible implicit declaration of built-in function ‘printf’
main.c: In function ‘load_next_map’:
main.c:26:5: warning: incompatible implicit declaration of built-in function ‘snprintf’
main.c:27:5: warning: incompatible implicit declaration of built-in function ‘printf’
main.c: In function ‘display’:
main.c:37:23: warning: initialization makes pointer from integer without a cast
main.c:56:19: warning: incompatible implicit declaration of built-in function ‘cos’
main.c:56:66: warning: incompatible implicit declaration of built-in function ‘sin’
main.c: In function ‘app_init’:
main.c:82:10: warning: assignment makes pointer from integer without a cast
main.c:93:3: warning: incompatible implicit declaration of built-in function ‘printf’
main.c: In function ‘main’:
main.c:123:3: warning: passing argument 1 of ‘glutKeyboardFunc’ from incompatible pointer type
/usr/include/GL/freeglut_std.h:467:26: note: expected ‘void (*)(unsigned char, int, int)’ but argument is of type ‘void (*)(char, int, int)’
map.c: In function ‘map_load’:
map.c:36:7: warning: incompatible implicit declaration of built-in function ‘exit’
map.c:41:5: warning: incompatible implicit declaration of built-in function ‘printf’
map.c:42:5: warning: incompatible implicit declaration of built-in function ‘exit’
map.c:46:5: warning: incompatible implicit declaration of built-in function ‘printf’
map.c:47:5: warning: incompatible implicit declaration of built-in function ‘exit’
map.c:50:9: warning: incompatible implicit declaration of built-in function ‘malloc’
map.c:56:7: warning: incompatible implicit declaration of built-in function ‘printf’
map.c:57:7: warning: incompatible implicit declaration of built-in function ‘exit’
map.c:62:7: warning: incompatible implicit declaration of built-in function ‘exit’
map.c:70:5: warning: incompatible implicit declaration of built-in function ‘printf’
map.c:71:5: warning: incompatible implicit declaration of built-in function ‘exit’
map.c:76:5: warning: incompatible implicit declaration of built-in function ‘printf’
map.c:77:5: warning: incompatible implicit declaration of built-in function ‘exit’
map.c:80:3: warning: incompatible implicit declaration of built-in function ‘printf’
map.c:83:23: warning: initialization makes pointer from integer without a cast
map.c:94:5: warning: incompatible implicit declaration of built-in function ‘exit’
map.c:105:7: warning: incompatible implicit declaration of built-in function ‘exit’
map.c:110:7: warning: incompatible implicit declaration of built-in function ‘exit’
map.c:123:5: warning: incompatible implicit declaration of built-in function ‘exit’
map.c:134:9: warning: incompatible implicit declaration of built-in function ‘exit’
map.c:140:9: warning: incompatible implicit declaration of built-in function ‘exit’
map.c: In function ‘map_detect_collision’:
map.c:346:3: warning: incompatible implicit declaration of built-in function ‘printf’
map.c:347:16: warning: incompatible implicit declaration of built-in function ‘floor’
map.c: In function ‘map_get_terrain_height’:
map.c:381:3: warning: incompatible implicit declaration of built-in function ‘printf’
map.c:382:12: warning: incompatible implicit declaration of built-in function ‘floor’
map.c: In function ‘map_check_outside_map’:
map.c:408:17: warning: incompatible implicit declaration of built-in function ‘floor’
md2.c: In function ‘model_new_virtual’:
md2.c:12:47: warning: incompatible implicit declaration of built-in function ‘malloc’
md2.c: In function ‘load_model’:
md2.c:49:5: warning: incompatible implicit declaration of built-in function ‘printf’
md2.c:50:5: warning: incompatible implicit declaration of built-in function ‘exit’
md2.c:56:21: warning: incompatible implicit declaration of built-in function ‘malloc’
md2.c:59:5: warning: incompatible implicit declaration of built-in function ‘printf’
md2.c:60:5: warning: incompatible implicit declaration of built-in function ‘exit’
md2.c:84:7: warning: incompatible implicit declaration of built-in function ‘printf’
md2.c:127:3: warning: incompatible implicit declaration of built-in function ‘free’
normal.c: In function ‘CalculateNormal’:
normal.c:38:20: warning: incompatible implicit declaration of built-in function ‘sqrt’
artifact-MW52Xp.o: In function `glutInit_ATEXIT_HACK':
artifact.c:(.text+0x26): undefined reference to `__glutInitWithExit'
artifact-MW52Xp.o: In function `glutCreateWindow_ATEXIT_HACK':
artifact.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
artifact-MW52Xp.o: In function `glutCreateMenu_ATEXIT_HACK':
artifact.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
creature-SJKjpn.o: In function `glutInit_ATEXIT_HACK':
creature.c:(.text+0x26): undefined reference to `__glutInitWithExit'
creature-SJKjpn.o: In function `glutCreateWindow_ATEXIT_HACK':
creature.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
creature-SJKjpn.o: In function `glutCreateMenu_ATEXIT_HACK':
creature.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
hero-Elkri8.o: In function `glutInit_ATEXIT_HACK':
hero.c:(.text+0x26): undefined reference to `__glutInitWithExit'
hero-Elkri8.o: In function `glutCreateWindow_ATEXIT_HACK':
hero.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
hero-Elkri8.o: In function `glutCreateMenu_ATEXIT_HACK':
hero.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
keyboard-H3cZNa.o: In function `glutInit_ATEXIT_HACK':
keyboard.c:(.text+0x26): undefined reference to `__glutInitWithExit'
keyboard-H3cZNa.o: In function `glutCreateWindow_ATEXIT_HACK':
keyboard.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
keyboard-H3cZNa.o: In function `glutCreateMenu_ATEXIT_HACK':
keyboard.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
main-4dVokt.o: In function `glutInit_ATEXIT_HACK':
main.c:(.text+0x26): undefined reference to `__glutInitWithExit'
main-4dVokt.o: In function `glutCreateWindow_ATEXIT_HACK':
main.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
main-4dVokt.o: In function `glutCreateMenu_ATEXIT_HACK':
main.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
main-4dVokt.o: In function `display':
main.c:(.text+0x2ea): undefined reference to `gluLookAt'
main-4dVokt.o: In function `main':
main.c:(.text+0x5c1): undefined reference to `gluPerspective'
md2-2-qGXGQL.o: In function `glutInit_ATEXIT_HACK':
md2-2.c:(.text+0x26): undefined reference to `__glutInitWithExit'
md2-2-qGXGQL.o: In function `glutCreateWindow_ATEXIT_HACK':
md2-2.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
md2-2-qGXGQL.o: In function `glutCreateMenu_ATEXIT_HACK':
md2-2.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
collect2: ld returned 1 exit status
winegcc: gcc failed
Why wine can’t find glut library? There’s no default installed glut on Windows or what?
Am 25.07.2012 18:16, schrieb Lachu:
>
> I will use winegcc. Where put glut lib, def and header file?
>
>
I would think you need to download and install the windows versions in wine.
Just a thought:
I never used winegcc for cross compiling, but I used mingw32-gcc (and
mingw64-gcc) both available for openSUSE and there are also all
important development packages like mingw32-freeglut,
mingw32-freeglut-devel available for that.
So maybe also for you that could be an alternative.
–
PC: oS 12.1 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.1 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10
I have installed mingw and mingw-gcc, but there’s only Windows(exe) binaries. I try to run mingw-gcc binary with WINE. There’s output:
wine /usr/i686-w64-mingw32/sys-root/mingw/bin/gcc.exe -lGL -lGLU -lglut *.c
err:module:import_dll Library libgmp-10.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpc-2.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpfr-4.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library zlib1.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe" failed, status c0000135
err:module:import_dll Library libgmp-10.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpc-2.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpfr-4.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library zlib1.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe" failed, status c0000135
err:module:import_dll Library libgmp-10.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpc-2.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpfr-4.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library zlib1.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe" failed, status c0000135
err:module:import_dll Library libgmp-10.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpc-2.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpfr-4.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library zlib1.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe" failed, status c0000135
err:module:import_dll Library libgmp-10.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpc-2.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpfr-4.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library zlib1.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe" failed, status c0000135
err:module:import_dll Library libgmp-10.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpc-2.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpfr-4.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library zlib1.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe" failed, status c0000135
err:module:import_dll Library libgmp-10.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpc-2.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpfr-4.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library zlib1.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe" failed, status c0000135
err:module:import_dll Library libgmp-10.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpc-2.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpfr-4.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library zlib1.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe" failed, status c0000135
err:module:import_dll Library libgmp-10.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpc-2.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpfr-4.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library zlib1.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe" failed, status c0000135
err:module:import_dll Library libgmp-10.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpc-2.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpfr-4.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library zlib1.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe" failed, status c0000135
err:module:import_dll Library libgmp-10.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpc-2.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library libmpfr-4.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:import_dll Library zlib1.dll (which is needed by L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\usr\\i686-w64-mingw32\\sys-root\\mingw\\libexec\\gcc\\i686-w64-mingw32\\4.7.0\\cc1.exe" failed, status c0000135
artifact.c: In function 'draw_artifacts':
artifact.c:37:5: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
artifact.c: In function 'set_artifacts':
artifact.c:60:3: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
bmp.c: In function 'load_bitmap':
bmp.c:18:3: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
bmp.c:42:34: warning: incompatible implicit declaration of built-in function 'malloc' [enabled by default]
creature.c: In function 'animate_creature':
creature.c:30:5: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
creature.c: In function 'creature_add_new':
creature.c:84:5: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
creature.c: In function 'move_creature_forward':
creature.c:120:5: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
creature.c: In function 'turn_to_player':
creature.c:141:5: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
creature.c: In function 'see_player':
creature.c:204:5: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
creature.c: In function 'process_creature':
creature.c:291:5: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
hero.c: In function 'check_hero_collision_with_terrain':
hero.c:38:3: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
hero.c: In function 'run_hero':
hero.c:106:5: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
hero.c: In function 'hero_test_collision_with_artifact':
hero.c:130:42: warning: initialization makes pointer from integer without a cast [enabled by default]
hero.c:142:9: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
hero.c: In function 'hero_test_collision_with_creature':
hero.c:188:42: warning: initialization makes pointer from integer without a cast [enabled by default]
hero.c:200:9: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
hero.c: In function 'hero_run_from_creatures':
hero.c:705:35: warning: initialization makes pointer from integer without a cast [enabled by default]
hero.c: In function 'hero_test_collision_with_creatures':
hero.c:723:35: warning: initialization makes pointer from integer without a cast [enabled by default]
hero.c: In function 'move_hero_forward__':
hero.c:764:3: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
hero.c: In function 'move_hero_backward__':
hero.c:814:3: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
hero.c: In function 'rotate_hero_right':
hero.c:881:3: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
hero.c: In function 'process_hero':
hero.c:941:5: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
hero.c:1018:5: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
keyboard.c:2:25: fatal error: GL\freeglut.h: No such file or directory
compilation terminated.
main.c:2:24: fatal error: GL\freglut.h: No such file or directory
compilation terminated.
map.c:2:25: fatal error: GL\freeglut.h: No such file or directory
compilation terminated.
md2-2.c:32:25: fatal error: GL\freeglut.h: No such file or directory
compilation terminated.
md2.c: In function 'load_model':
md2.c:49:5: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
md2.c:59:5: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
md2.c:84:7: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
normal.c: In function 'CalculateNormal':
normal.c:38:20: warning: incompatible implicit declaration of built-in function 'sqrt' [enabled by default]
Please Lachu, do not make it more difficult then it is. You copy/paste in one sweep the prompt and the command and the output in one CODE tag field. No need to explain then that you did command X and that it gave Y as output. Everybody can see that then at a glance.
why do you use “-lglut32”? Where is no glut32 dll there.
You cannot just copy arbitrary link switches from somewhere used by
somebody with a completely different set of libraries to link against
and expect it to work.
Have a look at what it is exactly what you have installed and check the
correct link and compile switches for that.
Btw compiling with a “*.c” does not take into account any dependicies
between the files and asks for a lot of trouble.
Do you have no makefile?
–
PC: oS 12.1 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.1 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10
why do you use “-lglut32”? Where is no glut32 dll there.
You cannot just copy arbitrary link switches from somewhere used by
somebody with a completely different set of libraries to link against
and expect it to work.
Have a look at what it is exactly what you have installed and check the
correct link and compile switches for that.
Btw compiling with a “*.c” does not take into account any dependicies
between the files and asks for a lot of trouble.
Do you have no makefile?
To give you a helping hand
-llibglut -lopengl32 -lglu32
of course also a glut32 library exists for you, it is part of the
mingw32-runtime package.
But using freeglut for the headers use also the compile switch to link
against the correct library, everything else asks for trouble.
I compile a small test program to check if that is correct, you find it
here SUSE Paste
>i686-w64-mingw32-gcc -lopengl32 -lglu32 -llibglut main.c
main.c: In function 'load_next_map':
main.c:31:5: warning: incompatible implicit declaration of built-in function 'snprintf' [enabled by default]
main.c:32:5: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
main.c: In function 'display':
main.c:42:23: warning: initialization makes pointer from integer without a cast [enabled by default]
main.c:61:19: warning: incompatible implicit declaration of built-in function 'cos' [enabled by default]
main.c:61:66: warning: incompatible implicit declaration of built-in function 'sin' [enabled by default]
main.c: In function 'app_init':
main.c:87:10: warning: assignment makes pointer from integer without a cast [enabled by default]
main.c:98:3: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
main.c: In function 'main':
main.c:128:3: warning: passing argument 1 of 'glutKeyboardFunc' from incompatible pointer type [enabled by default]
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/GL/glut.h:17:0,
from main.c:2:
/usr/i686-w64-mingw32/sys-root/mingw/include/GL/freeglut_std.h:467:26: note: expected 'void (*)(unsigned char, int, int)' but argument is of type 'void (*)(char, int, int)'
/tmp/cc9QIKGe.o:main.c:(.text+0x1c): undefined reference to `_imp____glutInitWithExit@12'
/tmp/cc9QIKGe.o:main.c:(.text+0x3e): undefined reference to `_imp____glutCreateWindowWithExit@8'
/tmp/cc9QIKGe.o:main.c:(.text+0x60): undefined reference to `_imp____glutCreateMenuWithExit@8'
/tmp/cc9QIKGe.o:main.c:(.text+0x7f): undefined reference to `delete_current_map'
/tmp/cc9QIKGe.o:main.c:(.text+0xc1): undefined reference to `map_load'
/tmp/cc9QIKGe.o:main.c:(.text+0xf1): undefined reference to `get_hero'
/tmp/cc9QIKGe.o:main.c:(.text+0x100): undefined reference to `_imp__glutGet@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x152): undefined reference to `_imp__glClearColor@16'
/tmp/cc9QIKGe.o:main.c:(.text+0x163): undefined reference to `_imp__glClear@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x16d): undefined reference to `_imp__glLoadIdentity@0'
/tmp/cc9QIKGe.o:main.c:(.text+0x18e): undefined reference to `_imp__glColor3f@12'
/tmp/cc9QIKGe.o:main.c:(.text+0x1b2): undefined reference to `_imp__glScalef@12'
/tmp/cc9QIKGe.o:main.c:(.text+0x1d6): undefined reference to `_imp__glTranslatef@12'
/tmp/cc9QIKGe.o:main.c:(.text+0x28c): undefined reference to `gluLookAt@72'
/tmp/cc9QIKGe.o:main.c:(.text+0x29c): undefined reference to `process_keyboard'
/tmp/cc9QIKGe.o:main.c:(.text+0x2a9): undefined reference to `process_hero'
/tmp/cc9QIKGe.o:main.c:(.text+0x2ae): undefined reference to `process_artifacts'
/tmp/cc9QIKGe.o:main.c:(.text+0x2b3): undefined reference to `earse_keyboard_state'
/tmp/cc9QIKGe.o:main.c:(.text+0x2b8): undefined reference to `draw_map'
/tmp/cc9QIKGe.o:main.c:(.text+0x2bd): undefined reference to `draw_creatures'
/tmp/cc9QIKGe.o:main.c:(.text+0x2c2): undefined reference to `draw_artifacts'
/tmp/cc9QIKGe.o:main.c:(.text+0x2cf): undefined reference to `process_creatures'
/tmp/cc9QIKGe.o:main.c:(.text+0x2d4): undefined reference to `_imp__glFlush@0'
/tmp/cc9QIKGe.o:main.c:(.text+0x2db): undefined reference to `_imp__glutSwapBuffers@0'
/tmp/cc9QIKGe.o:main.c:(.text+0x2e2): undefined reference to `check_player_win'
/tmp/cc9QIKGe.o:main.c:(.text+0x30e): undefined reference to `load_bitmap'
/tmp/cc9QIKGe.o:main.c:(.text+0x31f): undefined reference to `_imp__glEnable@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x337): undefined reference to `_imp__glGenTextures@8'
/tmp/cc9QIKGe.o:main.c:(.text+0x34f): undefined reference to `_imp__glBindTexture@8'
/tmp/cc9QIKGe.o:main.c:(.text+0x35f): undefined reference to `set_terrain_texture_id'
/tmp/cc9QIKGe.o:main.c:(.text+0x37b): undefined reference to `_imp__glTexParameteri@12'
/tmp/cc9QIKGe.o:main.c:(.text+0x39c): undefined reference to `_imp__glTexParameteri@12'
/tmp/cc9QIKGe.o:main.c:(.text+0x3bd): undefined reference to `_imp__glTexEnvi@12'
/tmp/cc9QIKGe.o:main.c:(.text+0x428): undefined reference to `_imp__glTexImage2D@36'
/tmp/cc9QIKGe.o:main.c:(.text+0x432): undefined reference to `hero_init'
/tmp/cc9QIKGe.o:main.c:(.text+0x437): undefined reference to `creatures_init'
/tmp/cc9QIKGe.o:main.c:(.text+0x43c): undefined reference to `artifacts_init'
/tmp/cc9QIKGe.o:main.c:(.text+0x475): undefined reference to `_imp__glutInitDisplayMode@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x48e): undefined reference to `_imp__glutInitWindowSize@8'
/tmp/cc9QIKGe.o:main.c:(.text+0x4a7): undefined reference to `_imp__glutFullScreen@0'
/tmp/cc9QIKGe.o:main.c:(.text+0x4b5): undefined reference to `_imp__glutDisplayFunc@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x4c6): undefined reference to `_imp__glutIdleFunc@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x4d2): undefined reference to `arrows'
/tmp/cc9QIKGe.o:main.c:(.text+0x4d7): undefined reference to `_imp__glutSpecialFunc@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x4e8): undefined reference to `_imp__glDepthFunc@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x4f7): undefined reference to `_imp__glClearDepth@8'
/tmp/cc9QIKGe.o:main.c:(.text+0x508): undefined reference to `_imp__glEnable@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x519): undefined reference to `_imp__glDepthMask@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x52a): undefined reference to `_imp__glEnable@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x53b): undefined reference to `_imp__glEnable@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x547): undefined reference to `keys'
/tmp/cc9QIKGe.o:main.c:(.text+0x54c): undefined reference to `_imp__glutKeyboardFunc@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x565): undefined reference to `_imp__glColorMaterial@8'
/tmp/cc9QIKGe.o:main.c:(.text+0x576): undefined reference to `_imp__glMatrixMode@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x580): undefined reference to `_imp__glLoadIdentity@0'
/tmp/cc9QIKGe.o:main.c:(.text+0x5aa): undefined reference to `gluPerspective@32'
/tmp/cc9QIKGe.o:main.c:(.text+0x5b9): undefined reference to `_imp__glMatrixMode@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x5cf): undefined reference to `_imp__glutGet@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x5f5): undefined reference to `_imp__glLightfv@12'
/tmp/cc9QIKGe.o:main.c:(.text+0x616): undefined reference to `_imp__glLightfv@12'
/tmp/cc9QIKGe.o:main.c:(.text+0x627): undefined reference to `_imp__glEnable@4'
/tmp/cc9QIKGe.o:main.c:(.text+0x636): undefined reference to `_imp__glutMainLoop@0'
collect2: error: ld returned 1 exit status
Tomorrow I will try compile this program on computer with Windows, but the same compiler(Dev-C++ IDE). I must only remind where install libraries(lib and a files) on Windows.
/tmp/cc9QIKGe.o:main.c:(.text+0x4b5): undefined reference to `_imp__glutDisplayFunc@4'
It seems compiler tries to find 32-bit code, when library is 64bit. @4 probably means 4-bit pointer, when it should search for version of this function with @8-bit pointer.
Running compiler with -m32 parameter will give the same result.
The library is 32bit, all libraries with the mingw32 “branding” are 32bit, this is not your problem.
It looks like your system is screwed and the mingw cross compiler finds almost nothing it should find.
and paste the result to susepaste.org and give the link.
I am not sure if I can see what is wrong with your system, but it looks as if not even the simplest things work for you.
Try to compile the test program I gave you the link previously, it is trivial, can you compile that?
Am 29.07.2012 16:46, schrieb Lachu:
>
> ‘SUSE Paste’ (http://susepaste.org/52510761)
>
> Above is output for test program.
> Again compiling test program with -v switch:
> ‘SUSE Paste’ (http://susepaste.org/58778253)
>
> I don’t compile the program on Windows platform. Both Dev-C++ and
> Netbeans fail.
>
>
This was not the command I gave you!
do you understand the difference???
I again advise you to understand that the order in which you give the
compiler switches MATTERS.
The link switches have to be AFTER the source file!!!
–
PC: oS 12.1 x86_64 | i7-2600@3.40GHz | 16GB | KDE 4.8.4 | GeForce GT 420
ThinkPad E320: oS 12.1 x86_64 | i3@2.30GHz | 8GB | KDE 4.8.4 | HD 3000
eCAFE 800: oS 12.1 i586 | AMD Geode LX 800@500MHz | 512MB | KDE 3.5.10