Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LINK : fatal error LNK1221: a subsystem can't be inferred and must be defined

I have no other errors or warning in my solution, which would be great but this error has totally baffled me. I have three projects, one references none, and the other two both reference it.

One is a windowsservice, ah, that is also the one that doesn't link, I think this means I ought to add the service installer class in the morning, thought the MS example doesn't bother on the ServiceBase page of MSDN : http://msdn.microsoft.com/en-us/library/system.serviceprocess.servicebase%28v=VS.80%29.aspx

I'll need to test that example later. But if anyone can help in the mean time, thanks.

The project with no references is a dll. The other is a standard app, which up until about a month ago was all that I'd considered building.

like image 539
John Avatar asked Oct 15 '11 02:10

John


1 Answers

You need to set the subsystem in your C++ project under Project Properties -> Configuration Properties -> Linker -> System -> SubSystem. And you probably want to use SUBSYSTEM:WINDOWS.

enter image description here

like image 111
shf301 Avatar answered Sep 27 '22 18:09

shf301