I want to port my application from linux to windows, and I've succeeded with most parts all the libraries are linked etc. etc.
However the compiler seems to think that I'm not building a console application.
I'm building it in debug mode using multibyte settings, and multi-threaded debug dlls, and the subsystem is set to console.
I do have a main function, and when I tried to create a console application with a main function I could, however I just can't understand why the compiler with these default settings can't link the main function.
main.cpp
1 2 3 4 5 6 7 8 9 10 11
#include "loop.h"
int main ( int argc, char* args[] )
{
loop lp;
lp.start();
return 0;
}
well I think this is relevant and maybe the compiler settings I've already mentioned. Any ideas how can I solve this?
You're using a forbidden mix of multi-threaded debug libraries and non multi-threaded debug libraries.
Also, looks like your project settings are mixed up between console and windows-application. Dig though "project->properties->linker->system->subsystem" or whatever it's called now and make sure everything is set to console.
You might have found porting it easier if you'd not used Visual Studio, but that's a different conversation :)
Or create a new "project", and be sure to select Visual C++->General->Empty Project. Then add your files to that project. Empty project is what I use for all my console apps.
With Visual Studio, I usually find it easier to remake the project than to find my mistakes if I change too many options.
Silly as it sounds, main.cpp (i.e. the cpp file containing your main function) is definitely part of the project, and is being compiled and linked? Your linker is complaining that it can't find it.