SFML community forums
General => General discussions => Topic started by: manasij7479 on September 01, 2011, 12:10:18 am
-
I apologize if this isn't the right place to post this. Kindly point me to it if it isn't.
I tried to compile the source because the binary installation could not find the shared library during runtime.
The error was:
./a: error while loading shared libraries: libsfml-system.so.1.6: cannot open shared object file: No such file or directory
So, I tried to compile(gcc-4.6 on Fedora 15) and got the following error message:
../../../include/SFML/System/ResourcePtr.inl: In constructor ‘sf::ResourcePtr< <template-parameter-1-1> >::ResourcePtr()’:
../../../include/SFML/System/ResourcePtr.inl:31:12: error: ‘NULL’ was not declared in this scope
../../../include/SFML/System/ResourcePtr.inl: In member function ‘void sf::ResourcePtr< <template-parameter-1-1> >::OnResourceDestroyed()’:
../../../include/SFML/System/ResourcePtr.inl:148:18: error: ‘NULL’ was not declared in this scope
Seeing NULL not declared, I added a
#include<cstddef>
in the initializer file in System/Unix/ and some other files alternatively.
<The files mentioned in the error are probably generated when make is running>
...but that did not solve the problem.
Any idea what to do ?
-
Add that include to SFML/System/ResourcePtr.inl.
-
Add that include to SFML/System/ResourcePtr.inl.
There isn't such a file in the source, or I'd have done that.
-
The file exists, nothing is generated at compile time.
-
@manasij7479
Have you find a solution to compile SFML ? I have the same problem under Fedora 15.
-
Compiles fine on my pc
Fedora 15, g++ 4.6
-
Strange, I download sdk sfml and I try to compile it with make :
g++ -o Image.o -c Image.cpp -W -Wall -pedantic -I../../../include -I../../ -O2 -DNDEBUG -fPIC -I/usr/include/freetype2
In file included from ../../../include/SFML/System/Resource.hpp:211:0,
from ../../../include/SFML/Graphics/Image.hpp:31,
from Image.cpp:28:
../../../include/SFML/System/ResourcePtr.inl: In constructor ‘sf::ResourcePtr< <template-parameter-1-1> >::ResourcePtr()’:
../../../include/SFML/System/ResourcePtr.inl:31:12: error: ‘NULL’ was not declared in this scope
In file included from ../../../include/SFML/System/Resource.hpp:211:0,
from ../../../include/SFML/Graphics/Image.hpp:31,
from Image.cpp:28:
../../../include/SFML/System/ResourcePtr.inl: In member function ‘void sf::ResourcePtr< <template-parameter-1-1> >::OnResourceDestroyed()’:
../../../include/SFML/System/ResourcePtr.inl:148:18: error: ‘NULL’ was not declared in this scope
make[2]: *** [Image.o] Error 1
make[2]: Leaving directory `/home/alexandre/Downloads/SFML-1.6/src/SFML/Graphics'
make[1]: *** [sfml-graphics] Error 2
make[1]: Leaving directory `/home/alexandre/Downloads/SFML-1.6/src/SFML'
make: *** [sfml] Error 2
-
You do run CMake first right?
-
Hum no, I'm trying but cmake need a parameters and if I specify a generator (?),
Error generated : "my directory don't contains "CMakeLists.txt""
-
get the cmake GUI
and follow this http://www.sfml-dev.org/tutorials/2.0/compile-with-cmake.php
-
Finally I used sdk version :
On Fedora 15 :
- dl SFML sdk
- run : su -c "make install"
- run : su -c "cp /usr/local/lib/libsfml* /usr/lib"
I think my path is configured in /usr/local/lib...
Thanks
-
instead of copying libraries files you should configure your OS to accept files in this directory. I think it's /etc/ldconfig or something that manages .so search path. Google should know better than me, though. :wink:
-
I edit my /etc/ld.so.conf and add /usr/local/lib, run ldconfig to update. It works !
-
Step 1 – Install the Adobe Flash player repository file
Step 2 – Import the Adobe GPG key
Step 3 – Install the Flash Player ensuring sound is enabled
Step 4 – Test the Flash plugin in Firefox
Cegonsoft (http://www.i3itpeople.com/)
_______________________
Cegonsoft foundation (http://www.i3itpeople.com/)