I would like to use the assest of Visual Studio for development but I would like to compile my code with the GNU Complier gcc. Is this possible? If so does anyone know of a tutorial for the setup?
Why do you want to compile with gcc, it doesn't even has an optimizer. If you want to compile on a unix machine, I suppose that makes sense, but otherwise I can't see a reason. Anyway, it shouldn't be hard, just learn to create a gcc makefile, and as long as you don't use any MS-only C++ stuff (like __int64) you shouldn't have too much trouble, just copy the source files and do it like you normally would.
I am part of an open source project in which part of the specification is to be portable as possible. The Admin of the project is using GNU tools for the compiling of the code. It is not my own concotion to do it this way. I am just trying to make my life a little simpler by keeping the IDE the same. I am very UNFAMILIAR with GNU tools. I have not ever compiled a project with Autotools before. I was just hoping for a simple solution. Any detailed help is apprectiated.
> Why do you want to compile with gcc, it doesn't even has an optimizer.
Huh? gcc optimisations
@Haunter
Two things I can think of.
1. ask the rest of your open source project to see if any of them have ideas. If it's a large group, chances are someone else is in the same position.
2. You can customise external tools (in VC6 at least), which can easily be made to invoke 'make' to do all the work of invoking the compiler for all the files in the project.
I assume you've already downloaded a gcc compiler and a make tool?
I saw benchmarks a while back of gcc code vs VC++ 7 code and VC++ 7 was faster. Someone told me that gcc didn't have an optimizer, but I guess they were wrong. Thanks for pointing this out.
This is very very similar to Visual Studio and is designed around the MinGW port. As far as I know, you can't make Visual C++ work with any other compiler.
Going the other way is a lot easier... Making it for gcc will make it comply with ANASI C99 standards (as long as you don't use any POSIX stuff like pthread), and so it is easier to move. Getting good with a decent Unix/Linux editor (preferably onw with a DOS/Windows port) can make life as simple as VC++'s bloated IDE.
timmay, benchmarks are often skewed by what paces they put the put the code/machine/ect through. gcc was deveoped on Unix/Linux and any dos port will be slower. Comparing VC++ code on a different OS than g++ means that there are a lot of other variables to take into account. Where the benchmarks for GUI programs? Then you'd also have to take into account the windowing enviroment. I can create a benchmark test that will yeild whatever result I want, so always look at who hired the people running the benchmark. Different compilers do different things better, if you plan to take advantage of things you know one is better at then the other your benchmark is no longer fair. Next your going to tell me that the most important factor in buying a computer is the clock speed.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.