Basicly, I'd like something like this:
#include <myLib.h>So, I have *.h and *.cpp files and I somehow managed to make *.o files but I guess I'm not linking them right. I'm using Code::Blocks and set paths under Settings > Compiler and debugger > Search directories > Includes tab for header files and Linker tab for *.o files (I'm not sure if this is right)
When I try to compile I get 'undefined reference' error. Also, I've read that in header files I should put extern word infront of function prototype. I've also got a class and as I understand you don't/can't put extern infront of class? And is use in this case correct?
template <class Type> extern const Type someFunction ( const Type& a, const Type& b );


Sign In
Create Account


Back to top









