Hello,

I have been working on an assignment using codeblocks with the GNU GCC compiler. The assignment must compile using Visual Studio 2008. I have not been able to get my hands on Visual Studio 2008 as of yet, but I was wondering if anyone thinks I should be concerned. The project is working fine when compiling with GNU GCC. I obviously don't have a lot of experience working with different compilers.

Thanks

vc++ 2008 version is no longer available. The only version is now vc++ 2010 and link in the previous post.

Thanks for the posts. I have access to Visual Studio 2008 in the school computer lab. I just won't have time to go there before the assignment is due, and I'm wondering how concerned I should be if I do not test the program on that compiler.

For GCC, you can compile with the options -pedantic-errors -std=c++98 to tell GCC to compile the code in strict standard C++ code (standard from 98, which is current) and to produce compilation errors if you do anything that is not strictly standard C++ code (i.e. pedantic). It is not a perfect option, it might leave some things, but I don't think that a simple piece of homework assignment code would really cause trouble when switching compilers. Technically, if your code compiles fine with the options above under GCC, there should not be any problems compiling with the visual studio 2008 compiler (referred to as MSVC8).

You should also, if your prof didn't tell you already, always compile your code with the highest possible warning levels and treat the warnings as errors. Under GCC, all warnings are enabled with the -Wall compiler option.

In Code.Blocks, to change the compiler options, you should be able to find a place to input "additional compiler options" in the build or project properties/preferences menus.

Thanks guys. I was able to download a version of Visual Studio 2008 from my University website. It compiled fine. Thanks for all of your input.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.