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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Marfi

Pages: [1]
1
General / Re: Problem with static linking SFML 2.5.1
« on: June 07, 2020, 06:25:58 pm »
Oh my gosh! I'm so ashamed. Thx for your time ;)

3
General / Problem with static linking SFML 2.5.1
« on: June 06, 2020, 04:43:22 pm »
Hello to everyone.
I'm having issues when trying to static link.

I'm using this version of sfml 2.5.1  and
g++ --version
g++ (MinGW.org GCC-6.3.0-1) 6.3.0

if I try to compile with dynamic link everything is going fine
g++   -g main.cpp -I"e:\SFML-2.5.1\include" -o main.exe -L"e:\SFML-2.5.1\lib" -lsfml-graphics-d   -lsfml-window-d   -lsfml-system-d   -lopengl32 -lwinmm -lgdi32

but if I try to static link
g++ -DSFML_STATIC -g main.cpp -I"e:\SFML-2.5.1\include" -o main.exe -L"e:\SFML-2.5.1\lib" -lsfml-graphics-s-d -lsfml-window-s-d -lsfml-system-s-d -lopengl32 -lwinmm -lgdi32

I have got:
e:\SFML-2.5.1\lib/libsfml-system-s-d.a(Err.cpp.obj): In function `sync':
D:/Programming/C++/Releases/_Sources/SFML/src/SFML/System/Err.cpp:87: undefined reference to `_imp____acrt_iob_func'
collect2.exe: error: ld returned 1 exit status


Can anyone point me what I'm doing wrong?

Pages: [1]
anything