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

Author Topic: Error building csfml master with msvc 2010  (Read 5311 times)

0 Members and 1 Guest are viewing this topic.

Joel

  • Newbie
  • *
  • Posts: 2
    • View Profile
Error building csfml master with msvc 2010
« on: June 04, 2016, 10:34:24 pm »
Hi:

I just build and install sfml2 master with cmake + msvc 2010. Everything was propertly installed in ${prefix}\bin, ${prefix}\include and ${prefix}\lib.

Now, I'm trying with csfml master and I got this error:
Code: [Select]
CMake Error at ${prefix}/cmake/Modules/FindSFML.cmake:358 (message):
  Could NOT find SFML (missing: SFML_SYSTEM_LIBRARY SFML_WINDOW_LIBRARY
  SFML_NETWORK_LIBRARY SFML_GRAPHICS_LIBRARY SFML_AUDIO_LIBRARY)
Call Stack (most recent call first):
  src/SFML/CMakeLists.txt:26 (find_package)
Any ideas? I can confirm that I have this files in ${prefix}\bin

sfml-window-2.dll
openal32.dll
sfml-audio-2.dll
sfml-graphics-2.dll
sfml-network-2.dll
sfml-system-2.dll

which is also a directory registered in %PATH% and this files in ${prefix}\lib

sfml-window.lib
vorbis.lib
vorbisenc.lib
vorbisfile.lib
flac.lib
ogg.lib
openal32.lib
sfml-audio.lib
sfml-graphics.lib
sfml-main.lib
sfml-network.lib
sfml-system.lib

Joel

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Error building csfml master with msvc 2010
« Reply #1 on: June 05, 2016, 07:22:15 pm »
Update:
I manage to solve the issue, but adding more options to cmake commandline build:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${prefix_here} -DBUILD_SHARED_LIBS=TRUE -DCSFML_LINK_SFML_STATICALLY=FALSE -DCSFML_BUILD_DOC=FALSE -DCMAKE_MODULE_PATH="${prefix_here}/cmake/Modules" ..
Seems that the key element was -DBUILD_SHARED_LIBS=TRUE or -DCSFML_LINK_SFML_STATICALLY=FALSE, for some reasons FindSFML was looking for static libs of sfml when I built them as dynamic libs. Hope it helps to anyone with the same problems

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Error building csfml master with msvc 2010
« Reply #2 on: June 09, 2016, 01:36:43 pm »
On windows the default is to link SFML statically.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

 

anything