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

Author Topic: sfml on 64bit archetecture  (Read 7219 times)

0 Members and 1 Guest are viewing this topic.

Sirt

  • Newbie
  • *
  • Posts: 27
    • View Profile
sfml on 64bit archetecture
« on: September 07, 2010, 11:59:27 am »
Does sfml work on 64bit computers....
I have an acer with windows 7 inhstalled and the setup tutorial program crashs on startup.

Code: [Select]

#include <cstdlib>
#include <iostream>

#include <SFML/System.hpp>

int main()
{
sf::Clock Clock;
    while (Clock.GetElapsedTime() < 50.f)
    {
        std::cout << Clock.GetElapsedTime();
        sf::Sleep(0.5f);
    }

    system("pause");
    return 0;
}


Never had this problem on xp!

Spodi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://www.netgore.com/
sfml on 64bit archetecture
« Reply #1 on: September 07, 2010, 11:23:45 pm »
Don't think it works as a 64-bit application, but no reason why you can't just build it as a 32-bit application.

Sirt

  • Newbie
  • *
  • Posts: 27
    • View Profile
sfml on 64bit archetecture
« Reply #2 on: September 08, 2010, 12:07:42 pm »
I'll look in msvc++ to see if there is an option to build for 32bit.
If it's more involved than that though perhaps you might throw me some tips.
Thanks for the reply at any rate.

AdventWolf

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
sfml on 64bit archetecture
« Reply #3 on: September 11, 2010, 10:19:31 pm »
I use w7 64 bit so you should be good to go.

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
sfml on 64bit archetecture
« Reply #4 on: September 13, 2010, 03:09:37 am »
Sirt, give us a debugging backtrace. You probably linked it wrong.

Zweistein

  • Newbie
  • *
  • Posts: 29
    • View Profile
sfml on 64bit archetecture
« Reply #5 on: September 13, 2010, 05:26:13 pm »
Quote
I use w7 64 bit so you should be good to go.

I guess you are using SFML in 32bit mode on a 64bit OS.
But can we use sfml as 64bit library? i guess i only have to recompile it for x64 architecture?

devlin

  • Full Member
  • ***
  • Posts: 128
    • View Profile
sfml on 64bit archetecture
« Reply #6 on: January 12, 2011, 12:38:51 pm »
It does work as 64-bit library on a 64-bit architecture - however, getting it to work isn't all that easy. (word of warning though: the resulting executable will not start on a 32-bit architecture - unlike using a 32-bit library on a 64-bit architecture).

Basically you'll have to compile it for 64-bit (with for instance Visual Studio's 64-bit command prompt so that CMake adds the /machine:x64 to the appropriate compilers/linkers).

However, this isn't enough - the extlib stuff like jpeg, glew etc provided in the subversion repo are 32-bit only. There's another thread on this forum with appropriate ones for 64-bit compilation, you have to move the old 32-bit ones away and add the 64-bit ones in place to get those to work.

After that, what remains is libsndfile-1.dll, the one provided in the subversion repo is 32-bit only, but you can download the 64-bit one from their website.

I have all the files required at home (at work now) if that would be of any help. It would be nice if they were included by default into the subversion repo however.

i.e:

extlib/msvc/x64

so that linking to the proper libs when compiling sfml is as easy as changing the library path.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
sfml on 64bit archetecture
« Reply #7 on: January 12, 2011, 07:17:16 pm »
Quote
I have all the files required at home (at work now) if that would be of any help. It would be nice if they were included by default into the subversion repo however

This is exactly what I wanted to do. Please send me all this stuff and I'll be glad to add it to the repo ;)
Laurent Gomila - SFML developer

devlin

  • Full Member
  • ***
  • Posts: 128
    • View Profile
sfml on 64bit archetecture
« Reply #8 on: January 12, 2011, 07:33:04 pm »
Quote from: "Laurent"
Quote
I have all the files required at home (at work now) if that would be of any help. It would be nice if they were included by default into the subversion repo however

This is exactly what I wanted to do. Please send me all this stuff and I'll be glad to add it to the repo ;)

PM sent.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
sfml on 64bit archetecture
« Reply #9 on: January 12, 2011, 08:36:20 pm »
Thanks.
Laurent Gomila - SFML developer