installing SDL on fedora - sdl

I installed FEDORA and SDL and wish to program graphics in C. on compilation, I am getting lot of undefined references to SDL_MapRGB, SDL_Init etc
I searched the file system SDL.dll is missing..
how to solve this problem?

Linux does not use .dll files for storing libraries, but .so.
Anyhow, to install SDL in fedora:
sudo yum install SDL*
This will install the complete SDL library with associated devel packages.
You will also probably want to install the Development Tools group of packages (for gcc and other build tools):
sudo yum groupinstall 'Development Tools'
When compiling, you will need to tell GCC which library to link:
gcc mycoolapp.c -o myapp -lSDL -lSDL_mixer

Related

How to compile with FLTK under Ubuntu

I am using Code:blocks under Ubuntu 12.04 LTS. I am attempting to compile my first program using FLTK and I get the following errors.
Linking console executable: bin/Debug/<project name removed for security reasons>
/usr/bin/ld: cannot find -lXft
/usr/bin/ld: cannot find -lfontconfig
/usr/bin/ld: cannot find -lfontconfig
/usr/bin/ld: cannot find -lXinerama
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
4 errors, 0 warnings
Is there something else I need to install, or a path I need to add?
To build an FLTK project in Code::Blocks 16.01 on UBUNTU 16.04.
Install FLTK and two additional packages:
$ sudo apt install fltk1.3-dev
$ sudo apt install libxft-dev
$ sudo apt install libxinerama-dev
After this, you can define an FLTK project, and build it without problems.
If you do not install the libxft-dev and libXinerama-dev packages, you will indeed get these error messages listed in question about missing libraries (-lXft, -lfontconfig, -lXinerama).
The reason these packages are not installed automatically with fltk1.3-dev is because they're only 'suggested', and not a hard dependency. This can be seen here:
package: libfltk1.3-dev
However, the 'fltk-config' flag which is used by Code:Blocks to decide what libraries to link in requires them.
For more detail on the fltk-config flag, see:
Beginners Guide to fltk-config
For completeness, here the links to the 2 additional packages:
package: libxft-dev
package: libxinerama-dev
The dev version of libraries used by FLTK might be missing http://packages.ubuntu.com/precise/libfltk1.3 .
You can use apt-get to install them : libxft-dev, libfontconfig1-dev and libxinerama-dev.
You obviously do not have libXft, libfontconfig and libXinerama installed on your machine. If you installed FLTK using Ubuntu package manager, then you should report missing dependency information in the FLTK package.
Typically we do this by finding out who is the package maintainer, and send e-mail to that person.
I managed to get code:blocks 13.12 working with FTLK on Raspberry Pi using Raspian. CodeBlocks gave me those same errors "cannot find -lXft" "cannot find -lfontconfig" and "cannot find -lXinerama".
I used the add/remove software provided with Raspian and searched for each of the following libraries libxft-dev, libfontconfig1-dev and libxinerama-dev and then I installed them using the package manager. When I restarted codeblocks FLTK worked fine!

BLAS library incompatible with Fortran 77 compiler settings

I'm trying to install Octave-3.6.2 from source on Ubuntu 12.04 with KDE desktop but when I run the Octave configure script I get this error
BLAS library was detected but found incompatible with your Fortran 77
compiler settings
I used ./configure F77=gfortran as was suggested by numerous web searches and I've ensured that the alternatives system F77 files are moved out of harms way as per the comments in this SO post. The installed BLAS libraries are those installed by the package manager.
What does the error mean and how do I remedy it?
Try installing the Package liblapack-dev, libblas-dev, and if it exists, libblas-64. While not Ubuntu, I had the same issue and needed to install the fedora fc20 equivalent packages which are blas-devel, blas64-devel, lapack-devel, and lapack64-devel. The standard routine for getting the build dependencies is
sudo yum-builddep octave
While that installed most of the dependencies, I needed to follow with the following before it would completely configure. This is from an almost scratch Fedora fc20 install with updates as of 10/23/2014.
sudo yum install lapack64-devel lapack64
sudo yum install gl2ps-devel qrupdate-devel qt-devel qscintilla-devel java-devel
Although I did not explicitly list the blas-devel and blas64-devel packages, they were installed as dependencies of the libpack packages as was libpack-devel and plain libpack.
I suppose for Ubuntu it may be apt-get. Either way, here is another post that talks about an earlier version of Ubuntu.
BLAS and LAPACK libraries required for compiling
I fixed this problem by moving the BLAS to /usr/lib64.
for slackware recompile blas using -libdir=/usr/lib64
Run sudo apt-get build-dep octave
This will install all dependencies for octave
I was compiling octave-4.0.1 on openSUSE-12.3_x86-64 and met this problem. Before this, the blas lib (libblas3) was already installed. Then I installed the 32bit lib (libblas3-32bit), nothing changed. Then I installed the package named "blas-devel", it's resolved.
That package includes these files:
/usr/lib64/libblas.a
/usr/lib64/libblas.so
/usr/lib64/libblas_pic.a

Linux beginner, Where to put boost libraries?

I'm not extremely familiar with the linux filesystem, having moved from windows, but I do have a decent amount of experience with C++ and the Boost libraries in windows. Having switched Fedora 17, can anyone tell me if there is a certain directory where I should install Boost to get it working the gnu compiler?
Note: if it matters, I don't use an IDE I use vim for most of my programming.
There are a few ways of setting up the boost libraries on linux.
Save yourself some pain, use your package manager to install the Boost libs. You'll be grateful in the long run.
If you absolutely must do it yourself, simply put it anywhere so long as it's in the gcc include path. This is /usr/local/include/ or /usr/include/ for headers and /usr/local/lib/ or /usr/lib/ for libraries
Finally if for some reason that isn't possible, use the -I switch with g++ to specify the path to boost. (but this would only be necessary if 1 and 2 aren't possible)
Use your package manager to install boost libraries, for debian ubuntu it is like:
sudo aptitude install libboost-system1.49.0-dev
for centos6 it is
yum install boost-devel
I had issues installing boost using yum (recently installed Fedora 17)..
so I unzipped the boost tar ball to my /opt.
so g++ -I /opt/boost/boost_1_51_0 works like a charm.
From the introduction to boost:
http://www.boost.org/doc/libs/1_51_0/more/getting_started/unix-variants.html
you can put it anywhere you like. And then you compile with something like this
c++ -I path/to/boost_1_51_0 example.cpp -o example \
-L~/boost/stage/lib/ -lboost_regex-gcc34-mt-d-1_36
"c++" can be g++ or clang++ for example.

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.
"