Author Topic: GLFW help  (Read 3804 times)

Offline thomas.gilray

  • Single posting newcomer
  • *
  • Posts: 8
GLFW help
« on: July 18, 2006, 10:39:04 am »
I have a question about using GLFW with Code::Blocks. I have been using Code::Blocks for my hobbies for almost six months now and am intersted in learning OpenGL. From online research GLFW seems like a good choice. I found this page for help with installation: "http://wiki.codeblocks.org/index.php?title=GLFW" and have tried following its instructions. I have no experience compiling without an environment and failed in my attemps to compile a GLFW static library. I have code::blocks and minGW (g++) installed.

Is there anywhere I can find a static library of GLFW for windows in MinGW + C::B online... already compiled? Any other ideas.

I was able to open the template project for GLFW but it gives the single error "ld.exe : cannot find -lglfw". Am I correct in assuming that this means I am required to place the missing glfw .lib in "...codeblocks\lib\" folder for linking.

Thanks.

-Thomas


Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9528
Re: GLFW help
« Reply #1 on: July 18, 2006, 02:12:08 pm »
Is there anywhere I can find a static library of GLFW for windows in MinGW + C::B online... already compiled? Any other ideas.
Search for the GLFW DevPak (or click here: http://devpaks.org/details.php?devpak=72). This will extract to a folder structure with at least an include and a lib folder.

I was able to open the template project for GLFW but it gives the single error "ld.exe : cannot find -lglfw". Am I correct in assuming that this means I am required to place the missing glfw .lib in "...codeblocks\lib\" folder for linking.
The include folder you have to add to your compiler include folders the lib folder you have to include to your linker include folders. Then the linkage will succeed. You could also put the files of the inlcude/lib folder into you Code::Blocks include/lib folder. Since these folders are automatically parsed by the compiler, the linkage will succeed, too. I for myself prefer seperating frameworks to keep the overview of the dependencies.

With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline thomas.gilray

  • Single posting newcomer
  • *
  • Posts: 8
Re: GLFW help
« Reply #2 on: July 18, 2006, 09:38:06 pm »
Thanks so much!

I used the devpak. I unzipped it and put its static library in my lib folder. The template works perfectly now. Thanks for your help!

-Thomas