Author Topic: Setting Up GLFW Project in Ubuntu  (Read 9584 times)

Offline Blakeasd

  • Single posting newcomer
  • *
  • Posts: 4
Setting Up GLFW Project in Ubuntu
« on: April 16, 2013, 11:35:52 pm »
Hello,

I just install glfw via the make files today, but I can't get it to work in Code::Blocks -- I actually can't get past the new project wizard.

To create the project, I do File > New Project

I then select GLFW from the list and click Go. I name the project and click Next. The problem occurs when I get to the "Select GLFW location". I'm not sure what to put here. The headers are in one place and the .a libglfw is in another. Do I just put the libglfw folder that I downloaded from the libglw website?

Additional Information: I am using Code::Blocks v.10.05

Any assistance would be greatly appreciated!

Thanks!

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7589
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Blakeasd

  • Single posting newcomer
  • *
  • Posts: 4
Re: Setting Up GLFW Project in Ubuntu
« Reply #2 on: April 17, 2013, 12:46:37 am »
I have already seen what you have linked. I don't know what the base directory for glfw is referring to. The downloaded project folder or the folder where libraries are installed in Linux?

Thanks

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7589
    • My Best Post
Re: Setting Up GLFW Project in Ubuntu
« Reply #3 on: April 17, 2013, 12:56:19 am »
I have already seen what you have linked. I don't know what the base directory for glfw is referring to. The downloaded project folder or the folder where libraries are installed in Linux?

Thanks

It is NOT referring to your files.
It is referring to the glfw include files and library files.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Blakeasd

  • Single posting newcomer
  • *
  • Posts: 4
Re: Setting Up GLFW Project in Ubuntu
« Reply #4 on: April 17, 2013, 01:18:59 am »
Hmm... So I put this in  /home/blake/glfw-2.7.8 [the folder downloaded from the website] and Code::Blocks doesn't recognize it. It says that it can't find the following glf library file:

glfw in it

I'm quite honestly not sure what I'm missing here.

Thanks for all of your help so far!


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7589
    • My Best Post
Re: Setting Up GLFW Project in Ubuntu
« Reply #5 on: April 17, 2013, 01:42:13 am »
I can NOT help you use Linux and programming using GLFW.
(I am a windows user who never have used GLFW.)

You going to have to find someone else.

Note: This is only slightly a Code::Blocks topic.

It mainly is how to program using Libraries.

I suggest NOT using the Code::Blocks GLFW Wizard and instead use the empty project option.
Do it all manually and you will learn more; or you can wait till someone helps you here or on another site.

If you continue with this after you get a project created make sure full compiler logging is on.
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Setting Up GLFW Project in Ubuntu
« Reply #6 on: April 17, 2013, 09:45:07 am »
Why are you using c::b 10.05?
Are you using linux?
have you done make install?

i didn't have this c::b version any more, but in the 12.10 if you start a new GLFW Project there opens the Global Variable Editor with the Variable of glfw selected. There are several fields with the name base include lib...
sou in base i would point to the downloaded folder
in include i would point to downloadetFolder/include
in lib i would point to downloadedFolder/lib

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Setting Up GLFW Project in Ubuntu
« Reply #7 on: April 17, 2013, 09:57:14 am »
Is there a good reason not to use the glfw-packages provided by ubuntu ?
In this case the base-path shoud only point to /usr (in most cases).

Offline Blakeasd

  • Single posting newcomer
  • *
  • Posts: 4
Re: Setting Up GLFW Project in Ubuntu
« Reply #8 on: April 17, 2013, 10:04:24 pm »
Thanks BlueHazzard and jens. I upgraded to Code::Blocks 12 and used /usr as the GLFW location. This seemed to do the trick. Using /usr in Code::Blocks 10 does not work. I wonder why in the Ubuntu "app store" the latest version of Code::Blocks available is 12.

Thanks Again for All the Help!