Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Internal linker does not find functions in library
Internal linker does not find functions in library [message #221213] Tue, 05 August 2008 13:25 Go to next message
Eclipse UserFriend
Originally posted by: sarmadys.gmail.com

Hello Everyone

I have a simple OpenGL program. I have compiled it in Dev-CPP
successfully (in Dev-CPP you show the library file and it creates a make
file which has library filenames in it).


- Now that I want to move to Eclipse-CDT, internal builder is not able
to find function definitions in the same libraries I have used before.

From the log I can confidently say the libraries are in the expected
place and gcc is able to find them (otherwise it would give error that
it has not able to find glut32 or glu32 libraries)

- Now the problem is that linker is not able to file definitions of
Glut/Glu functions.


Could someone please help me with this?

Regards,
Mac




**** Internal Builder is used for build ****
gcc -O3 -Wall -c -fmessage-length=0 -osrc\test2.o ..\src\test2.c
gcc -LF:\programming\MinGW\lib -otest2.exe src\test2.o -lglut32 -lglu32
-lopengl32 -lwinmm -lgdi32


src\test2.o:test2.c:(.text+0x191): undefined reference to
`glutPostRedisplay'
src\test2.o:test2.c:(.text+0x1af): undefined reference to `glutTimerFunc'
src\test2.o:test2.c:(.text+0x396): undefined reference to `glutInit'
src\test2.o:test2.c:(.text+0x3a2): undefined reference to
`glutInitDisplayMode'
src\test2.o:test2.c:(.text+0x3b7): undefined reference to
`glutInitWindowSize'
src\test2.o:test2.c:(.text+0x3c3): undefined reference to `glutCreateWindow'
src\test2.o:test2.c:(.text+0x3cf): undefined reference to `glutDisplayFunc'
src\test2.o:test2.c:(.text+0x3db): undefined reference to `glutReshapeFunc'
src\test2.o:test2.c:(.text+0x3f9): undefined reference to `glutTimerFunc'
src\test2.o:test2.c:(.text+0x41f): undefined reference to `glutMainLoop'
src\test2.o:test2.c:(.text+0x67): undefined reference to `glutSwapBuffers'

collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 875 ms.
Re: Internal linker does not find functions in library [message #221267 is a reply to message #221213] Wed, 06 August 2008 12:01 Go to previous message
Eclipse UserFriend
Originally posted by: sarmadys.gmail.com

Hi,

I guess it had nothing to do with Eclipse. The glut library coming with
MinGW did not matched the glut header file (strange thing).

Thanks.



Mac wrote:
> Hello Everyone
>
> I have a simple OpenGL program. I have compiled it in Dev-CPP
> successfully (in Dev-CPP you show the library file and it creates a make
> file which has library filenames in it).
>
>
> - Now that I want to move to Eclipse-CDT, internal builder is not able
> to find function definitions in the same libraries I have used before.
>
> From the log I can confidently say the libraries are in the expected
> place and gcc is able to find them (otherwise it would give error that
> it has not able to find glut32 or glu32 libraries)
>
> - Now the problem is that linker is not able to file definitions of
> Glut/Glu functions.
>
>
> Could someone please help me with this?
>
> Regards,
> Mac
>
> **** Internal Builder is used for build ****
> gcc -O3 -Wall -c -fmessage-length=0 -osrc\test2.o ..\src\test2.c
> gcc -LF:\programming\MinGW\lib -otest2.exe src\test2.o -lglut32 -lglu32
> -lopengl32 -lwinmm -lgdi32
>
>
> src\test2.o:test2.c:(.text+0x191): undefined reference to
> `glutPostRedisplay'
> src\test2.o:test2.c:(.text+0x1af): undefined reference to `glutTimerFunc'
> src\test2.o:test2.c:(.text+0x396): undefined reference to `glutInit'
> src\test2.o:test2.c:(.text+0x3a2): undefined reference to
> `glutInitDisplayMode'
> src\test2.o:test2.c:(.text+0x3b7): undefined reference to
> `glutInitWindowSize'
> src\test2.o:test2.c:(.text+0x3c3): undefined reference to
> `glutCreateWindow'
> src\test2.o:test2.c:(.text+0x3cf): undefined reference to `glutDisplayFunc'
> src\test2.o:test2.c:(.text+0x3db): undefined reference to `glutReshapeFunc'
> src\test2.o:test2.c:(.text+0x3f9): undefined reference to `glutTimerFunc'
> src\test2.o:test2.c:(.text+0x41f): undefined reference to `glutMainLoop'
> src\test2.o:test2.c:(.text+0x67): undefined reference to `glutSwapBuffers'
>
> collect2: ld returned 1 exit status
> Build error occurred, build is stopped
> Time consumed: 875 ms.
Previous Topic:Highlighting and hyperlinks in build console?
Next Topic:Re: Problem with c
Goto Forum:
  


Current Time: Fri Mar 29 08:56:24 GMT 2024

Powered by FUDForum. Page generated in 0.03145 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top