| Author |
Message |
|
Lachu
|
Posted: Wed Jul 25, 2012 11:49 am |
|
 |
| Level 1 |
 |
|
|
Joined: Wed Jul 25, 2012 11:40 am Posts: 6
|
|
Where I can put files with lib, h(C header) and def extension files?
I need to compile file with exe format (for Windows).
|
|
 |
|
 |
|
DanKegel
|
Posted: Wed Jul 25, 2012 9:53 pm |
|
Joined: Wed May 14, 2008 11:44 am Posts: 1128
|
|
Try 'winetricks glut'. Then add c:/glut-3.7.6-bin to your LIB and INCLUDE environment variables before compiling.
|
|
 |
|
 |
|
Lachu
|
Posted: Thu Jul 26, 2012 10:05 am |
|
 |
| Level 1 |
 |
|
|
Joined: Wed Jul 25, 2012 11:40 am Posts: 6
|
After invoking Code: winetricks glut
and Code: winegcc -lGL -lglut *.c
the last lines are Code: 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
|
|
 |
|
 |
|
Lachu
|
Posted: Thu Jul 26, 2012 10:09 am |
|
 |
| Level 1 |
 |
|
|
Joined: Wed Jul 25, 2012 11:40 am Posts: 6
|
|
How add C:\glut-3.7.6-bin to lib and include directory(command)?
|
|
 |
|
 |
|
Lachu
|
Posted: Thu Jul 26, 2012 11:40 am |
|
 |
| Level 1 |
 |
|
|
Joined: Wed Jul 25, 2012 11:40 am Posts: 6
|
Code: > 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
How enable standard C entry point instead of Win32 entry point?
|
|
 |
|
 |
|
Lachu
|
Posted: Thu Jul 26, 2012 12:59 pm |
|
 |
| Level 1 |
 |
|
|
Joined: Wed Jul 25, 2012 11:40 am Posts: 6
|
Sorry for previous posts. I use thiis command: Code: > LIB=C:\\glut-3.7.6-bin INCLUDE=C:\\glut-3.7.6-bin winegcc -lGL -lglut *.c
And output is(few last lines): Code: 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
[/code]
|
|
 |
|
 |
|
DanKegel
|
Posted: Thu Jul 26, 2012 2:15 pm |
|
Joined: Wed May 14, 2008 11:44 am Posts: 1128
|
|
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).
|
|
 |
|
 |
|
Lachu
|
Posted: Sun Jul 29, 2012 2:53 pm |
|
 |
| Level 1 |
 |
|
|
Joined: Wed Jul 25, 2012 11:40 am Posts: 6
|
|
Ok. I have done my work - topic should been closed.
|
|
 |
|
 |
|