Author Topic: Library problems  (Read 3752 times)

Offline Decrius

  • Multiple posting newcomer
  • *
  • Posts: 81
    • Daevius
Library problems
« on: December 28, 2006, 02:04:05 pm »
Hi,

CB RC2, win32, GLFW project:

I downloaded FreeImage and DevIL, both image libraries for OpenGL. Both got and .dll file, .lib file and a .h file.

Where should I place those 3 files, and what do I need to add to my code and to the compiler settings? (Linker)

Because both times it didn't work, and CB Nightly builds is not an option, because it is not working.

Thank you,

Decrius
Check out my website: http://www.daevius.com

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Library problems
« Reply #1 on: December 28, 2006, 03:05:22 pm »
In general: Please avoid cross-posting, thanks.

CB RC2, win32, GLFW project:
I'd suggest a nightly, honestly.

I downloaded FreeImage and DevIL, both image libraries for OpenGL. Both got and .dll file, .lib file and a .h file.
1.) Place the .dll files either in the path of your executable, in the system32 path of Windows or any other path that is included in the PATH environment.
2.) Place the *.lib files to either your compiler's library folder (e.g. GCC\lib), or any other folder nearby the header files and setup the project's linker options to include this path appropriately.
3.) *.h files you can put wither in the compiler's include directory (e.g. GCC\include) or leave it nearby the library files and setup the compiler's include path options appropriately in the project options.

CB Nightly builds is not an option, because it is not working.
It's not working for all but you?! :shock:
It would be helpful if you explain what exactly is not working for you because I believe it is as simple as a setup option you are missing.

With regards, Morten.

Ps.: In addition: I *strongly* suggest you read a book or article on the internet, how compiling/linking works. Your questions are *really* at a very beginner level so from my point of view your should go one step back before you start developing... not offending.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Decrius

  • Multiple posting newcomer
  • *
  • Posts: 81
    • Daevius
Re: Library problems
« Reply #2 on: December 28, 2006, 03:18:43 pm »
Okay thanks,

Yes I know its a very basic question, that is because it is NEVER working. Really. 2 months ago I managed to get a new library working. But now suddenly nothing is working at all, the .h files are okay and the .dll files can;t be wrong, but libs don't seem to work. .h files I place in the include directory of my MinGW compiler. Than I call at the beginning of the code #include <FI/FreeImage.h>, working. But the libraries seem to be very difficult for me (always have problems with that). I place the library (.lib file) in the lib directory. Than I go to compiler options and add the to the linker (whats the difference between the left and the right area in the Linker tab?). It doesn't sayus it cant find it, but it does gives errors (which apparently appear when a lib isnt added) :S

About the NBs, one of the other 5 topics of me is about that :P

Thank you anyways :)

Decrius

EDIT: Sorry its double topic, you already answered some questions in the other topic thanks :), (you dont have to answer here again :P)
« Last Edit: December 28, 2006, 03:21:14 pm by Decrius »
Check out my website: http://www.daevius.com