Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: sektion31 on November 08, 2012, 03:19:04 am

Title: linker problems (undefined reference to ...)
Post by: sektion31 on November 08, 2012, 03:19:04 am
Hi,

i'm trying to go through the tutorials of http://www.opengl-tutorial.org.
i managed to compile them in visual studio 2010, but the windows drivers for my intel graphics card support only opengl 2.0.
so now i try to compile them in code::blocks under linux mint 13, where intel provides opengl 2.1 drivers.

i managed to import the needed header files manually but after that i am stuck with the linker not being happy
Code
-------------- Build: default in playground ---------------

Linking executable: tutorials
.objs/playground/playground.o: In function `main':
playground.cpp:(.text+0xa): undefined reference to `glfwInit'
playground.cpp:(.text+0x56): undefined reference to `glfwOpenWindowHint'
[...]
playground.cpp:(.text+0x1d3): undefined reference to `glfwTerminate'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
15 errors, 0 warnings
 

so does anyone know whats wrong? any help is appreciated
i attached the main .cpp as a textfile

greetings
adrian

[attachment deleted by admin]
Title: Re: linker problems (undefined reference to ...)
Post by: oBFusCATed on November 08, 2012, 08:12:14 am
Have you looked here: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29 ?
Title: Re: linker problems (undefined reference to ...)
Post by: sektion31 on November 08, 2012, 01:48:07 pm
thanks.

i got it working now. didnt have the libs compiled  :-[