Author Topic: ld.exe cannot find -lfreeglut  (Read 39490 times)

Offline searcher

  • Multiple posting newcomer
  • *
  • Posts: 18
ld.exe cannot find -lfreeglut
« on: December 03, 2011, 11:26:55 pm »
Using Windows Vista Premium, FirePro 2270 graphics card. Fresh download of code::blocks and also of freeglut. Go to CB and try the "Hello World" default program and get the above message.
I can not find any relevant advice on the web.
Please HELP!!
« Last Edit: December 04, 2011, 06:32:55 pm by searcher »


Offline JackDawson

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: ld.exe cannot find -lfreeglut
« Reply #2 on: December 04, 2011, 10:43:54 pm »
Using Windows Vista Premium, FirePro 2270 graphics card. Fresh download of code::blocks and also of freeglut. Go to CB and try the "Hello World" default program and get the above message.
I can not find any relevant advice on the web.
Please HELP!!

Did you read my tutorial on how to install freeGlut with C::B ?

http://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks

You must read it thoroughly to understand it. Also, make sure your FILE extensions are visible. I am going to have to update my tutorial sometime soon, because I am constantly being asked why they cannot see the files to edit that I stated in the tut. You can change your extensions in the Windows Explorer ORGANIZE.  So its ORGANIZE --> FOLDER AND SEARCH OPTIONS --> VIEW ( TAb ) and then you should see where its saying to hide the file extensions. You do NOT want to hide your extensions except your protected system files. Leave those hidden.

Offline searcher

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: ld.exe cannot find -lfreeglut
« Reply #3 on: December 05, 2011, 04:02:31 am »
Yes I have read your instructions - 2 weeks ago I had that demo program running. So, I decided to start from scratch following your instructions as carefully as possible. All seemed to go well until I tried to edit the glut.cbp file. CB would not allow me to edit the file directly so I went to notepad and made the change as requested and replaced the file in the original location. Now when I try to set up the testing demo I get some info tabs about something being outdated and asking me to define glut !!
I tried running the classic console program "Hello World" (with both versions of glut.cbp) and still get the message :  ld.exe cannot find -lfreeglut32.
If you have any further advice it will be appreciated. Many thanks.

Offline JackDawson

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: ld.exe cannot find -lfreeglut
« Reply #4 on: December 05, 2011, 06:23:02 am »
Yes I have read your instructions - 2 weeks ago I had that demo program running. So, I decided to start from scratch following your instructions as carefully as possible. All seemed to go well until I tried to edit the glut.cbp file. CB would not allow me to edit the file directly so I went to notepad and made the change as requested and replaced the file in the original location. Now when I try to set up the testing demo I get some info tabs about something being outdated and asking me to define glut !!
I tried running the classic console program "Hello World" (with both versions of glut.cbp) and still get the message :  ld.exe cannot find -lfreeglut32.
If you have any further advice it will be appreciated. Many thanks.

Your only mentioning that you edited "glut.cbp". What about the other file I mentioned in my tutorial ?

Also, you do not use C::B to edit those file in my tutorial. I had even mentioned in my tutorial to use Windows Notepad as its the safest and easiest way to do it. You could even copy and paste the two files I listed because those 2 on that page are already edited.

What I find interesting is you said you got it running. So now i'm confused what the problem is that your having.

Either way, Hope the info helps.
« Last Edit: December 05, 2011, 06:27:06 am by JackDawson »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: ld.exe cannot find -lfreeglut
« Reply #5 on: December 05, 2011, 06:33:50 am »
Yes I have read your instructions - 2 weeks ago I had that demo program running. So, I decided to start from scratch following your instructions as carefully as possible. All seemed to go well until I tried to edit the glut.cbp file. CB would not allow me to edit the file directly so I went to notepad and made the change as requested and replaced the file in the original location. Now when I try to set up the testing demo I get some info tabs about something being outdated and asking me to define glut !!
I tried running the classic console program "Hello World" (with both versions of glut.cbp) and still get the message :  ld.exe cannot find -lfreeglut32.
If you have any further advice it will be appreciated. Many thanks.
Never, never, never edit a projectfile directly, until you know exactly what you do !

Every advice to do so is bullshit !!

If you want to change the name of a linklibrary do it in the projects "Build options".

Offline JackDawson

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: ld.exe cannot find -lfreeglut
« Reply #6 on: December 05, 2011, 06:40:32 am »
Yes I have read your instructions - 2 weeks ago I had that demo program running. So, I decided to start from scratch following your instructions as carefully as possible. All seemed to go well until I tried to edit the glut.cbp file. CB would not allow me to edit the file directly so I went to notepad and made the change as requested and replaced the file in the original location. Now when I try to set up the testing demo I get some info tabs about something being outdated and asking me to define glut !!
I tried running the classic console program "Hello World" (with both versions of glut.cbp) and still get the message :  ld.exe cannot find -lfreeglut32.
If you have any further advice it will be appreciated. Many thanks.
Never, never, never edit a projectfile directly, until you know exactly what you do !

Every advice to do so is bullshit !!

If you want to change the name of a linklibrary do it in the projects "Build options".

@ Jens
If you read the tutorial, you'll see why he has to edit two files directly. I was asked by several others to make this tutorial since most could not get regular Glut to work since it was outdated. So I was asked to make a Tutorial to set it up for freeGlut. So yes, he has to edit those two files directly for this to work with freeGlut.

Beings that your an admin, figured I better show you proof that I was asked to do it, and I didn't want you banning me for something I was asked to do. Even the Developer approved this : http://forums.codeblocks.org/index.php/topic,14967.0.html

And the tutorial has been referenced here and there by others. Here is one example : http://forums.codeblocks.org/index.php/topic,15313.0.html

« Last Edit: December 05, 2011, 07:07:35 am by JackDawson »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: ld.exe cannot find -lfreeglut
« Reply #7 on: December 05, 2011, 11:28:24 am »
@JackDawson:
The replacement of glut with freeglut can be done in the gui, too, so Jens is generally right.
Also, why do you need the glut.cbp file? As far as I can see, the project file is generated
by the wizard script and glut.cbp is not mentioned in it!

p.s. Jens is not only admin, but a developer!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline JackDawson

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: ld.exe cannot find -lfreeglut
« Reply #8 on: December 05, 2011, 02:24:24 pm »
@JackDawson:
The replacement of glut with freeglut can be done in the gui, too, so Jens is generally right.
Also, why do you need the glut.cbp file? As far as I can see, the project file is generated
by the wizard script and glut.cbp is not mentioned in it!

p.s. Jens is not only admin, but a developer!

Yes it is mentioned. Look at the tutorial again.

According to his profile here on this thread it just says Admin. So I had no other way of knowing. It shows you as a developer, not him.

As far as editing it inside the GUI, I would have to do it for EVERY PROJECT and the thing is, why would you ? You see you use either Glut OR freeGlut, but you would never use both. Because lets face it, the whole purpose of freeGlut is to replace the old Glut. So you would edit the file as I have shown in the tutorials.

If you guys would actually READ my tutorial you would understand all this and know that there are TWO files that you have to edit.
« Last Edit: December 05, 2011, 02:30:03 pm by JackDawson »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: ld.exe cannot find -lfreeglut
« Reply #9 on: December 05, 2011, 02:39:32 pm »
I've read your tutorial or glanced at it!

Can you tell me why glut.cbp is needed?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline JackDawson

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: ld.exe cannot find -lfreeglut
« Reply #10 on: December 05, 2011, 02:45:36 pm »
I've read your tutorial or glanced at it!

Can you tell me why glut.cbp is needed?

Yes if you open up your C::B and then click create new project, it will show up all those pretty icons. One of the ICONS is Glut. That is actually talking to your Wizard File. Its what sets up your first perimeters when your creating the project. The Glut.cbp file is whats sets up your libraries for your project. Without that file, your project becomes an empty project. You need that Glut.cbp to point your dependencies to the right libraries.

EXAMPLE : Create a new project with Glut. Then in the folder where you saved your project, is where that file gets renamed too. So lets say you named your project BUBBA. Well in that folder you saved it too, it saved a file in there named BUBBA.cbp. Well that Glut.cbp info is in there. The reason again is because its telling the IDE what dependencies your using. Glut.cbp is just a template file that gets renamed into each project.
« Last Edit: December 05, 2011, 02:49:31 pm by JackDawson »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: ld.exe cannot find -lfreeglut
« Reply #11 on: December 05, 2011, 03:26:15 pm »
It doesn't work at all on linux, so I can really test it.
But I don't have glut.cbp on my hard drive.

But Jens is still right in his comment. And your tutorial shouldn't have been written but a patch for glut's template should have been made!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline JackDawson

  • Multiple posting newcomer
  • *
  • Posts: 37
Re: ld.exe cannot find -lfreeglut
« Reply #12 on: December 05, 2011, 03:29:34 pm »
It doesn't work at all on linux, so I can really test it.
But I don't have glut.cbp on my hard drive.

But Jens is still right in his comment. And your tutorial shouldn't have been written but a patch for glut's template should have been made!

Hahaha your the one who encouraged me to make the tutorial.. LMAO

As for it to be a default, I TOTALLY agree, there should be a Glut and a FreeGlut option. But there is not. Its why the tutorial was made in the first place.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: ld.exe cannot find -lfreeglut
« Reply #13 on: December 05, 2011, 03:58:04 pm »
Hahaha your the one who encouraged me to make the tutorial.. LMAO
Link or it didn't happen? As far as I can see, I've only told you how to login in the wiki.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline searcher

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: ld.exe cannot find -lfreeglut
« Reply #14 on: December 05, 2011, 04:47:40 pm »
@JackDawson.
Yes I did edit the other file (with notepad) – no problems. I don’t quite understand why I can’t edit a cbp file in CB editor however, I did edit the glut.cbp in notepad as you suggest. Now when I try to open glut.cbp using CB I get : SCR1
Now if I press O.K. I get: SCR2
 
Finally , I cannot close this except by pressing  CntrlAltDel and using the task manager.
If instead of messing with the above I try the simple console program “Hello World” I’m back to the error message that I started this thread with.
Don’t know if any of this helps – but I do appreciate the input.


[attachment deleted by admin]