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

Author Topic: CMake Libraries Version/Dependency Problem  (Read 10652 times)

0 Members and 1 Guest are viewing this topic.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: CMake Libraries Version/Dependency Problem
« Reply #15 on: May 23, 2014, 10:31:15 pm »
If you can't find the ones with a name listed there, then it's a system library, which surprise, surprise don't need to be shipped, since they are available on system level.

SFML ships with: freetype, glew, jpeg, openal32 and libsndfile
For Windows the system libs that are used additionally are: winmm, ws2_32, gdi32 and opengl32
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Andrew

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • Email
Re: CMake Libraries Version/Dependency Problem
« Reply #16 on: May 23, 2014, 10:48:19 pm »
Ahh okay. Thanks guys.

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: CMake Libraries Version/Dependency Problem
« Reply #17 on: May 24, 2014, 04:42:05 pm »
hmm I wonder if the installer for SFML still works for the current version?  ??? Maybe it would solve a lot of problems we keep seeing pop up. :)
I have many ideas but need the help of others to find way to make use of them.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: CMake Libraries Version/Dependency Problem
« Reply #18 on: May 24, 2014, 11:05:38 pm »
The ones you don't find are system libraries, shipped with your compiler.
Laurent Gomila - SFML developer

DxE

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: CMake Libraries Version/Dependency Problem
« Reply #19 on: May 30, 2014, 06:04:38 pm »
I'm having a related issue with static linking, I'm pretty certain I've done something wrong but wish to clarify if my (release) linker setup should look like:

opengl32.lib
ws2_32.lib
gdi32.lib
winmm.lib
freetype.lib
sndfile.lib
glew.lib
jpeg.lib
openal32.lib
sfml-main.lib
sfml-system-s.lib
sfml-window-s.lib
sfml-graphics-s.lib

I should maybe also note that the only 'unresolved blah blah blah' errors I'm getting are related to sfml-window-s.lib:

(click to show/hide)

Also I have a dynamic linking problem which I believe only occurs on integrated graphics hardware where sf::Text stuff causes the program to crash, which is why I'm trying to statically link in the first place as reading around led me to believe this was only an issue with dynamically linked libraries. I imagine that's an issue for another thread though.

EDIT: I'm using Visual Studio 2013
« Last Edit: May 30, 2014, 06:06:17 pm by DxE »

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: CMake Libraries Version/Dependency Problem
« Reply #20 on: May 30, 2014, 06:09:07 pm »
What hardware your app (and sfml) will run on shouldn't have anything to do with how you link.
How you link only affects what your runtime dependencies are. Not the capabilities of the final binary at runtime.

DxE

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: CMake Libraries Version/Dependency Problem
« Reply #21 on: May 30, 2014, 06:26:24 pm »
I apologise in advance, I'm rather uninformed when it comes to linking in general and I dug around for the thread that I (misinterpreted) that led me to believe dynamic linking is the issue: http://en.sfml-dev.org/forums/index.php?topic=3976.0

Basically my issue matches up closely with the 3rd post (2nd reply), being that my app runs and closes fine on my desktop and several of my friends' but crashes on my own laptop and college's desktop computers, both of which use use Intel's integrated graphics processors, when I close the application. Notably that thread is about an SFML 2 issue and this is about  SFML 2.1.

I've made a separate thread for the issue to avoid clogging up this one:
http://en.sfml-dev.org/forums/index.php?topic=15399.0

DxE

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: CMake Libraries Version/Dependency Problem
« Reply #22 on: May 30, 2014, 06:31:51 pm »
I should maybe also note that the only 'unresolved blah blah blah' errors I'm getting are related to sfml-window-s.lib:

I switched back to Debug configuration and got more errors, looks more like stuff in the OP this time:
(click to show/hide)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
AW: CMake Libraries Version/Dependency Problem
« Reply #23 on: June 01, 2014, 01:06:16 pm »
__imp_XYZ and dllspec etc implies that you're trying to link/build it against/for a shared library.

Did you declare SFML_STATIC?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

DxE

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: CMake Libraries Version/Dependency Problem
« Reply #24 on: June 02, 2014, 12:41:50 am »
I think so? Whether I did it right or not is another matter:


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: CMake Libraries Version/Dependency Problem
« Reply #25 on: June 02, 2014, 07:48:31 am »
You're showing your Release settings. You said you had problems in Debug mode.
Laurent Gomila - SFML developer

DxE

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: CMake Libraries Version/Dependency Problem
« Reply #26 on: June 02, 2014, 07:15:18 pm »
Oops, my bad. I added SFML_STATIC to debug however errors (different ones) cropped up and I was still having errors when compiling the release build anyway so I've assumed there is some flaw in my programming or linker setup that I've overlooked and can't remember.

I set up a second, smaller and simpler program with the debug build set up to statically link and the release build to dynamically link and both work... Most of the time.

With the following code:
(click to show/hide)

This happens with the Debug (statically linked) build: http://puu.sh/9c2Eo.png
This happens with the Release (dynamically linked) build: http://puu.sh/9c2T4.png

The following images are of my settings in the Debug build configuration:
Directories: http://puu.sh/9c2W9.png
Pre-Processor: http://puu.sh/9c2Yc.png
Code Generation: http://puu.sh/9c2ZH.png
Linker Input: http://puu.sh/9c32l.png

Does this just mean I haven't compiled SFML correctly, or is there a flaw in my linker settings?

Andrew

  • Newbie
  • *
  • Posts: 22
    • View Profile
    • Email
Re: CMake Libraries Version/Dependency Problem
« Reply #27 on: June 02, 2014, 11:54:34 pm »
Is this even related to my CMake/VS2013 problem anymore? If not, can you make a new thread? I don't want to get emails about other people's problems unless I'm helping them or they're undergoing the same situation and solving it.