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

Author Topic: Cant use sfml. I am sad.  (Read 2680 times)

0 Members and 1 Guest are viewing this topic.

zombiekiller222

  • Guest
Cant use sfml. I am sad.
« on: August 14, 2011, 04:05:46 am »
I am sad :(

I used sfml with c++ and really enjoyed it, but it seemed to too complex for my projects, where speed is not an issue. I learned of a langauge named c# which was (reasonably) fast and is also cross-platform. I downloaded mono/monodevelop and learned the basics in a week or so.

The problems started when I wanted to use c# with sfml. I downloaded the sfml .net package. I wanted to run the .exes to check that it didnt lag. I copied the .dll's into the SAMPLES/BIN folder, and ran one.

'opengl.exe has crashed.'

'postfx.exe has crashed.'

and it happened to the others as well. So I thought I might recompile the samples.

I managed to open some random solution folder, but...
I didn't even know how to USE an external library in one of my projects. The samples DID seem to compile (maybe becuase they were a child of the solution?). They just didnt run, as they crashed :(

I even made a really simple project using SFML on my own, but it didn't run either. It compiled, but when I ran it, it crashed ('game.exe has crashed').

1. How do use the solution/library in my own solution?
2. How do I make my .exes run properly?

If it helps, im using windows 7 x64.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Cant use sfml. I am sad.
« Reply #1 on: August 14, 2011, 09:45:17 am »
Are you talking about SFML or SFML.Net?

For SFML, just follow the tutorials, everything is explained and detailed with screenshots.
Laurent Gomila - SFML developer

zombiekiller222

  • Guest
Cant use sfml. I am sad.
« Reply #2 on: August 14, 2011, 10:22:53 am »
Sfml.net. How would I compile a c++ sample in a c# compiler?

Even if it was sfml, if the executables compiled by a sfml developer (NOT ME) dont work, something strange is going on (the ones I compiles don't work either, I managed to compile the sfml.net samples by making them a child of the SFML solution).

Should I post a .exe for you guys to test? Maybe it's just both .net and mono are broken, and the .exes are valid.

BTW, here is a topic by someone with the EXACT same problem with me. http://www.sfml-dev.org/forum/viewtopic.php?p=32264&sid=0c8d02c5a1b53bb5c922eba6d9d7a790

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Cant use sfml. I am sad.
« Reply #3 on: August 14, 2011, 10:57:29 am »
Well, precompiled executables are for Windows, they won't work on Linux. I don't even know if Mono is supposed to use Windows DLLs or Linux shared libraries -- in this case you'll have to recompile CSFML as well.
Laurent Gomila - SFML developer

zombiekiller222

  • Guest
Cant use sfml. I am sad.
« Reply #4 on: August 14, 2011, 11:45:21 am »
I am running on windows. I said it at the bottom of my first post.
Quote from: "zombiekiller222"

If it helps, im using windows 7 x64.

The examples simply crash, even with ALL the dll's.

Thanks for the quick replies BTW.

Serapth

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Cant use sfml. I am sad.
« Reply #5 on: August 16, 2011, 11:59:18 pm »
I was curious so I gave this a shot and managed to get exactly the same response.

http://flexapic.com/g.ashx?id=7433


Recompiled the SFML and SFML.net DLLs and the error reoccured.

Then I considered bitness, went into the opengl sample and reconfigured it to X86 and everything worked fine.

So either you need to rebuild all the DLLs for 64bit, or compile you code as X86, your call.

To change the compiler settings go:

Right click your project in Solution Explorer
Select Properties
Select Build
Change Platform Target: to X86

Like this:

http://flexapic.com/g.ashx?id=7435

 

anything