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

Author Topic: [Error] SFML2 CMake-Generated Files for VS2010 (Static)  (Read 4737 times)

0 Members and 1 Guest are viewing this topic.

Mikey

  • Newbie
  • *
  • Posts: 10
    • MSN Messenger - mrking2910@googlemail.com
    • View Profile
[Error] SFML2 CMake-Generated Files for VS2010 (Static)
« on: November 07, 2010, 04:57:13 pm »
Hello Folks,

 Encountered a bit of a problem when generating Visual Studio 2010 Project Files using CMake (2.8.2) for the SFML2 pre-release.

 CMake Configuration Used

 BUILD_DOC: No
 BUILD_EXAMPLES: Yes
 BUILD_SHARED_LIBS: No
 CMAKE_BUILD_TYPE: Release


 Now all works fine using CMake, but when loading the generated solution into Visual Studio 2010 (Professional) it refuses to load the newly generated project files for the "sfml_xxx" projects.

 The following is the output from Visual Studio;

 
Quote

D:\Development_Kits\C++\sfml2\src\SFML\Audio\sfml-audio.vcxproj : error  : Unable to read the project file "sfml-audio.vcxproj".
D:\Development_Kits\C++\sfml2\src\SFML\Audio\sfml-audio.vcxproj(98,29): The project file could not be loaded. An error occurred while parsing EntityName. Line 98, position 29.

D:\Development_Kits\C++\sfml2\src\SFML\Graphics\sfml-graphics.vcxproj : error  : Unable to read the project file "sfml-graphics.vcxproj".
D:\Development_Kits\C++\sfml2\src\SFML\Graphics\sfml-graphics.vcxproj(98,29): The project file could not be loaded. An error occurred while parsing EntityName. Line 98, position 29.

D:\Development_Kits\C++\sfml2\src\SFML\Network\sfml-network.vcxproj : error  : Unable to read the project file "sfml-network.vcxproj".
D:\Development_Kits\C++\sfml2\src\SFML\Network\sfml-network.vcxproj(98,29): The project file could not be loaded. An error occurred while parsing EntityName. Line 98, position 29.

D:\Development_Kits\C++\sfml2\src\SFML\Window\sfml-window.vcxproj : error  : Unable to read the project file "sfml-window.vcxproj".
D:\Development_Kits\C++\sfml2\src\SFML\Window\sfml-window.vcxproj(98,29): The project file could not be loaded. An error occurred while parsing EntityName. Line 98, position 29.



 In the project files themselves, the lines indicated above are;

 
Quote


sfml-audio.vcxproj: Line 98

<AdditionalOptions> "&quot";"D:/Development_Kits/C++/sfml2/extlibs/libs-msvc/OpenAL32.lib&quot";"" "&quot";"D:/Development_Kits/C++/sfml2/extlibs/libs-msvc/sndfile.lib&quot";"" %(AdditionalOptions)</AdditionalOptions>

sfml-graphics.vcxproj: Line 98

<AdditionalOptions> "&quot";"D:/Development_Kits/C++/sfml2/extlibs/libs-msvc/freetype.lib&quot";"" "&quot";"D:/Development_Kits/C++/sfml2/extlibs/libs-msvc/glew.lib&quot";"" "&quot";"D:/Development_Kits/C++/sfml2/extlibs/libs-msvc/jpeg.lib&quot";"" %(AdditionalOptions)</AdditionalOptions>

sfml-network.vcxproj: Line 98

<AdditionalOptions> "&quot";"ws2_32.lib&quot";"" %(AdditionalOptions)</AdditionalOptions>

sfml-window.vcxproj: Line 98

 <AdditionalOptions> "&quot";"opengl32.lib&quot";"" "&quot";"winmm.lib&quot";"" "&quot";"gdi32.lib&quot";"" %(AdditionalOptions)</AdditionalOptions>




 
Please note: the invalid entries occur on more than just line 98 in each project file.




Solution

Remove the "&quot" entries, and format the lines as follows;

Quote
<AdditionalOptions>opengl32.lib;winmm.lib;gdi32.lib;%(AdditionalOptions)</AdditionalOptions>



Hope this can help someone.
Regards,

 Mike

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
[Error] SFML2 CMake-Generated Files for VS2010 (Static)
« Reply #1 on: November 07, 2010, 05:45:32 pm »
Ok, I know what happens.

I'll fix the CMake makefiles, thanks for your feedback.
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
[Error] SFML2 CMake-Generated Files for VS2010 (Static)
« Reply #2 on: November 07, 2010, 08:51:31 pm »
Fixed.
Laurent Gomila - SFML developer

Mikey

  • Newbie
  • *
  • Posts: 10
    • MSN Messenger - mrking2910@googlemail.com
    • View Profile
[Error] SFML2 CMake-Generated Files for VS2010 (Static)
« Reply #3 on: November 09, 2010, 12:33:11 am »
Brill.
Regards,

 Mike

icancto

  • Guest
Re: [Error] SFML2 CMake-Generated Files for VS2010 (Static)
« Reply #4 on: November 08, 2013, 09:40:56 pm »
How did you make it? Hmmm... I must be doing something wrong here. I created myself dynamic libraries for Debug and Release with Cmake and it works just fine, but when I choose the SFML_USE_STATIC_STD_LIBS and deselect BUILD_SHARED_LIBS in order to create static libraries I get the same error as the author, where the VS is not able to load:
"sfml-graphics"
"sfml-window"
"sfml-audio"
"sfml-network"
Quote
C:\SFML_STATIC3\src\SFML\Network\sfml-network.vcxproj : error  : Unable to read the project file "sfml-network.vcxproj".
C:\SFML_STATIC3\src\SFML\Network\sfml-network.vcxproj(107,29): The project file could not be loaded. An error occurred while parsing EntityName. Line 107, position 29.

C:\SFML_STATIC3\src\SFML\Window\sfml-window.vcxproj : error  : Unable to read the project file "sfml-window.vcxproj".
C:\SFML_STATIC3\src\SFML\Window\sfml-window.vcxproj(107,29): The project file could not be loaded. An error occurred while parsing EntityName. Line 107, position 29.

C:\SFML_STATIC3\src\SFML\Audio\sfml-audio.vcxproj : error  : Unable to read the project file "sfml-audio.vcxproj".
C:\SFML_STATIC3\src\SFML\Audio\sfml-audio.vcxproj(107,29): The project file could not be loaded. An error occurred while parsing EntityName. Line 107, position 29.

C:\SFML_STATIC3\src\SFML\Graphics\sfml-graphics.vcxproj : error  : Unable to read the project file "sfml-graphics.vcxproj".
C:\SFML_STATIC3\src\SFML\Graphics\sfml-graphics.vcxproj(107,29): The project file could not be loaded. An error occurred while parsing EntityName. Line 107, position 29.
I use CMake 2.8.12, VS2012 and "SFML-2.1-sources"

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10823
    • View Profile
    • development blog
    • Email
Re: [Error] SFML2 CMake-Generated Files for VS2010 (Static)
« Reply #5 on: November 08, 2013, 11:19:54 pm »
Please make sure to check the date of the last post before bumping a three years old thread... ::)

Since you're posting in a thread about VS 2010 and you're using VS 2012, did you make sure to choose VS 2012 as CMake generator as well?
Optionally you can always generate an NMake file and build SFML via command line. Also keep in mind that with the latest changes of SFML, you'll now have to link all the dependencies of SFML yourself in your project when using the static version.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/