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

Author Topic: Problem when building for release  (Read 1720 times)

0 Members and 1 Guest are viewing this topic.

Leodido

  • Newbie
  • *
  • Posts: 10
    • View Profile
Problem when building for release
« on: September 08, 2010, 11:07:10 am »
Hello,
I finished my Tetris clone and so I'd like to build a release version.
To do this, I simply changed the Linker Input - Additional Dependencies - from sfml-system-d.lib to sfml-system.lib for all the used libs.

I then compiled, which went fine. The problem arises when I try to execute my program, with the version where I compile without debug info in dll it crashes directly. (I copied the correct dlls to the working dir btw sfml-system.dll etc...) its simply an memory access error. But if I compile with the sfml-system-d.lib files when executing it works correctly.

Any clue what I am doing wrong?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Problem when building for release
« Reply #1 on: September 08, 2010, 11:45:24 am »
To compile in release, you have to select the Release configuration for your project. What you did is to link to the release libraries in your Debug configuration, that's the reason why it crashed.
Laurent Gomila - SFML developer

Leodido

  • Newbie
  • *
  • Posts: 10
    • View Profile
Problem when building for release
« Reply #2 on: September 08, 2010, 11:58:40 am »
Ahh silly person that I am...

Thanks a lot fixed it of course ;)

One more question, when I launch my game there is that dos console always open behind, how to I remove it?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Problem when building for release
« Reply #3 on: September 08, 2010, 12:26:55 pm »
Linker --> system --> SubSystem --> Windows.

And link to sfml-main so that you can keep your main() entry point (otherwise it's WinMain, a non-portable Windows specific thing).
Laurent Gomila - SFML developer