Code::Blocks Forums
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
As usual while waiting for the next release - don't forget to check the
nightly builds
in the forum.
Home
Help
Search
Login
Register
Code::Blocks Forums
»
User forums
»
Help
»
undefined references
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: undefined references (Read 10828 times)
Newb
Guest
undefined references
«
on:
February 21, 2005, 07:22:23 am »
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!
Logged
rz950
Guest
undefined references
«
Reply #1 on:
February 21, 2005, 01:58:40 pm »
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)
Logged
xerop
Guest
undefined references
«
Reply #2 on:
February 21, 2005, 07:28:56 pm »
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
Logged
rickg22
Lives here!
Posts: 2283
undefined references
«
Reply #3 on:
February 21, 2005, 07:49:12 pm »
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.
Logged
xerop
Guest
undefined references
«
Reply #4 on:
February 21, 2005, 08:03:10 pm »
I found a way to link it but the options don't show up in the project file, why don't they?
Logged
xerop
Guest
undefined references
«
Reply #5 on:
February 21, 2005, 08:10:38 pm »
never mid I found why it doesn't save in the project file i saved the source not the project. :oops: doh! However I do hav another question how do you know what you want the linker to link to if you have an unrelated library like glut. I know when I got the library it a file by libglut32.a <- that name is this the file I link to and what kind of an option would i give the linker?
Thank you very much for treating a newbie so nicely I will repay you or someone else with the same generasity someday when I know enough.
THANK YOU!!!
Logged
rz950
Guest
undefined references
«
Reply #6 on:
February 21, 2005, 08:24:15 pm »
libgult32 would be -lglut32
Logged
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
Code::Blocks Forums
»
User forums
»
Help
»
undefined references