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

Author Topic: how to build game as release mode using visual studio code  (Read 1401 times)

0 Members and 1 Guest are viewing this topic.

OUTSEET

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
how to build game as release mode using visual studio code
« on: July 30, 2022, 02:32:27 pm »
so i have a game and it's running slow with debug and the console window is bad so how I can build my game in release mode using visual studio code because I have linux and I don't use visual studio :(

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11031
    • View Profile
    • development blog
    • Email
Re: how to build game as release mode using visual studio code
« Reply #1 on: August 02, 2022, 12:41:39 am »
If you're on Linux chances are that it's already being built in release mode, otherwise you'll need to remove the -g flag from the compiler statement. Not sure if VS Code offers some option to easily switch between the two.

Also make sure to install a proper GPU driver.

Since you don't really offer any other information, it's kind of hard to help you.

Personally, I recommend using CMake, that way you could even use it with VS on Windows and other CMake-compatible IDE (e.g. Qt Creator, CLion, etc.). See here a simple CMake template: https://github.com/eXpl0it3r/cmake-sfml-project
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/