Author Topic: ld.exe error! :(  (Read 4297 times)

Offline JMiller

  • Single posting newcomer
  • *
  • Posts: 4
ld.exe error! :(
« on: October 28, 2005, 04:39:48 pm »
Hey all! First of all I want to say to the developers I love the look and feel of this IDE! Anyway I'm trying to develop using  GLFW but I keep getting this one error:  File: ld.exe  Message: cannot find -lglfw. This frustrates me because I really wanna switch to this ide from devC++. Please help!

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: ld.exe error! :(
« Reply #1 on: October 28, 2005, 05:15:28 pm »
Do you actually have GLFW, i.e. did you build it like described in the WiKi, or did you just download Code::Blocks and hit on the button in the templates screen?
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline JMiller

  • Single posting newcomer
  • *
  • Posts: 4
Re: ld.exe error! :(
« Reply #2 on: October 28, 2005, 07:31:52 pm »
Yep, I have GLFW, I downloaded and installed it via devPacks. Then I linked everything together. The glfwdll, libglfw.a,  the glfw.h file. I'm positive I did it correctly but it seems strange because a friend of mine is not having the problem I have.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: ld.exe error! :(
« Reply #3 on: October 28, 2005, 07:44:24 pm »
I don't use DevPaks, but I guess they contain the necessary things nevertheless. ;)

What you need is the header file placed in the GL folder, and libglfw.a in a place where your linker will find it (for example C:\codeblocks\lib). I assume you have the path added to your linker directories.

In the rare case that you want to link to GLFW dynamically (which is pretty much nonsense given its small size, but possible nevertheless), the linker needs libglfwdll.a and glfw.dll too.

Your project must contain the following libraries: glfw, opengl32, glu32, gdi32, user32, and kernel32.

Instead of using the DevPak, you can also build GLFW from sources, this takes about 2 minutes alltogether, so it may very well be worth it. Following the WiKi works reliably.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline JMiller

  • Single posting newcomer
  • *
  • Posts: 4
Re: ld.exe error! :(
« Reply #4 on: October 28, 2005, 08:06:59 pm »
Ahhh..... This almost brings a tear to my eyes! Thanks Alot! The problem was I put the right file in the wrong folder! How dumb of me! Anyway I'd like to put a link on my site to the main page of this site, so people can be aware of this great IDE. Is that ok?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: ld.exe error! :(
« Reply #5 on: October 28, 2005, 08:34:11 pm »
YES! :D Please do! We need to have some publicity. (Note: Linking to codeblocks in other forums with your user's signature is considered SPAM, and it only confuses the search engines. I certainly do NOT recommend it)

Offline JMiller

  • Single posting newcomer
  • *
  • Posts: 4
Re: ld.exe error! :(
« Reply #6 on: October 28, 2005, 08:59:43 pm »
 :D It's ok it'll be linked to my fairly new(but growing) site today! NewbiesNetwork.com and I'll let everyone I know about it! 8)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: ld.exe error! :(
« Reply #7 on: October 28, 2005, 10:26:13 pm »
I noticed your link to *cough cough* the competition under the "C++" icon. Please fix that :P

Also, some of your links are too wide, making the screen distorted.