0

I have a number of C++ header and source files which are used in different projects. Now I need to create a new common project which will contains all these headers and their related implementation in cpp files. I am able to create the project and generate a lib and used in existing projects removing the direct header and cpp files but I am getting LNK2001 error.

Do I need to use dllexport for all classes and methods in the new project that I created?

Werner Henze
  • 16,404
  • 12
  • 44
  • 69
ACS
  • 39
  • 4
  • Possible duplicate of [Export all symbols when creating a DLL](http://stackoverflow.com/questions/225432/export-all-symbols-when-creating-a-dll) – Werner Henze Apr 15 '16 at 08:32
  • No, you do not need to use dllexport. You do not _need_ to use a DLL at all. You could be using a static library. You can use a static library instead. I suggest you ignore your current project and make a new testbed project with one simple symbol and another project referencing that symbol through the lib. When you get that working, look for differences in your big project. – zeromus Apr 15 '16 at 09:00

0 Answers0