SFML community forums

General => General discussions => Topic started by: manasij7479 on September 01, 2011, 12:10:18 am

Title: Compiling the source on Fedora 15
Post 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:
Code: [Select]
./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:

Code: [Select]
../../../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 ?
Title: Compiling the source on Fedora 15
Post by: OniLinkPlus on September 01, 2011, 01:02:37 am
Add that include to SFML/System/ResourcePtr.inl.
Title: Compiling the source on Fedora 15
Post by: manasij7479 on September 01, 2011, 01:09:50 am
Quote from: "OniLink10"
Add that include to SFML/System/ResourcePtr.inl.


There isn't such a file in the source, or I'd have done that.
Title: Compiling the source on Fedora 15
Post by: Laurent on September 01, 2011, 08:00:10 am
The file exists, nothing is generated at compile time.
Title: Compiling the source on Fedora 15
Post by: AlexandreJ on September 15, 2011, 09:04:16 pm
@manasij7479

Have you find a solution to compile SFML ? I have the same problem under Fedora 15.
Title: Compiling the source on Fedora 15
Post by: Richy19 on September 15, 2011, 09:15:08 pm
Compiles fine on my pc
Fedora 15, g++ 4.6
Title: Compiling the source on Fedora 15
Post by: AlexandreJ on September 15, 2011, 09:24:56 pm
Strange, I download sdk sfml and I try to compile it with make :

Code: [Select]
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
Title: Compiling the source on Fedora 15
Post by: Richy19 on September 15, 2011, 09:32:48 pm
You do run CMake first right?
Title: Compiling the source on Fedora 15
Post by: AlexandreJ on September 15, 2011, 09:38:17 pm
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""
Title: Compiling the source on Fedora 15
Post by: Richy19 on September 15, 2011, 09:52:45 pm
get the cmake GUI
and follow this http://www.sfml-dev.org/tutorials/2.0/compile-with-cmake.php
Title: Compiling the source on Fedora 15
Post by: AlexandreJ on September 17, 2011, 03:45:11 pm
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
Title: Compiling the source on Fedora 15
Post by: Hiura on September 17, 2011, 04:12:08 pm
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:
Title: Compiling the source on Fedora 15
Post by: AlexandreJ on September 18, 2011, 11:38:24 am
I edit my /etc/ld.so.conf and add /usr/local/lib, run ldconfig to update. It works !
Title: Compiling the source on Fedora 15
Post by: on September 29, 2011, 12:32:10 pm
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/)