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

Author Topic: Using SFML in a static library project  (Read 1395 times)

0 Members and 1 Guest are viewing this topic.

aradarbel10

  • Newbie
  • *
  • Posts: 6
    • View Profile
Using SFML in a static library project
« on: March 22, 2021, 10:41:09 pm »
I'm trying to set up a static library for personal use, and I'd like to use SFML functionality in it.
I think I've done everything needed for it to work:

Configuration Properties > C/C++ > General > Additional Include Directories
Configuration Properties > Librarian > General > Additional Library Directories
Configuration Properties > Librarian > Genera > Additional Dependencies
Configuration Properties > C/C++ > Preprocessor > Preprocessor Definitions (for static linking)

IntelliSense does recognize SFML, yet the project throws many errors on build. For example
cannot open source file "algorithm". this specific error comes from Rect.hpp, part of SFML itself. On top of that there are many other similar errors related to C++ STL, many of them come from String.hpp. What did I do wrong?

Any help is appreciated

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Using SFML in a static library project
« Reply #1 on: March 23, 2021, 08:04:38 am »
Could be that your project contains .c source files instead of .cpp or .cxx, and is recognized as a C project.

It would also help to see the complete compiler log.
Laurent Gomila - SFML developer

 

anything