[winegcc] Cross-compiling glut program
[winegcc] Cross-compiling glut program
Where I can put files with lib, h(C header) and def extension files?
I need to compile file with exe format (for Windows).
I need to compile file with exe format (for Windows).
Re: [winegcc] Cross-compiling glut program
Try 'winetricks glut'. Then add c:/glut-3.7.6-bin to your LIB and INCLUDE environment variables before compiling.
Re: [winegcc] Cross-compiling glut program
After invoking
and
the last lines are
Code: Select all
winetricks glut
Code: Select all
winegcc -lGL -lglut *.c
Code: Select all
normal.c: In function ‘CalculateNormal’:
normal.c:38:20: warning: incompatible implicit declaration of built-in function ‘sqrt’
artifact-xcEdMM.o: In function `glutInit_ATEXIT_HACK':
artifact.c:(.text+0x26): undefined reference to `__glutInitWithExit'
artifact-xcEdMM.o: In function `glutCreateWindow_ATEXIT_HACK':
artifact.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
artifact-xcEdMM.o: In function `glutCreateMenu_ATEXIT_HACK':
artifact.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
creature-zHPwGY.o: In function `glutInit_ATEXIT_HACK':
creature.c:(.text+0x26): undefined reference to `__glutInitWithExit'
creature-zHPwGY.o: In function `glutCreateWindow_ATEXIT_HACK':
creature.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
creature-zHPwGY.o: In function `glutCreateMenu_ATEXIT_HACK':
creature.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
hero-Zgq6tP.o: In function `glutInit_ATEXIT_HACK':
hero.c:(.text+0x26): undefined reference to `__glutInitWithExit'
hero-Zgq6tP.o: In function `glutCreateWindow_ATEXIT_HACK':
hero.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
hero-Zgq6tP.o: In function `glutCreateMenu_ATEXIT_HACK':
hero.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
keyboard-WoiUUD.o: In function `glutInit_ATEXIT_HACK':
keyboard.c:(.text+0x26): undefined reference to `__glutInitWithExit'
keyboard-WoiUUD.o: In function `glutCreateWindow_ATEXIT_HACK':
keyboard.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
keyboard-WoiUUD.o: In function `glutCreateMenu_ATEXIT_HACK':
keyboard.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
main-EMUNNP.o: In function `glutInit_ATEXIT_HACK':
main.c:(.text+0x26): undefined reference to `__glutInitWithExit'
main-EMUNNP.o: In function `glutCreateWindow_ATEXIT_HACK':
main.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
main-EMUNNP.o: In function `glutCreateMenu_ATEXIT_HACK':
main.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
main-EMUNNP.o: In function `display':
main.c:(.text+0x2ea): undefined reference to `gluLookAt'
main-EMUNNP.o: In function `main':
main.c:(.text+0x5c1): undefined reference to `gluPerspective'
md2-2-3oZt7R.o: In function `glutInit_ATEXIT_HACK':
md2-2.c:(.text+0x26): undefined reference to `__glutInitWithExit'
md2-2-3oZt7R.o: In function `glutCreateWindow_ATEXIT_HACK':
md2-2.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
md2-2-3oZt7R.o: In function `glutCreateMenu_ATEXIT_HACK':
md2-2.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
collect2: ld returned 1 exit status
winegcc: gcc failed
Re: [winegcc] Cross-compiling glut program
How add C:\glut-3.7.6-bin to lib and include directory(command)?
Re: [winegcc] Cross-compiling glut program
Code: Select all
> LIB=C:\\glut-3.7.6-bin INCLUDE=C:\\glut-3.7.6-bin winegcc -lGL -lglut
/usr/lib64/wine/libwinecrt0.a(exe_main.o): In function `main':
/usr/src/packages/BUILD/wine-1.4-rc4/dlls/winecrt0/exe_main.c:48: undefined reference to `WinMain'
collect2: ld returned 1 exit status
winegcc: gcc failed
Re: [winegcc] Cross-compiling glut program
Sorry for previous posts.
I use thiis command:
And output is(few last lines):
[/code]
I use thiis command:
Code: Select all
> LIB=C:\\glut-3.7.6-bin INCLUDE=C:\\glut-3.7.6-bin winegcc -lGL -lglut *.c
Code: Select all
normal.c: In function ‘CalculateNormal’:
normal.c:38:20: warning: incompatible implicit declaration of built-in function ‘sqrt’
artifact-CzsPQm.o: In function `glutInit_ATEXIT_HACK':
artifact.c:(.text+0x26): undefined reference to `__glutInitWithExit'
artifact-CzsPQm.o: In function `glutCreateWindow_ATEXIT_HACK':
artifact.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
artifact-CzsPQm.o: In function `glutCreateMenu_ATEXIT_HACK':
artifact.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
creature-4jKVej.o: In function `glutInit_ATEXIT_HACK':
creature.c:(.text+0x26): undefined reference to `__glutInitWithExit'
creature-4jKVej.o: In function `glutCreateWindow_ATEXIT_HACK':
creature.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
creature-4jKVej.o: In function `glutCreateMenu_ATEXIT_HACK':
creature.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
hero-Wmiux5.o: In function `glutInit_ATEXIT_HACK':
hero.c:(.text+0x26): undefined reference to `__glutInitWithExit'
hero-Wmiux5.o: In function `glutCreateWindow_ATEXIT_HACK':
hero.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
hero-Wmiux5.o: In function `glutCreateMenu_ATEXIT_HACK':
hero.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
keyboard-LN1r98.o: In function `glutInit_ATEXIT_HACK':
keyboard.c:(.text+0x26): undefined reference to `__glutInitWithExit'
keyboard-LN1r98.o: In function `glutCreateWindow_ATEXIT_HACK':
keyboard.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
keyboard-LN1r98.o: In function `glutCreateMenu_ATEXIT_HACK':
keyboard.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
main-22lNQn.o: In function `glutInit_ATEXIT_HACK':
main.c:(.text+0x26): undefined reference to `__glutInitWithExit'
main-22lNQn.o: In function `glutCreateWindow_ATEXIT_HACK':
main.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
main-22lNQn.o: In function `glutCreateMenu_ATEXIT_HACK':
main.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
main-22lNQn.o: In function `display':
main.c:(.text+0x2ea): undefined reference to `gluLookAt'
main-22lNQn.o: In function `main':
main.c:(.text+0x5c1): undefined reference to `gluPerspective'
md2-2-8SamJz.o: In function `glutInit_ATEXIT_HACK':
md2-2.c:(.text+0x26): undefined reference to `__glutInitWithExit'
md2-2-8SamJz.o: In function `glutCreateWindow_ATEXIT_HACK':
md2-2.c:(.text+0x47): undefined reference to `__glutCreateWindowWithExit'
md2-2-8SamJz.o: In function `glutCreateMenu_ATEXIT_HACK':
md2-2.c:(.text+0x68): undefined reference to `__glutCreateMenuWithExit'
collect2: ld returned 1 exit status
winegcc: gcc failed
Re: [winegcc] Cross-compiling glut program
For winegcc and mingw, you probably have to use -I and -L arguments instead of INCLUDE and LIB
environment variables.
I'm not sure winegcc can handle native libraries, you might want to try mingw
(e.g. apt-get install mingw32).
environment variables.
I'm not sure winegcc can handle native libraries, you might want to try mingw
(e.g. apt-get install mingw32).
Re: [winegcc] Cross-compiling glut program
Ok. I have done my work - topic should been closed.