User forums > Using Code::Blocks
Problems linking libraries
yaustar:
Relative or Absolute paths didn't work either... I haven't tried a 'clean' install of codeblocks through, I just installed the latest version over an older one... .could this be a cause?
edit changed have to haven't
squizzz:
Which compiler are you actually trying to use...?
Half of the post in this thread suggest it's VC Toolkit (you use #pragmas, *.libs) , other ones that it might be GCC. :) ("the -lopengl32 and -lglu32 in other linker options worked....")
It's quite confusing. :)
yaustar:
Sorry, I am using the GCC compiler, it's just the source is an example tutorial. I didn't know the #pragma was VC only :P
squizzz:
--- Quote from: yaustar on September 17, 2005, 02:38:31 am ---Sorry, I am using the GCC compiler, it's just the source is an example tutorial. I didn't know the #pragma was VC only :P
--- End quote ---
Okay, as I understand "-lopengl32 -lglu32" solves your problems, but you want link libraries via GUI interface?
If so, you should add libopengl32.a and libglu32.a (you can locate these in MinGW /lib subdirectory) instead of opengl32.lib & glu32.lib.
It comes to any other lib as well, if you were linking foo.lib in your VC 6.0, you will link libfoo.a while using MinGW compiler.
Hope this solves your problem.
Greetz.
mandrav:
--- Quote from: squizzz on September 17, 2005, 11:34:13 am ---
--- Quote from: yaustar on September 17, 2005, 02:38:31 am ---Sorry, I am using the GCC compiler, it's just the source is an example tutorial. I didn't know the #pragma was VC only :P
--- End quote ---
Okay, as I understand "-lopengl32 -lglu32" solves your problems, but you want link libraries via GUI interface?
If so, you should add libopengl32.a and libglu32.a (you can locate these in MinGW /lib subdirectory) instead of opengl32.lib & glu32.lib.
It comes to any other lib as well, if you were linking foo.lib in your VC 6.0, you will link libfoo.a while using MinGW compiler.
--- End quote ---
Or just use foo as a link library and it will be replaced by C::B depending on the used compiler, i.e. libfoo.a vs foo.lib.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version