1
General / Re: SFML static linking
« on: July 12, 2019, 05:50:15 pm »
Still error, but this time seems it looks different.
#define SFML_STATIC
#include <iostream>
#include "SFML/Window.hpp"
int main() {
sf::Window window(sf::VideoMode(800, 600), "test");
}
#include <iostream>
#include "SFML/Window.hpp"
int main() {
sf::Window window(sf::VideoMode(800, 600), "test");
}
d:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: C:\Users\CyberOni\AppData\Local\Temp\ccAI5dco.o:main.cpp:(.text+0x7c): undefined reference to `sf::String::String(char const*, std::locale const&)'
d:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: C:\Users\CyberOni\AppData\Local\Temp\ccAI5dco.o:main.cpp:(.text+0xa0): undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'
d:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: C:\Users\CyberOni\AppData\Local\Temp\ccAI5dco.o:main.cpp:(.text+0xd7): undefined reference to `sf::Window::Window(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'
d:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: C:\Users\CyberOni\AppData\Local\Temp\ccAI5dco.o:main.cpp:(.text+0xf8): undefined reference to `sf::Window::~Window()'
If I'm adding -DSFML_STATIC to compiler flags it gives me the same error message.
d:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: C:\Users\CyberOni\AppData\Local\Temp\ccAI5dco.o:main.cpp:(.text+0xa0): undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'
d:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: C:\Users\CyberOni\AppData\Local\Temp\ccAI5dco.o:main.cpp:(.text+0xd7): undefined reference to `sf::Window::Window(sf::VideoMode, sf::String const&, unsigned int, sf::ContextSettings const&)'
d:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: C:\Users\CyberOni\AppData\Local\Temp\ccAI5dco.o:main.cpp:(.text+0xf8): undefined reference to `sf::Window::~Window()'