SFML community forums

Help => General => Topic started by: Setsuna on September 08, 2012, 04:07:57 am

Title: Error when compiling SFML2 in MSVS2010
Post by: Setsuna on September 08, 2012, 04:07:57 am
hi guys,

i've downloaded the source, created the sln for MSVS2010 with Cmake and when trying to compile i get this:

http://ideone.com/2qMbN (http://ideone.com/2qMbN)

The main problem seems to be this:

>LINK : fatal error LNK1181: cannot open input file '..\..\..\lib\Release\sfml-system.lib'

Would anyone please help me with this? I have no idea of how to fix this :/

Thank you very much in advance
Title: Re: Error when compiling SFML2 in MSVS2010
Post by: eXpl0it3r on September 08, 2012, 07:18:31 am
Is the path for the lib a valid path and does VS have the rights to write there (i.e. it doesn't need admin rights)?
Title: Re: Error when compiling SFML2 in MSVS2010
Post by: Laurent on September 08, 2012, 08:45:53 am
Can you show the output of a full rebuild?
Title: Re: Error when compiling SFML2 in MSVS2010
Post by: Setsuna on September 08, 2012, 02:49:20 pm
http://ideone.com/JCMuy (http://ideone.com/JCMuy)


Here you have the full rebuild
Title: Re: Error when compiling SFML2 in MSVS2010
Post by: eXpl0it3r on September 08, 2012, 03:07:37 pm
I've no idea why VS adds some ..\ to the lib paths. Did you follow the tutorial 1:1 or did you change anything?
Title: Re: Error when compiling SFML2 in MSVS2010
Post by: Setsuna on September 08, 2012, 09:51:08 pm
i havent touch anything, just opened the SLN and compile
Title: Re: Error when compiling SFML2 in MSVS2010
Post by: eXpl0it3r on September 08, 2012, 10:28:33 pm
So how did you use CMake? Something got messed up with your paths.
For example, why do you have a path like this:
..\..\..\..\Users\Squall\Downloads\LaurentGomila-SFML-6790904\src\SFML\Graphics\Shader.cpp
And then paths you got some like this:
C:\SMFL2\src\SFML\Graphics\CMakeFiles\generate.stamp

I don't really understand how this would happen. Usually I choose ..../SFML as source and ..../SFML/build where to build SFML and then specify with the CMake install prefix where the library should get copied to once build.
Maybe you should take a look again at the official tutorial on how to build SFML with CMake (http://www.sfml-dev.org/tutorials/2.0/compile-with-cmake.php).

Everything works fine on my system, so you've setup something strange somewhere (CMake, VS, ...). :-\