yes, I tried double-clicking the exe and ran from the run dialog, the only thing I have not tried is to run from the command prompt - I hesitate since this it not an issue with earlier builds of this program. I can run a saved build right now and it works fine.
+5 points for the nice hacking approach to a solution, I cannot explain to you why this works but is does.
And for everyone forever after that has this problem, forget all those suggestions to add strange lines of text to your program, and breaks before return 0, or missing libraries.
follow-up, the simple solution works but scaling to my full library results in error error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup, I saw this in several other threads and tried these:
Working test: - deleted everything in main.cpp except test code and excluded all source files except main.cpp; as expected it worked, so a small step in the right direction. The problem must be with one of the header files.
yes, I get what you are saying - so I have a fork in the road. I can take the red pill and follow your suggestion to ditch VS, eclipse, and all these other compilers, and learn (hopefully in a day or less) to use a command-line compiler. Or, I can take the blue pill, strike what you said from the record and forget you ever mentioned that - then start a new help thread and hope somebody else helps me figure out my IDE or find where my code is going south.
No reason you can't do both. Can't hurt to learn how to do everything from the command line. Granted, if you do this professionally, I'm sure most of what you do, you'll have access to all sorts of tools. But you could wind up in a situation where you don't have access to anything grapical (ie *nix systems)
Granted, if you do this professionally, I'm sure most of what you do, you'll have access to all sorts of tools.
I am technically a professional, and I do have access to all sorts of tools, and I still write all my code in EMACS and compile it with hand-crafted makefiles.
I should say that everything I write has to work on *nix AND Win32 (and I develop it on both), so there is a large element of maintaining portability of both code and coding environment - emacs and makefiles are pretty much identical on the two systems.
I do not have that constraint. right now this is supporting an experiment and the program only needs to run on my machine - for all it matters it can stay in VS2008. If this works and everybody likes it, then somebody else will rewrite it for broader use.
main.cpp
1 2 3 4 5 6 7 8 9 10 11 12 13
int main()
{
int t = 0;
while (t < 1000) {
cout << " welcome..." << endl;
t++;
}
return 0;
}
It sounds like you may need to change the subsystem to console. I'm on my phone right now and can't check but it its somewhere in the project properties.
yes, I set that up during setup and double checked in the properties - no rush, I will be working on this for the next couple weeks until solved or I hire someone to coach me through