Using VS2012 C/C++:
I created and linked a static lib called "libtools" to my project. Calls to functions in the libtools lib worked as expected.
I created and linked a second static lib called "shunt" to my project. But when I incorporate a call to a function in shunt, I am getting a c3861 "Identifier not found"
I added both libs to my project in the same way. I added a ref to each one in the Framework and References, and added the full path in the C/C++ Additional directories.
How can I fix this?
Best How To :
C++ uses something called name mangling when it creates symbol names. It's needed because the symbol names must contain the complete function signature. When you use
extern "C" the names will not be mangled, and can be used from other programming languages, like C.
You clearly make the shunt library in C++, which means that the
shuntfunc function isn't actually named that way once it passed the compiler. As the actual application using the library is made in C (guessing based on the tag and information) it can't find the
shuntfunc symbol, not without telling the C++ compiler to not mangle the symbol name.
That it works for the other library is probably because it's made in C as well.