SFML community forums

Help => General => Topic started by: CrazyDutchReaper on January 31, 2017, 03:49:19 pm

Title: SFML 2.4.1 installation with VS 2015 CE problem [SOLVED]
Post by: CrazyDutchReaper on January 31, 2017, 03:49:19 pm
Good day!

I have followed the tutorial for linking the SFML files to VS and come to a problem which is rather annoying.
When I selext x86, I get no red underlinings, meaning VS can find everything. But when I press F5 get the error:
1>sfml-graphics-d.lib(sfml-graphics-d-2.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

So I switched it to x64, but now quite a few lines have red underlinings and I get the error:
1>c:\game\game\main.cpp(1): fatal error C1083: Cannot open include file: 'SFML/Graphics.hpp': No such file or directory

I use Visual Studio 2015 community edition and have downloaded SFML-2.4.1-windows-vc14-64-bit.
I honestly do not understand why it is not finding the files on x64, perhaps someone else has encountered this issue?

Greatings!
Title: Re: SFML 2.4.1 installation with VS 2015 CE problem
Post by: eXpl0it3r on January 31, 2017, 05:41:40 pm
x86 and x64 have each their own configurations, you need to reconfigure the project once you switch.
Title: Re: SFML 2.4.1 installation with VS 2015 CE problem
Post by: Hapax on January 31, 2017, 05:45:04 pm
eXpl0it3r beat me to the different configurations explanations but your linking error is because you need to have the appropriate DLLs in the folder next to the executable.

Note also that you can change configuration and platform to change both/all at once.
Title: Re: SFML 2.4.1 installation with VS 2015 CE problem [SOLVED]
Post by: CrazyDutchReaper on January 31, 2017, 08:11:13 pm
Thanks!

I assumed that when you select 'All Configurations' it also did the whole x86/x64 thing. But it seems not.
This solved it, thank you very much!