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

Author Topic: Using edge version on linux  (Read 8433 times)

0 Members and 2 Guests are viewing this topic.

farnoy

  • Newbie
  • *
  • Posts: 14
    • View Profile
Using edge version on linux
« on: August 14, 2011, 08:23:23 pm »
Hi,

I was using SFML 2.0 with C++, but now i wanted to change for C#. I'm using mono and I've compiled SFML.Net with Tao framework. I've copied csfml-window lib at version 1.99.git20110616-1 with command:

Code: [Select]
cp /usr/lib/libcsfml-window.so ./libcsfml-window-2.so

Following output appears:

Code: [Select]
Mono: DllImport attempting to load: 'csfml-window-2'.
Mono: DllImport loading library: '/home/kuba/devel/SFML.Net/examples/window/libcsfml-window-2'.
Mono: Searching for 'sfWindow_Create'.
Mono: Probing 'sfWindow_Create'.
Mono: Found as 'sfWindow_Create'.
mono: symbol lookup error: /home/kuba/devel/SFML.Net/examples/window/libcsfml-window-2: undefined symbol: _ZNK2sf6Window8GetInputEv


I don't know where to go from now. Using libraries for windows doesn't seem reasonable and I would bet on version differences. Isn't SFML.Net edge aiming 2.0?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Using edge version on linux
« Reply #1 on: August 14, 2011, 11:18:54 pm »
I don't know if Mono wants Linux shared libraries or Windows DLLs. Try to recompile CSFML for Linux, and replace the CSFML DLLs with it.
Laurent Gomila - SFML developer

farnoy

  • Newbie
  • *
  • Posts: 14
    • View Profile
Using edge version on linux
« Reply #2 on: August 14, 2011, 11:31:32 pm »
It's loading csfml, but fails to find something inside, so what csfml version is SFML.Net targeting?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Using edge version on linux
« Reply #3 on: August 15, 2011, 10:37:21 am »
Quote
It's loading csfml

Are you sure? The lib is not named libcsfml-window-2.

Quote
so what csfml version is SFML.Net targeting?

The one which is provided in its exlibs directory.
Laurent Gomila - SFML developer

farnoy

  • Newbie
  • *
  • Posts: 14
    • View Profile
Using edge version on linux
« Reply #4 on: August 15, 2011, 11:42:26 am »
Code: [Select]
/usr/lib/libcsfml-window.so => /usr/lib/libcsfml-window.so.2 => /usr/lib/libcsfml-window.so.2.0

I'll try to recompile edge version of CSFML, the one I have is from 16th June, maybe something changes from that date.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Using edge version on linux
« Reply #5 on: August 15, 2011, 02:58:10 pm »
Yeah... This is one that you compiled yourself, SFML.Net is supposed to use the latest version of SFML (I always keep them synchronized).
Laurent Gomila - SFML developer

farnoy

  • Newbie
  • *
  • Posts: 14
    • View Profile
Using edge version on linux
« Reply #6 on: August 15, 2011, 05:06:11 pm »
I can't compile CSFML:

Code: [Select]
kuba:CSFML$ make
Found SFML: /usr/include
-- Configuring done
CMake Error at cmake/Macros.cmake:58 (add_library):
  Cannot find source file:

    /home/kuba/devel/CSFML/src/SFML/Graphics/RenderImage.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx
Call Stack (most recent call first):
  src/SFML/Graphics/CMakeLists.txt:44 (csfml_add_library)


It would look like there's old SFML CMakeLists.txt and new files (not RenderImage, but RenderTexture), when I rename files in CMakeLists to use those texture files it fails with:

Code: [Select]
In file included from /home/kuba/devel/CSFML/src/SFML/Graphics/FontStruct.h:32:0,
                 from /home/kuba/devel/CSFML/src/SFML/Graphics/Font.cpp:29:
/home/kuba/devel/CSFML/src/SFML/Graphics/TextureStruct.h:31:37: fatal error: SFML/Graphics/Texture.hpp: No such file or directory
compilation terminated.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Using edge version on linux
« Reply #7 on: August 15, 2011, 07:03:05 pm »
Sorry, a file was outdated. It's fixed now.
Laurent Gomila - SFML developer

farnoy

  • Newbie
  • *
  • Posts: 14
    • View Profile
Using edge version on linux
« Reply #8 on: August 15, 2011, 07:09:01 pm »
Pulled your changes, but I'm still getting similar error:

Code: [Select]
[ 51%] Building CXX object src/SFML/Graphics/CMakeFiles/csfml-graphics.dir/Font.cpp.o
In file included from /home/kuba/devel/CSFML/src/SFML/Graphics/FontStruct.h:32:0,
                 from /home/kuba/devel/CSFML/src/SFML/Graphics/Font.cpp:29:
/home/kuba/devel/CSFML/src/SFML/Graphics/TextureStruct.h:31:37: fatal error: SFML/Graphics/Texture.hpp: No such file or directory
compilation terminated.


Edit:

And then when I copy Texture.hpp to CSFML/src/SFML/Graphics I get this:

Code: [Select]
/home/kuba/devel/CSFML/src/SFML/Graphics/Font.cpp: In function ‘const sfTexture* sfFont_GetTexture(sfFont*, unsigned int)’:
/home/kuba/devel/CSFML/src/SFML/Graphics/Font.cpp:154:54: error: ‘class sf::Font’ has no member named ‘GetTexture’


Are you changing spec for 2.0 with deleting GetTexture() from sf::Font? If so, documentation is not refreshed and I think and bindings are outdated. http://www.sfml-dev.org/documentation/2.0/classsf_1_1Font.php#a0879bdd56d69b22fb93d0948150e0d10

Edit2:

Seems like developing using unstable bindings won't work here, but there are no tags on git for earlier version, like 1.6.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Using edge version on linux
« Reply #9 on: August 15, 2011, 07:26:30 pm »
Now it's your version of SFML which is not up-to-date.

Bindings are stable, just pull the latest revision of everything.
Laurent Gomila - SFML developer

farnoy

  • Newbie
  • *
  • Posts: 14
    • View Profile
Using edge version on linux
« Reply #10 on: August 15, 2011, 07:30:49 pm »
The Texture.hpp header is up to date from git. Is CSFML using SFML from /usr/include (installed on system)?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Using edge version on linux
« Reply #11 on: August 15, 2011, 07:32:59 pm »
Quote
The Texture.hpp header is up to date from git

How can it be up-to-date, the compiler doesn't even find it?

Quote
Is CSFML using SFML from /usr/include (installed on system)?

Yes.
Laurent Gomila - SFML developer

farnoy

  • Newbie
  • *
  • Posts: 14
    • View Profile
Using edge version on linux
« Reply #12 on: August 15, 2011, 07:34:54 pm »
Texture.hpp wast taken from git repo of SFML.
So the issue lies in outdated sfml on my system (28th July).

farnoy

  • Newbie
  • *
  • Posts: 14
    • View Profile
Using edge version on linux
« Reply #13 on: August 15, 2011, 07:37:45 pm »
Yup, everything is working fine now, only when building audio binding in CSFML:
Code: [Select]
In file included from /home/kuba/devel/CSFML/src/SFML/Audio/SoundRecorder.cpp:28:0:
/home/kuba/devel/CSFML/include/SFML/Audio/SoundRecorder.h:36:66: error: ‘size_t’ has not been declared


I don't need audio lib atm so I'll try with SFML.Net now.

farnoy

  • Newbie
  • *
  • Posts: 14
    • View Profile
Using edge version on linux
« Reply #14 on: August 15, 2011, 07:40:35 pm »
Working fine, thanks for your help. Now I don't have to worry about C++.

 

anything