fatal error: glfw3.h: No such file or directory - glfw

Using Ubuntu 16.04 LTS
I have cloned a repo that has nice software in it, however, I can't
find any valid instructions for solving the following issue.
When I try and build the software it sayes.
main.cpp:12:19: fatal error: glfw3.h: No such file or directory
I assume I need to install glfw3, also "locate glfw3" etc. returns nothing. My main.cpp program has this in it "#include "
How do you fix this ?
Thanks,

this may help
sudo apt-get install libglfw3 libglfw3-dev
and while including
#include <GLFW/glfw3.h>

$ apt-cache search glfw3
libglfw3 - portable library for OpenGL, window and input (libraries)
libglfw3-dev - portable library for OpenGL, window and input (development files)
libglfw3-doc - portable library for OpenGL, window and input (documentation)
So, just apt-get install it.
This approach shall be standard for any Ubuntu user.

Related

KDevelop include QtGui not found

I'm trying to learn how to use KDevelop on my Ubuntu 16.04 to write C++ code, and I installed it by doing this
sudo apt-get update
sudo apt-get install kdevelop
but after it is done installing and I'm trying to make a new project, and the lines at the top that says
#include <QtGui/QApplication>
and
#include <QtGui/QLabel>
#include <QtGui/QMenu>
#include <QtGui/QMenuBar>
#include <QtGui/QAction>
are all returning errors saying that the included files are not found? And ask me to add a custom include path. I checked my KDevelop version on the terminal and it says I have Qt, or at least I think that's what it meant.
~$ kdevelop --version
Qt: 4.8.7
KDE Development Platform: 4.14.16
KDevelop: 4.7.3
But then when I run
~$dpkg --list libqt4-dev
~$dpkg --list libqt4-core
~$dpkg --list libqt4-gui
and it says none of them are installed. I'm so confused. Do I have the right Qt or not? How do I get KDevelop to find the correct Qt path? Should I maybe just install all the libqt4-whatever and try again?
Remember to distinguish between libraries that allow you to run a software and developer versions that allow to build new sotfware. Output of kdevelop --version states versions of the libraries which are used to run the application. In your system you are missing qttools5-dev with its dependencies.
By the way, maybe you will try qtCreator? It is an IDE developed by Qt team, and if you install it just by apt install qtcreator than you will have all necessary dev libs.

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.

Boost "no such file or directory"

I'm trying to set up my Code::Blocks work environment on a new computer and I'm having some problems. It's been a long time since I first did this, and now when I open my major project Boost is causing me problems.
I'm fairly new to C++ still and fixing this type of problem is something I have limited experience with.
When I open my project and try to compile it, I get this error:
fatal error: boost/algorithm/string.hpp: No such file or directory|
At this part of one of my header files:
#include <boost/algorithm/string.hpp>
I placed the Boost v1.51.0 library at C:\boost since that is where I'd had it on my other computer. My project is set to search that directory for additional includes but it doesn't seem to be finding the files?
My project used an older version of Boost previously but I doubt that's an issue.
I'm not sure how difficult it is to debug this problem with this limited information so if there's anything else I can provide please let me know.
I'm using Code::Blocks, and have just set up minGW and Visual C++ 2010.
In Ubuntu use
sudo apt-get install libboost-dev
Ensure that you have installed boost-devel package
In Centos execute as root:
yum install boost-devel
then
root#centos6 /]# find / -name boost
/usr/include/boost
/usr/lib64/boost
[root#centos6 /]#

Failed to compile wxWidgets-2.9.2 on Kubuntu11.10(64bit) with '--with-opengl' flag

I tried to compile wxWidgets-2.9.2 with opengl support by calling
configure --with-opengl
But it failed when the configure script tried to locate the lib files of opengl
checking for GL/gl.h... yes
checking for GL/glu.h... yes
checking for -lGL... no
checking for -lMesaGL... no
configure: error: OpenGL libraries not available
However, I checked /usr/lib and found that there is libGL.so in that directory. Actually, before trying to compile wxWidgets-2.9.2, I had written several opengl programs and all were successfully compiled and run. Could someone help me to fix this?
This is actually a bug in the configure script, please see
http://trac.wxwidgets.org/ticket/13375.
The solution is to download the latest codes from
http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk/
Or you can select to overwrite only the configure,acinclude.m4 files.
Have you tried installing the free implementation?
sudo apt-get install libglw1-mesa libglw1-mesa-dev
Are you running proprietary drivers from Nvidia or something? I think it messes around with the OpenGL environment while installing. Perhaps, it is worth trying to go back the the opensource ones if this is the case.
There is also a know issue OpenGL libs not located by 'configure' in debian testing
First of all check if opengl libs are installed! them --->
we need to change Configure file on source! check this link:
http://trac.wxwidgets.org/ticket/13376
the same issues arise on ubuntu 12.04!
I also met the same problem when trying to compile wxWidgets3.1.0 --with-opengl on Debian Jessie x86_64. I tried
SEARCH_LIB="`echo "$SEARCH_INCLUDE" | sed s#include#$wx_cv_std_libpath#g` /usr/$
wx_cv_std_libpath /usr/lib/i386-linux-gnu /usr/lib/x86_64-linux-gnu"
and
pkg-config --variable=libdir gl
/usr/lib/x86_64-linux-gnu
and
sudo apt-get install libglw1-mesa libglw1-mesa-dev
but:
OpenGL libraries not available
I then tried
sudo apt-get install glutg3-dev
but:
glutg3-dev is not found.
So I searched for the alternative to glutg3-dev in Jessie and I tried
sudo apt-get install freeglut3-dev
then it worked!
Installing mesa didn't help for me, but installing glutg3-dev did the trick
sudo apt-get install glutg3-dev

reinstalling sdl manually on buntu

I am new to doing manually installing.
I reinstalled sdl manually, now everytime I run pygame or a game that uses SDL (eg. solarwolf or supertux) I get the message: Unsupported console hardware.
I know my computer can run SDL, because it worked prior to the reinstallation.
I want to now how I can reinstall SDL properly, so that pygame will work again.
versions:
ubuntu: Ubuntu 10.04 LTS Lucid Lynx
sdl: 1.2.14
Stuff I have tried:
1)
I have tried this commandoes I found on the net:
wget http://www.libsdl.org/release/SDL-1.2.14.tar.gz
tar -xzvf SDL-1.2.14.tar.gz
cd SDL-1.2.14
./configure --prefix=$HOME
make
make install
2)
I tried again with sudo and no prefix. Maybe that wrecked some prior configurationsfile or something?
wget http://www.libsdl.org/release/SDL-1.2.14.tar.gz
tar -xzvf SDL-1.2.14.tar.gz
cd SDL-1.2.14
./configure
make
sudo make install
3)I used the Synaptic Package Manager to completely remove and reinstall all files starting with libsdl.
4)I have tried reinstalling supertux and solarwolf (with ubuntu software senter)
hoping it could resolve the problem if there were some missing dependencies.
Conclusion. I geuss a have installed sdl, but wrecked a confirgurationfile or something preventing communication between sdl and the graphic driver.
But that is a wild guess.
This sounds strange.
try: sudo ldconfig
from man ldconfig
"ldconfig creates, updates, and removes the necessary links and cache
(for use by the run-time linker, ld.so) to the most recent shared
libraries found in the directories specified on the command line, in
the file /etc/ld.so.conf, and in the trusted directories (/usr/lib and
/lib). ldconfig checks the header and file names of the libraries it
encounters when determining which versions should have their links
updated. ldconfig ignores symbolic links when scanning for libraries.
"