Hello!
I often see libraries in which there is only a declaration of functions, and the declaration is hidden somewhere. For example, there is a library that declares a class. Only where it is declared is not visible. How it's done?
Hello!
I often see libraries in which there is only a declaration of functions, and the declaration is hidden somewhere. For example, there is a library that declares a class. Only where it is declared is not visible. How it's done?
Oh, I found: http://www.techytalk.info/c-cplusplus-library-programming-on-linux-part-one-static-libraries/comment-page-1/ . Is it only cross-platform?
#ifndef EGE_H #define EGE_H void doStuff(); #endif //EGE_H This is how it turns out. But the makefile:
makelib: g++ -Wall -I ./include/ -c ./src/*.cpp ar rcs ./lib/libEGE.a ./*.o all: g++ -I ./include/ -L ./lib/ -lEGE -o ege_test main.cpp Source: https://ru.stackoverflow.com/questions/410075/
All Articles