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

Author Topic: DSFML2 Problems  (Read 26902 times)

0 Members and 1 Guest are viewing this topic.

Trass3r

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
DSFML2 Problems
« Reply #15 on: January 31, 2011, 08:00:44 pm »
Did you run it in a console window to see the output?
Any helpful error message?

RobotGymnast

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
DSFML2 Problems
« Reply #16 on: January 31, 2011, 08:02:41 pm »
The exact same error as given above. I did compile the DLLs and the libraries myself, so there's a chance I messed something up.

Edit: It's looking for DLLs of the form "csfml-*-2.dll" as well as those of the form "sfml-*-d-2.dll". Should this be happening?

Trass3r

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
DSFML2 Problems
« Reply #17 on: February 01, 2011, 10:30:55 pm »
Yes, the debug version searches for a debug version of the csfml dlls.
I'm currently converting everything to static dll loading, then you can use whatever version you want.

RobotGymnast

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
DSFML2 Problems
« Reply #18 on: February 01, 2011, 10:53:57 pm »
Quote from: "Trass3r"
Yes, the debug version searches for a debug version of the csfml dlls.
I'm currently converting everything to static dll loading, then you can use whatever version you want.


So it should be searching for TWO sets of DLLs? The ones that start with "csfml" don't have the "-d" in them, but the ones that start with "sfml" do.

Where should I be getting the second set of DLLs? Just renamed forms of the original ones? Because I'm getting symbol-finding errors..

Trass3r

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
DSFML2 Problems
« Reply #19 on: February 02, 2011, 09:04:56 am »
Not the sfml dlls. You may simply rename the csfml dlls as well.

Btw, I compile sfml as static libraries in both Debug and Release mode and after that compile csfml dlls in both modes.

RobotGymnast

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
DSFML2 Problems
« Reply #20 on: February 02, 2011, 04:12:55 pm »
Sorry, I'm a little confused. I've got my CMaked project, and now I build SFML as .libs, and link them in when I compile as .DLL?

Edit: Okay, my bad, I built the project of SFML, but not CSFML - no wonder the final DLLs weren't working. So I should compile the SFML project as .libs and statically link them into my CSFML project?

Hmm I get linker errors while trying to build SFML as DLLs (the default), but not when I set it compile as static libraries, which oddly enough still produces DLLs. I hope I can still statically link those..

The CSFML CMake configuration is failing, telling me I need to set SFML_DIR to a place where there's sfml-config.cmake, which doesn't exist. I tried setting it to the directory where my newly-compiled SFML DLLs were, and it didn't help.

Trass3r

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
DSFML2 Problems
« Reply #21 on: February 02, 2011, 05:52:06 pm »
If you build SFML as static libs, they will later be inserted into the csfml dlls. Thus you only have 1 dll per module.

The CSFML cmake stuff is somewhat messed up for me too.
I always have to specify the paths to the SFML libs manually.

RobotGymnast

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
DSFML2 Problems
« Reply #22 on: February 02, 2011, 06:15:07 pm »
I set it to build as static libs, but it still produced DLLs.. is that supposed to be happening?

I tried specifying SFML_DIR explicitly, but it still refused to Configure, because it was looking for sfml-config.cmake.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
DSFML2 Problems
« Reply #23 on: February 02, 2011, 06:17:29 pm »
Quote
The CSFML CMake configuration is failing, telling me I need to set SFML_DIR to a place where there's sfml-config.cmake, which doesn't exist. I tried setting it to the directory where my newly-compiled SFML DLLs were, and it didn't help.

Ignore sfml-config.cmake, this is the alternative way of doing things but nobody uses it. SFML_DIR must be set to the directory where SFML headers and libraries are installed (if it's not a standard path of your compiler).

Quote
The CSFML cmake stuff is somewhat messed up for me too.
I always have to specify the paths to the SFML libs manually.

And? CSFML and SFML are two separate projects, and since CSFML depends on SFML of course it needs to know where SFML is ;)
Don't be confused by the fact that their sources are both stored in the same repository.
Laurent Gomila - SFML developer

RobotGymnast

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
DSFML2 Problems
« Reply #24 on: February 02, 2011, 06:19:46 pm »
Headers and libraries have to be in the same folder? That would explain the problem. I only gave it the path to the libraries. Or rather, the path to the DLLs, since it refuses to produce static libraries.

Should I be moving the SFML DLLs somewhere after building them? The root folder checked out from SVN? The root folder produced by CMake? The root/extlibs folder?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
DSFML2 Problems
« Reply #25 on: February 02, 2011, 06:23:25 pm »
You're supposed to have a root directory with "include" and "lib" as sub-directories. Like in "/usr/include" and "/usr/lib". SFML_DIR must be the root ("/usr").
Laurent Gomila - SFML developer

Trass3r

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
DSFML2 Problems
« Reply #26 on: February 02, 2011, 06:26:33 pm »
Quote from: "Laurent"
And? CSFML and SFML are two separate projects, and since CSFML depends on SFML of course it needs to know where SFML is ;)
Don't be confused by the fact that their sources are both stored in the same repository.

Well, having to specify the paths for all 10 libraries (release+debug) is tedious. Maybe I'm missing something.

RobotGymnast

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
DSFML2 Problems
« Reply #27 on: February 02, 2011, 06:29:48 pm »
Quote from: "Laurent"
You're supposed to have a root directory with "include" and "lib" as sub-directories. Like in "/usr/include" and "/usr/lib". SFML_DIR must be the root ("/usr").


I have a lib folder produced by Visual Studio in the CMaked project; I have an include folder in the folder I checked out from SVN, and an include folder in the bindings/c subfolder, but I have no folder which contains both an include/ and a lib/ subfolder. Creating a lib subfolder in each of these locations, dragging the built DLLs into it, and setting SMFL_DIR in CMake doesn't change the message CMake gives in any way.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
DSFML2 Problems
« Reply #28 on: February 02, 2011, 06:38:35 pm »
Quote
Well, having to specify the paths for all 10 libraries (release+debug) is tedious. Maybe I'm missing something.

Yes. You just need to give the root of your SFML installation. And if it's a standard path (like on Linux) you don't need to set anything at all.

Quote
I have a lib folder produced by Visual Studio in the CMaked project; I have an include folder in the folder I checked out from SVN, and an include folder in the bindings/c subfolder, but I have no folder which contains both an include/ and a lib/ subfolder.

You miss the install step, things produced after compiling are not supposed to be properly organized.

Quote
Creating a lib subfolder in each of these locations, dragging the built DLLs into it, and setting SMFL_DIR in CMake doesn't change the message CMake gives in any way.

What's the exact error message?
Laurent Gomila - SFML developer

RobotGymnast

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
DSFML2 Problems
« Reply #29 on: February 02, 2011, 06:53:58 pm »
Quote from: "Laurent"

You miss the install step, things produced after compiling are not supposed to be properly organized.


Strange.. I built the entire solution. But it turns out that doesn't run INSTALL. Thanks.

Quote from: "Laurent"

What's the exact error message?


It's fixed now - it was just the message about needing to specify SFML_DIR or provide a .cmake file.

But now I'm getting linker errors when I try to compile the CSFML DLLs. I checked the linker dependencies, and it's certainly linking with the right DLLs.

 

anything