Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Compiling the source on Fedora 15  (Read 6403 times)

0 Members and 3 Guests are viewing this topic.

manasij7479

  • Newbie
  • *
  • Posts: 7
    • View Profile
Compiling the source on Fedora 15
« 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 ?

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Compiling the source on Fedora 15
« Reply #1 on: September 01, 2011, 01:02:37 am »
Add that include to SFML/System/ResourcePtr.inl.
I use the latest build of SFML2

manasij7479

  • Newbie
  • *
  • Posts: 7
    • View Profile
Compiling the source on Fedora 15
« Reply #2 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Compiling the source on Fedora 15
« Reply #3 on: September 01, 2011, 08:00:10 am »
The file exists, nothing is generated at compile time.
Laurent Gomila - SFML developer

AlexandreJ

  • Newbie
  • *
  • Posts: 16
    • View Profile
Compiling the source on Fedora 15
« Reply #4 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.

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Compiling the source on Fedora 15
« Reply #5 on: September 15, 2011, 09:15:08 pm »
Compiles fine on my pc
Fedora 15, g++ 4.6

AlexandreJ

  • Newbie
  • *
  • Posts: 16
    • View Profile
Compiling the source on Fedora 15
« Reply #6 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

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Compiling the source on Fedora 15
« Reply #7 on: September 15, 2011, 09:32:48 pm »
You do run CMake first right?

AlexandreJ

  • Newbie
  • *
  • Posts: 16
    • View Profile
Compiling the source on Fedora 15
« Reply #8 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""

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
Compiling the source on Fedora 15
« Reply #9 on: September 15, 2011, 09:52:45 pm »

AlexandreJ

  • Newbie
  • *
  • Posts: 16
    • View Profile
Compiling the source on Fedora 15
« Reply #10 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

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Compiling the source on Fedora 15
« Reply #11 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:
SFML / OS X developer

AlexandreJ

  • Newbie
  • *
  • Posts: 16
    • View Profile
Compiling the source on Fedora 15
« Reply #12 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 !

  • Guest
Compiling the source on Fedora 15
« Reply #13 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
_______________________
Cegonsoft foundation