c++ - Using GCC from within VS 2005(8) IDE -


is there way utilise gcc compiler whilst still being able develop via visual studio ide?

our project cross-platform, , quite trouble colleague because i'm checking in code that's not standards compliant (this can attributed vs compiler!).

i'd still able compile using ms compiler, can continue debugging, etc, i'd able switch compile using gcc, can sure i'm not breaking build on other platforms.

is possible?

what suggest still require makefile, partially repeating advice earlier reply. or, mentioned earlier, maybe have makefile, in case have fewer steps in order accomplish describe.

once know specific windows command-line command invoking make or g++ on code, create "pre-build event" in visual studio project. ("project properties >> configuration properties >> build events >> pre-build event").

the pre-build event can call bat file script, or other script on machine, , script able return error-code. essentially, "script ok," or "script failed" extent of amount of communication script can have visual studio.

the script doesn't automatically see visual studio environment variables (such $(inputdir), $(projectdir), $(solutionname), etc), can use variables when specify how call script. in other words, can pass values script arguments.

set every time build in visual studio, pre-build event first try run make/g++ on code. if script (the 1 calls make/g++) detects problems, script returns error , build can stopped right , there. script can print stdout or stderr , output should visible in visual studio build output window (the window shows stuff "========== build: 3 succeeded, 0 failed").

you can have script print:

"build failed, non-portable code detected, make/g++ returned following:........."

this way, don't have remember periodically switch visual studio command line. automatically done every time build.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -