Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
I am using nppexec to compile my c++ source changes with the following command:
devenv c:\path\project.sln /Build
The compile works fine but the output is not being trapped and shown in the console.
I have tried all 3 console output encodings (ansi, dos, utf8) and it makes no difference.
If I run the same command in a dos window… the output does appear as expected.
You can try the following:
cmd /c devenv c:\path\project.sln /Build
Or maybe even this:
cmd /c devenv c:\path\project.sln /Build 2>&1
I can't say more as I don't have the environment configured to try your example exactly. I just can add that the manual environment settings described in NppExec Manual "4.7.3. Using Visual Studio's compiler (cl.exe)" work for me.
Sweet! Adding cmd /c did the trick!
Another way would probably be to write
rather than just
When running external programs from your code without specifying an extension, Windows searches in the order .exe, .com, .bat.
When going through COMMAND.COM, and probably CMD.EXE, the search order changes to .com, .exe, .bat.
IIRC, DEVENV.EXE doesn't output to the console, DEVENV.COM does.
Damn, you are right! I still can't get used to new interpretation of ".com" extension which now seems to mean "a console Windows application" - i.e. actually it's an .exe. Whereas in old DOS times the ".com" extension meant a different file format which was not the same as .exe.