Undefined reference C++

You may be compiling skewNormal.cpp to a .o file, but you're not including it when you compile main.cpp.


Not sure if this is the problem, but it appears you're prototyping the function twice.

The double getSkewNormal(double skewValue, double x); line need only be in the header, not in main.cpp as well (since main.cpp includes skewNormal.h). Having it appear twice in a prototype form seems likely to confuse the compiler. You only need it to be visible to the code once, and usually that should be in a header (not a code file).

Try removing that line from main.cpp and recompile. :)