Author Topic: How to use supported compilers  (Read 3954 times)

jobardu

  • Guest
How to use supported compilers
« on: May 25, 2008, 10:04:35 pm »
Hi:
When I configure CodeBlocks and look at options for compile it lists a whole bunch of compilers. The default compiler is gcc, a perfectly good compiler. Yet if I wanted to use a visual studio compiler like VC++ express 2k5 or 2k8, both of which are ansi standards compliant, at least as compliant as Microsoft would ever get, could I just click it and make it default. That seems to good to be true.

So my question is how does CodeBlocks support all the compilers listed as options and how do I "activate" them?

Thanks for any help you can give on this subject.
regards, Jobardu :?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: How to use supported compilers
« Reply #1 on: May 25, 2008, 10:29:41 pm »
You activate the compiler by chosing it for your project.

It has to be installed of course to use it.

You might have to correct some settings in "Settings -> Compiler and Debugger .. -> [the compiler you chose]".
You should at least look into the "Toolchain executables" - tab to see if the installation directory is correct.
Make sure that the search directories for linker, compiler and resource compiler fit to your system.

Very helpful to find errors if something went wrong is to switch "Compiler Logging" to "Full commandline" in "Settings -> Compiler and Debugger .. -> [the compiler you chose] -> Other settings".

If you find errors in standard configuration it would be helpful for other users to avoid the error and for the devs to fix them if possible.

Offline Green::horn

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: How to use supported compilers
« Reply #2 on: May 28, 2008, 06:44:26 pm »
Hi,

is it also possible to use VC9 without installing it ?

I don't want to install 1,4 GB on Harddisk and pump up my Registry with 1o MB data.
If I do that, I could use the Ms IDE instead of Code::Blocks ...

I tried to copy the folders bin, include and lib from VC Express and the SDK and added the folders in the compiler settings, but I get always an error message
Code
-------------- Build: Debug in VCtest ---------------

Execution of 'cl.exe /nologo /W3  /Zi /D_DEBUG /Zi /D_DEBUG    /IC:\Programme\CodeBlocks\VC\include /IC:\Programme\CodeBlocks\VC /IC:\Programme\CodeBlocks\VC\include /I"C:\Programme\Microsoft Visual Studio 8\VC\include"  /c main.cpp /Foobj\Debug\main.obj' in 'D:\Eigene Dateien\Code Blocks\VCtest' failed.
Nothing to be done.



Greetz
Green::horn

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: How to use supported compilers
« Reply #3 on: May 28, 2008, 08:25:17 pm »
is it also possible to use VC9 without installing it ?
Absolutely : No. The VC compiler suite is nothing to "just copy". It installs a lot of "side stuff" - alias DLL's etc into several other folders, like Common Files, System32 and a lot more. But: If you have installed VCExpress then why don't you just use it instead of copying? Thus point to this installation directory in the (VC!) compiler settings. All you need in addition is the Windows Platform SDK to get started...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Green::horn

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: How to use supported compilers
« Reply #4 on: May 29, 2008, 12:14:21 am »
Thank you for reply, Morton.

I'm afraid to slow down my system if I install M$ Visual Studio Express 2oo8.
And there is a lot of stuff I dont want to use.

I didn't installed it on my system, just in a virtual maschine and copied the bin, llib and include folders from VC and SDK.
So, I have to byte in the sour apple ... grrr :x

The SDK is already integrated in Visual Studio Express 2oo8.  :wink:


Greetz
Green::horn

p.s. I'll go in my living room and curse a little bit ...
« Last Edit: May 29, 2008, 12:18:03 am by Green::horn »