Quote Originally Posted by MikeAThon View Post
Note that there is a huge difference between "CreateRelation", which apparently is a function defined by you, and "_CreateRelation" (note the underscore), which is an external function for which the compiler can find a .h header, but for which the linker cannot find a .lib library file.
I only have a vague idea of the OP's scenario, yet I don't think so. CreateRelation() rather seems to be a function with C linkage, to which not the "fancy" C++ name mangling is applied, but instead each C symbol is prefixed with an underscore, and the linker doesn't undecorate these names. The way the linker refers to the main() function is an indication of this:

Quote Originally Posted by __bairagi View Post
error LNK2019: unresolved external symbol _CreateRelation referenced in function _main