Hi, I have a class located in a stored library. I then linked the library to a DLL. If I call the class like this: example: Code: // sample of class defined in library class myExample { ..... }; // include header file in DLL // if i use this myExample newInstance; // results to linker problems // but if i use it this way myExample *newInstance; newInstance = new myExample() // linker problems There seems to be redefinition of the functions/declarations found in libcpmtd.lib and msvcprtd.lib. I'm getting LNK2005 errors. It is saying that those declarations was already defined in the static library.
That could happen if you link to the .h file more than once without you having them opt out with the pre-processor directives or it could happen that you include the .cpp file instead of .h file.