Difference between libglfw3-dev in apt repository and glfw source code provided on github? - glfw

I am trying to get into graphics programming on ubuntu 20.04, and I'm trying to set up glfw for using OpenGL. I found two different ways of setting up glfw, one was using the apt repository and the other was compiling it using cmake. I just have one doubt, are both of these methods installing the same thing and if they differ then how? If both are same, then why doesn't the download page on GLFW state that?
sudo apt-get install libglfw3-dev
I tried searching the same question on the internet, didn't notice anything relatable. But I did notice in some tutorials that both installation included the same header file while coding
GLFW/glfw3.h

Related

Where to install kernel header for BeagleboneBlack 3.8.13-bone79?

I'm currently using the default OS on eMMC of BeagleBone Black but I found no header files in /src/usr path. I tried to install via apt-get install and official website of Derek Molloy but it is dead already. I'm wondering can anyone give me the header files or provide me with some other sites where I can install? I need it to build Makefile and compile.
The version I'm using is 3.8.13-bone79.
That is a heavily outdated version of the default Debian install. I'd strongly suggest reinstalling a current image on the BBB from here: http://beagleboard.org/latest-images
There is no reason to stick to this old and problem-riddled install.

Unable to locate package GLFW on Linux Mint

I have been trying to install GLFW and GLFW3, using Terminal to install
sudo apt-get install GLFW
sudo apt-get install GLFW3
Whenever I do so, I get results such as
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package glfw3
I have been trying to install GLFW for two hours now, and I'm getting a bit impatient. Also I'm very new to Linux (Mint), so I apologize if I'm doing something stupid...
EDIT:
No matter what I try, my program encounters
/home/myusername/Desktop/basic_window.cpp:11:21: fatal error: GL/glfw.h: No such file or directory
#include <GL/glfw.h>
^
compilation terminated.
Having a frustrating time with this, not sure why this is much more complicated than the other libraries I've installed so far.
I have been trying to install GLFW and GLFW3, using Terminal to install...
On Mint 17, it looks like you need to install libglfw2. So perform a sudo apt-get install libglfw2.
If you plan on developing against it, then install libglfw-dev instead. Notice the lack of a version number.
If interested, perform apt-cache search glfw
In Debian-based systems such as Ubuntu and Mint, library packages typically have names that begin with "lib", and development headers (for compiling new programs that use the library) are in a separate package whose name ends with "-dev".
Ubuntu 14.04 has GLFW 2 packaged as libglfw2 and libglfw-dev. Mint doesn't seem to have those packages, but you can probably use the Ubuntu ones since Mint 17 is based on Ubuntu 14.04.
GLFW 3 isn't in Ubuntu 14.04, but it looks like it'll be in 14.10 (as libglfw3 and libglfw3-dev).
Unless you really need GLFW 3 specifically, you're probably better off sticking with the packaged GLFW 2. Packages get easy automatic upgrades; compiling stuff "by hand" is a good way to end up with lots of cruft in your system with no automatic upgrade or uninstall.
Download GLFW source packages from their website.
Extract the folder glfw-3.0.4 from the tarball
Open console
Navigate to the folder you just extracted and go inside of it using cd
Type cmake . (be sure you include the dot)
If cmake . fails, then type the following as root:
apt-get install cmake
If you don't think you're root then type the following:
sudo apt-get install cmake
If that doesn't work then type the following as root, or add sudo if you're not root:
apt-get install build-essential cmake
Once you have cmake installed, navigate back to the folder and try cmake . again.

Creating GLUT project in Code::Blocks

My problem is that I can't create a glut project in Code::Blocks stated exactly in this question . But the answer given there doesn't solve my problem. I did sudo apt-get install freeglut3 freeglut3-dev and sudo apt-get install binutils-gold to install GLUT. There is a folder GL in the in/usr/include.
In the path glut project creation wizard when I enter /usr it complains it cant find GLUTs file. How do I create a Glut Project?
I think you need to include full header file path in your project.
like this.
#include "GL\fglut.h"
This above line i have tried on windows and i hope same will work on your system also.
and for more information go to this link.
OpenGl building issue

Where to get SDL2 non-default libraries for Fedora 19?

So the basic SDL2 development libraries are within the repositories and easily accessed with yum, but what about the other SDL based libraries? I'm talking about SDL2_image or SDL2_mixer etc. Is there any way to get and use those? Fallowing the instructions from a post on stack overflow (here), they seem to be downloaded but are they SDL2? Or are they SDL 1.2? It would be really nice to know where to get SDL2.
UPD as for SDL2_image, you can now install it with
$ sudo yum install SDL2_image
You can't install them from repos yet. I've just talked with SDL2 (co)maintainer, Igor Gnatenko, and he is willing to add these packages to Fedora repositories. So please wait a few days more.
yum install SDL_image* SDL_mixer*
This will include libraries and the devel package.

GL/glfw.h does not exist

I'm using Fedora 17 and compiling cocos2d-x. I've got an error at the compilation when I'm launching ./make-all-linux-project.sh.
G++ tells me that GL/glfw.h does not exist and then I yum install glew but it wasn't solved. So how can I solve this?
The package glew is actually the OpenGL Extension Wrangler. In this case your error is referring to a different package - GLFW. The problem with the build script you are trying to run is that it was made for deb-based systems, not rpm-based systems like Fedora. What's going to make this more difficult is that if you use YUM to download glfw and glfw-devel, they are not the version Cocos2d-x needs, so the build will fail. What you will need to do is first download a legacy version of glfw from Git Hub and build it from source.
git clone https://github.com/glfw/glfw-legacy.git
Once you build this package, you will need to modify the Cocos2d-x make file: $COCOS_ROOT/cocos2dx/proj.linux/cocos2dx.mk to include the legacy headers and also link to the legacy lib. The build should go smoothly after this, assuming all of your other dependencies are installed. You can refer to a blog post I put together for the detailed instructions: http://voidfuture.wordpress.com/2013/10/08/building-cocos2d-x-on-rhel-fedora-centos-linux/