Jump to content
  • Advertisement
itachii

Setting up SFML with visual studios

Recommended Posts

i am having a really hard time setting up sfml with visual studios and have try a number of sources already and was wondering if somebody could help me out 

Share this post


Link to post
Share on other sites
Advertisement

sorry it took me so long to respond i just go frustrated and left my laptop alone for a minute.

but this is my problem i set up everything right and followed all the directions on the website but i think the problem is that i did extract the right file to the right place. 

Capture.PNG

Capture(2).png

Edited by itachii

Share this post


Link to post
Share on other sites

In your project go to: 

image.png.fe8ff3b4552f097584d8e2cd2b1c70fd.png

Click on where I have the circle under DEBUG MODE - then click EDIT.

Then paste the proper lib references under Additional Dependencies:

sfml-graphics-s-d.lib
sfml-window-s-d.lib
sfml-system-s-d.lib
sfml-main-d.lib
freetype.lib
opengl32.lib
winmm.lib
sfml-audio-s-d.lib
openal32.lib
flac.lib
vorbisenc.lib
vorbisfile.lib
vorbis.lib
ogg.lib

image.png.a697f80ba401e5e6571f4b1cbc70676c.png

Do the same for RELEASE mode:

sfml-graphics-s.lib
sfml-window-s.lib
sfml-system-s.lib
sfml-main.lib
freetype.lib
opengl32.lib
winmm.lib
sfml-audio-s.lib
openal32.lib
flac.lib
vorbisenc.lib
vorbisfile.lib
vorbis.lib
ogg.lib

Then you can link statically: 

image.png.936356c824255c53829159c19dcaada3.pngWith All Configurations selected, add: SFML_STATIC

If you don't want static linking then don't add SFML_STATIC, but keep in mind you'll need to include the .dll files with your EXE, and don't reference any of the lib files with "s", example: sfml-graphics-s-d.lib - use: sfml-graphics-d.lib (just remove the -s

For Debug:

sfml-graphics-d.lib
sfml-window-d.lib
sfml-system-d.lib
sfml-main-d.lib
freetype.lib
opengl32.lib
winmm.lib
sfml-audio-d.lib
openal32.lib
flac.lib
vorbisenc.lib
vorbisfile.lib
vorbis.lib
ogg.lib

 

For Release:

sfml-graphics.lib
sfml-window.lib
sfml-system.lib
sfml-main.lib
freetype.lib
opengl32.lib
winmm.lib
sfml-audio.lib
openal32.lib
flac.lib
vorbisenc.lib
vorbisfile.lib
vorbis.lib
ogg.lib

The above will also depend on what you're including, so use the guide as reference on the SFML site.

Let me know if this works.

Share this post


Link to post
Share on other sites
3 minutes ago, itachii said:

this happen when i try static linking

Capture(3).PNG

This will only happen if you have the wrong "sfml-graphics-s-d.lib" and "sfml-graphics-s.lib" listed.

Please copy and paste your list for both DEBUG and RELEASE so I can see what you have.

Also if you run in DEBUG mode do you have the same issue?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!