-2

I am working with Visual Studio 2013 Pro.

My Solution has 3 projects

projectA

projectB

projectC

and the Hierarchy is like

projectB and projectC depend on projectA. There is a main function in projectA and no main in projectB and projectC. projectA is compiling as a library and contains a few functions as entry-points for projectB and C, and those are linking properly.

There is no main in projectB or projectC, projectA has an int main, and there are extern functions declared in projectA for the other two to define, and the linker accepts the defined extern functions.

I am getting this error:

error LNK1561: entry point must be defined

Any help would be appreciated

Marmaduke
  • 22
  • 3
  • 1
    A program must have an entry point - a function that runs when the program starts (typically called `main`). It sounds like you either don't have one, or have not designated which function to use in the project properties. – Conduit Dec 26 '15 at 20:59
  • Is this a console app, or a win32 app? – OldProgrammer Dec 26 '15 at 21:08
  • project A has the main function, and it's a win32 app. – Marmaduke Dec 26 '15 at 21:13
  • 1
    Possible duplicate of [Error LNK1561: entry point must be defined](http://stackoverflow.com/questions/17228301/error-lnk1561-entry-point-must-be-defined) – Ken White Dec 27 '15 at 06:30

1 Answers1

0

It compiles, but does not link, therefore you cannot run your application to begin debugging it

For a Win32, the entry point is WinMain().

  • Right-click the Project (not the Solution) on the left side.
  • Then click Properties -> Configuration Properties -> Linker -> System

If it says Subsystem Windows your entry point should be WinMain(), i.e.

DeJaVo
  • 3,091
  • 2
  • 17
  • 32