Ich habe folgendes Makefile
CXXFILES = pthreads.cpp
CXXFLAGS = -O3 -o prog -rdynamic -D_GNU_SOURCE -L./libmine
LIBS = -lpthread -ldl
all:
$(CXX) $(CXXFILES) $(LIBS) $(CXXFLAGS)
clean:
rm -f prog *.o
Ich versuche, die einzubeziehen ./libmine
Bibliothek darin CXXFLAGS
, aber es scheint, als wäre es nicht der richtige Weg, eine statische Bibliothek einzubinden, denn wenn ich das Programm kompiliere, erhalte ich viele undefinierte Referenzfehler. Was ist also eigentlich der richtige Weg, um eine statische Bibliothek in das Makefile aufzunehmen?