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

Author Topic: Compiling SFML 2 with Visual Studio 2010  (Read 2843 times)

0 Members and 5 Guests are viewing this topic.

Ragnarok700

  • Newbie
  • *
  • Posts: 4
    • View Profile
Compiling SFML 2 with Visual Studio 2010
« on: June 09, 2011, 04:00:00 pm »
Hi!

I'm rather new to SFML and was very enthusiastic to start using it...

And then I tried to compile the source and it kinda didn't work. As said in the title, I'm using VS 2010 (ultimate).

Using CMake to configure for the VS2010 solution worked fine.

    I tried compiling individual parts of the solution to isolate the issues, and I can build all of them but "sfml-graphics" and the "ALL_BUILD" parts.

    The errors I get are usually returned from these external tools:
    CL.exe, cmd.exe, mt.exe, etc.


Any ideas on where to go from there ? The errors are very generic and not pointing in any direction (that I can see).

*EDIT: "Fixed" the issue. Forcing a rebuild repetitively eventually works.... for some reason, errors will be returned once in a while from the various projects, but they all eventually compile if you keep trying. I'm still confused as to why... if anybody knows :)

*EDIT #2: Actually, I might still have a relevant question. After rebuilding until it works, I'm left with the 5 dlls for the various parts of the library. That is all good and fine, but how do I obtain (compile ?) the .NET binding libraries ?

Ragnarok700

  • Newbie
  • *
  • Posts: 4
    • View Profile
SOLVED
« Reply #1 on: June 09, 2011, 04:59:46 pm »
Ah... nevermind where the bindings are... they are in the "bindings" folder, obviously....

I guess it's time for me to go get a coffee and some food... :S

Somehow I managed to miss that folder...!

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Re: SOLVED
« Reply #2 on: June 09, 2011, 05:02:39 pm »
Quote from: "Ragnarok700"
Ah... nevermind where the bindings are... they are in the "bindings" folder, obviously....

I guess it's time for me to go get a coffee and some food... :S

Somehow I managed to miss that folder...!


^^

People tend to ask first, then look. Good that you solved it anyway!
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Ragnarok700

  • Newbie
  • *
  • Posts: 4
    • View Profile
Compiling SFML 2 with Visual Studio 2010
« Reply #3 on: June 09, 2011, 05:27:15 pm »
Hey Groogy!

Yeah, I just didn't "see it" :P

Actually, I do have another issue with this.

At first, I built the .NET libraries using the batch file, which yielded x64 assemblies (running Windows XP Pro x64).

So, I included those in my references and added a the 5 SFML dlls as "Copy if newer" so that they would be found in the debug/release folders easily by the .exe.

Then, as I tried to run the project, it said it couldn't find the dlls. I noticed there was an extra "c" at the beginning of the name in the error message, so I renamed the dlls and it worked!

But now I recompiled the .NET assemblies into x86 and whatever I name the dlls it always complains that it cannot find them, even though they are still there. Any specific direction I should be searching towards to fix this ?

Thanks!

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Compiling SFML 2 with Visual Studio 2010
« Reply #4 on: June 09, 2011, 05:39:27 pm »
Erhm.. the c is because it's the csfml bindings. They got their own DLL if I remember right that you have to use instead. The .NET bindings are based on csfml and not directly on sfml.

Not sure though, I only use SFML C++ version and rbSFML.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

Ragnarok700

  • Newbie
  • *
  • Posts: 4
    • View Profile
Compiling SFML 2 with Visual Studio 2010
« Reply #5 on: June 09, 2011, 08:26:30 pm »
Hmm, that raises an interesting question then.

When I compile SFML 2, how do I force it to give me the right DLLs then ? :P

I haven't seen any info on the forums/tutorials/googling at all about this.
 
Any ideas would be great... I'll keep searching on my end and post any results I get...

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Compiling SFML 2 with Visual Studio 2010
« Reply #6 on: June 09, 2011, 08:52:41 pm »
You don't need to recompile SFML and CSFML to get the .Net binding, the up-to-date CSFML DLLs are already provided in bindings/dotnet/extlibs/bin.

SFML.Net is a self-contained library (and eventually it will move to its own separate repository).

So if you want SFML.Net you just need to recompile SFML.Net ;)
Laurent Gomila - SFML developer

 

anything