Sunday, 15 January 2012

c++ - Error LNK1561: entry point must be defined -


I am working with Visual Studio 2012.

There are 3 projects in my solution

Project A

projectB

Projects

and hierarchy

projectC Depending on projectB which in turn depend on Project A , the project has a main function in ProjectB and Project A Not the main. The errors that I am getting are:

  error LNK1561: entry point should be defined projectA error LNK1561: entry point should be defined ProjectB   < P> I have tried changing the configuration properties - & gt; Linker - & gt; System - & gt;   

It seems that you think the word" module "is wrong in Visual Studio ++ is not a project; C ++ projects can be divided into three categories:

  • The program - compile produces a exe file, which is executed Can be done;
  • Static Library - Compile produces a lib file, which is included in any other project Can be done and linked during compilation;
  • Dynamic library - Compile produces a dll file, which can be attached to your program at run-time

    From your descriptions, you want to make projectb and projective a static library, but instead you have them executable files. Again a new project wizard D Run and "Windows apps" instead of "static library Choose".

    You can read more about the static libraries.

    If the static library is too heavy your application, you can simply include projectb and project files in your project (alternatively take care of namespace and not confuse names of classes). It all depends on how much functionality you are planning to implement in these modules.

No comments:

Post a Comment