User forums > Help

undefined references

(1/2) > >>

I am trying to use the glut library for openGL development. I am using the MinGW compiler with code blocks and I am getting constant undefined reference errors what might be causing this could it be a missing library or source file possibly a dll. (yes I am trying to use windows with this, I am so ashamed...)  Any help will be greatly appreciated!

Do you have the all the -lglu because you could have the lib but without adding into the linking commands that opengl stuff it wil not work. If you go to projects in c::b there is a opengl temeplate use that one and get it working for what you need (just add the glut headers; if it doesn't use them already)

Ok the problem is in the linker but how do I get the options from the project file (*.cbs) to show up in codeblocks when I attempt to configure the compiler (MINGW). None show up yet there are a lot of them in the project file (I checked with notepad).

By options I mean linker arguments

In "Project..." select "Properties", "targets" tab, "target's build options" button, "linker options" tab. Add the -lglu to the options. If it still doesn't link, perhaps you need to add the directory of the library to the "Linker's DIRS" tab.

I found a way to link it but the options don't show up in the project file, why don't they?


[0] Message Index

[#] Next page

Go to full version