Hello everybody,
I tried to link SFML dynamically (DLLs) in a little test program. I use GCC 8.1.0 64Bit and when I try to compile the following error occurs:
In file included from D:/GCC64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ext/string_conversions.h:41,
from D:/GCC64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/basic_string.h:6361,
from D:/GCC64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/string:52,
from D:/GCC64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/locale_classes.h:40,
from D:/GCC64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/bits/ios_base.h:41,
from D:/GCC64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ios:42,
from D:/GCC64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/ostream:38,
from D:/sourcecode/SFML-2.5.1/include/SFML/System/Err.hpp:32,
from D:/sourcecode/SFML-2.5.1/include/SFML/System.hpp:34,
from D:/sourcecode/SFML-2.5.1/include/SFML/Audio.hpp:32,
from src/main.cpp:1:
D:/GCC64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
#include_next <stdlib.h>
^~~~~~~~~~
compilation terminated.
The makefile is:
CC = g++
OBJ = bin/main.o
LIB = -L"D:/sourcecode/SFML-2.5.1/lib"
INCLUDE = -I"D:/sourcecode/SFML-2.5.1/include"
LIBS = -lmingw32 -lsmfl-graphics -lsmfl-audio -lsmfl-window -lsmfl-system
OUTPUT = sfmltest.exe
C_FLAGS = $(INCLUDE) -march=x86-64 -mtune=corei7-avx -O3 -Wall -static -std=c++11
L_FLAGS = $(LIBS) -s
RM = del /q
CPY = copy
all: $(OUTPUT)
$(OUTPUT): $(OBJ)
$(CC) -o $(OUTPUT) $(C_FLAGS) $(L_FLAGS) $(OBJ) $(LIB)
bin/main.o : src/main.cpp
$(CC) $(C_FLAGS) -c -o bin/main.o src/main.cpp
clean:
del bin\*.o
Can someone help me here?