I am using Microsoft Visual Studio 2008, and successfully building a command-line program in C++.
However, for my automated build I call cl.exe and link.exe outside the context of MSVC (I build using Maven Native, as most of the project is Java).
In that case, I manage to generate my executable. But when I execute it, I get the message "Program too big to fit in memory" right away.
There is no real problem of memory, of course: I have a powerful XP machine with 2 GB of memory. I guess that the executable lacks the correct binary headers, and that I need to use certain options to cl.exe or, more likely, to link.exe.
Any ideas?