Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build a Visual Studio 9.0 solution from Cygwin and get build output?

I am trying to set up an automated build system on Windows using Cygwin. Among other things, it needs to be able to build several Visual C++ solutions. I have a script which sets up the environment variables needed for devenv, and if I type 'devenv' in bash it brings up the Visual Studio IDE. No problems so far.

I am also able to build a solution from cygwin's bash prompt by typing

$ devenv mysolution.sln /build Debug

The problem is that it is not showing me the build output. In fact, it does not even tell me whether or not the build succeeded. The command simply finishes, and I get back the prompt. Then I can go into the output directory, and check whether or not the executable was created, but for a build system I want to be able to grep for errors.

What am I doing wrong? I can see the debug output when I run devenv in the windows shell, but not in cygwin. Where is it being sent, and how do I get it back?

like image 643
Dima Avatar asked Jun 25 '09 23:06

Dima


People also ask

How do I compile a Visual Studio project?

To compile multiple C++ project items In Solution Explorer, choose multiple files that can be compiled, open the shortcut menu for one of those files, and then choose Compile, or press Ctrl+F7. If the files have dependencies, the files will be compiled in dependency order.

How do I change the build output path in Visual Studio?

Right-click on the project node in Solution Explorer and select Properties. Expand the Build section, and select the Output subsection. Find the Base output path for C#, and type in the path to generate output to (absolute or relative to the root project directory), or choose Browse to browse to that folder instead.


1 Answers

Will cygwin find and run .com files?

There are 2 devenv executables, one is devenv.com which is a console mode application that handles stdin, stdout and stderr proxying for the other executable, devenv.exe, which is a GUI mode application. If devenv.exe is what cygwin is loading then there will be no stdin/stdout stuff. If devenv.com is being loaded, it should launch devenv.exe while proxying the stdout stuff to the console.

Maybe if you explicitly specify that devenv.com should be run?

like image 86
Michael Burr Avatar answered Oct 12 '22 17:10

Michael Burr