Author Topic: C::B and MS 2005 free compiler?  (Read 17062 times)

Offline roland

  • Multiple posting newcomer
  • *
  • Posts: 17
C::B and MS 2005 free compiler?
« on: November 17, 2005, 09:00:27 am »
Has anyone conceived a way to use the compiler from the free Visual C++ Express Edition with C::B? Since the compiler can be used in console mode (not somehow forcably linked with the IDE itself), it seems that it should be possible.

Any tips? I would like to try using this compiler with C::B in substitution for the MS 2003 toolkit, if possible.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: C::B and MS 2005 free compiler?
« Reply #1 on: November 17, 2005, 09:07:16 am »
Have you tried changing the master path for the compiler to where VSExpress is installed?
Be patient!
This bug will be fixed soon...

Thordon

  • Guest
Re: C::B and MS 2005 free compiler?
« Reply #2 on: November 27, 2005, 02:32:14 pm »
I would also like to set up VC++2005 with Code::Blocks if possible.

Quote
Have you tried changing the master path for the compiler to where VSExpress is installed?
How would I do that?

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5177
Re: C::B and MS 2005 free compiler?
« Reply #3 on: November 27, 2005, 02:36:24 pm »
If I am correct, it's like this :

1) Settings (menu) ->Compiler
2) Select your compiler in the "Selected compiler" list
3) Programs tab -> "Compiler's installation directory"
  -> set this one to the directory that contains the bin directory for the comiler/linker/... exe's ov VS Express.

Lieven

Thordon

  • Guest
Re: C::B and MS 2005 free compiler?
« Reply #4 on: November 27, 2005, 02:42:10 pm »
Quote
2) Select your compiler in the "Selected compiler" list
The new one I installed isnt on the list, can I add a new blank compiler and then fill in all the options, or do I have to overwrite one of the other compilers?

Edit: Never mind, I found the 'Copy' button :)

I can compile using VC++2005 now, I took the following steps:

1) Create a new compiler in Code::Blocks named 'Microsoft Visual C++ Toolkit 2005' by copying and renaming my 'Microsoft Visual C++ Toolkit 2003' compiler.
2) Click the 'Programs' tab, changed the 'Compiler installation directory' to: 'C:\Program Files\Microsoft Visual Studio 8\VC'.
3) Click the 'Directories' tab, in the compiler tab change 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\include' to 'C:\Program Files\Microsoft Visual Studio 8\VC\include', and in the linker tab change 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib' to 'C:\Program Files\Microsoft Visual Studio 8\VC\lib'.
4) Copy all the DLL's from 'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE' to 'C:\Program Files\Microsoft Visual Studio 8\VC\bin' (this step might not be neccessary, but it was the only way I could make it work).
« Last Edit: November 27, 2005, 03:11:38 pm by Thordon »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5177
Re: C::B and MS 2005 free compiler?
« Reply #5 on: November 27, 2005, 03:01:52 pm »
you can add new ones -> you do that by for example selecting another one and press the copy button and tailor all the settings like you want them.
Oh, everything in the same settings panel as described above.

Offline GeertVc

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: C::B and MS 2005 free compiler?
« Reply #6 on: August 11, 2006, 07:57:23 am »

Quote
I can compile using VC++2005 now, I took the following steps:

1) Create a new compiler in Code::Blocks named 'Microsoft Visual C++ Toolkit 2005' by copying and renaming my 'Microsoft Visual C++ Toolkit 2003' compiler.
2) Click the 'Programs' tab, changed the 'Compiler installation directory' to: 'C:\Program Files\Microsoft Visual Studio 8\VC'.
3) Click the 'Directories' tab, in the compiler tab change 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\include' to 'C:\Program Files\Microsoft Visual Studio 8\VC\include', and in the linker tab change 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib' to 'C:\Program Files\Microsoft Visual Studio 8\VC\lib'.
4) Copy all the DLL's from 'C:\Program Files\Microsoft Visual Studio 8\Common7\IDE' to 'C:\Program Files\Microsoft Visual Studio 8\VC\bin' (this step might not be neccessary, but it was the only way I could make it work).

I've followed this description + some video tutorial I found on GameTutorials.com (doesn't seem to be free anymore nowadays...).

I've set the Visual C++ Toolkit 2005 as the default one and restarted CodeBlocks.

I created a new project and tried to build it (simple famous HelloWorld program in C++).  I was surprised to see an error message, saying the compiler couldn't find the Gnu GCC compiler.  Of course not, it's not installed.

But why is CodeBlocks asking for this, while I've set the VC++ 2005 compiler as default?

Then, I right-clicked on the project and selected the "Build options" item on the popup menu.  I was again surprised to see indeed the Gnu GCC compiler selected, in stead of the C++ 2005 compiler.

When I changed to the VC++ 2005 compiler, I saw that all the settings I did in the "Compiler Options" section were gone!

  • If I select Visual Studio C++ 2005 as the default compiler, why is a new project still trying to use the GNU GCC compiler?
  • If I then manually select Visual Studio C++ 2005, why are the settings I previously gave, gone?

I'm using CodeBlocks 1.0, rc2.

Best rgds,

--Geert
"Minds are like parachutes, they only work when opened"

Offline cpprooky

  • Multiple posting newcomer
  • *
  • Posts: 24
Re: C::B and MS 2005 free compiler?
« Reply #7 on: August 11, 2006, 09:08:29 am »
I'm using C::B (last night build) with Visual C++ 2005 Express compiler ! This compiler is listed in the Compiler list of C::B ! It's even auto-detected by C::B ! I just can't find the debugger that goes with it !!
C++ Rooky

Offline kagerato

  • Multiple posting newcomer
  • *
  • Posts: 56
    • kagerato.net
Re: C::B and MS 2005 free compiler?
« Reply #8 on: August 11, 2006, 11:06:03 pm »
I'm using C::B (last night build) with Visual C++ 2005 Express compiler ! This compiler is listed in the Compiler list of C::B ! It's even auto-detected by C::B ! I just can't find the debugger that goes with it !!

I believe that debugger integration with Microsoft's compiler is not yet implemented (although planned for the long run).  The format of the debugging information produced is different; therefore gdb is effectively useless.

There are standalone debuggers (like the ancient WinDbg.exe) you might try.  There's actually a rather good standalone debugger for .NET called DbgCLR.exe, but that won't help you with C++ programs.

sethjackson

  • Guest
Re: C::B and MS 2005 free compiler?
« Reply #9 on: August 11, 2006, 11:09:20 pm »
I believe the Microsoft debugger is called CDB......

http://www.microsoft.com/whdc/devtools/debugging/default.mspx
« Last Edit: August 11, 2006, 11:11:08 pm by sethjackson »

Offline L_O_J

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: C::B and MS 2005 free compiler?
« Reply #10 on: August 14, 2006, 04:30:47 am »
I believe the Microsoft debugger is called CDB......

http://www.microsoft.com/whdc/devtools/debugging/default.mspx

well I'm using C::B with MingW and VC++ Express 2005, C::B recognize the cdb (in the compiler option window) but it seems that C::B doesn't now how to use it (or doesn't use it at all).

Offline godcode

  • Single posting newcomer
  • *
  • Posts: 5
Re: C::B and MS 2005 free compiler?
« Reply #11 on: August 14, 2006, 08:35:20 am »
yeah. i tried also using the Borland 5.5 compiler and CodeBlocks wouldnt want to use it too...

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: C::B and MS 2005 free compiler?
« Reply #12 on: August 14, 2006, 08:56:01 am »
Here are some facts regarding debugging with C::B nightlies.

C::B acts as a frontend for two debuggers: GDB and CDB.
CDB is automatically used for projects/targets built using one of the MSVC* compilers. Read below for preparing C::B for CDB.
GDB is used for every other binary. In other words: if it's not determined to be built using a MSVC* compiler, GDB is used.

GDB support is much better than CDB. With CDB, you can do basic stuff like setting breakpoints, watching variables, stepping, continuing, etc.

For C::B to use CDB, it must be able to find it. So, you have to install the Microsoft Debugging Tools for Windows and then add the installation path to the "Additional paths" in the MSVC* compiler's options (in default installations, this path is "C:\Program Files\Debugging Tools for Windows").
If you do the above and still have problems running CDB, ask away (giving as much info as possible).
Be patient!
This bug will be fixed soon...

Offline GeertVc

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: C::B and MS 2005 free compiler?
« Reply #13 on: August 14, 2006, 10:01:43 am »
For C::B to use CDB, it must be able to find it. So, you have to install the Microsoft Debugging Tools for Windows and then add the installation path to the "Additional paths" in the MSVC* compiler's options (in default installations, this path is "C:\Program Files\Debugging Tools for Windows").
If you do the above and still have problems running CDB, ask away (giving as much info as possible).

Hi Mandrav,

To use C::B with the M$ debugging tools, I've followed a tutorial I downloaded a while ago from the site gametutorials.com.  Unfortunately, it doesn't seem to be "free" anymore.  It's now part of a CD they're selling (if you want, I can still send it to you, but it's quite big: 22.5MB zipped).

In there, it's nicely explained how to set up C::B with the Platform SDK (PSDK-x86) and the M$ Visual C++ Visual toolkit 2003.

Since this toolkit is not supported anymore by M$ (replaced by the newer an free(!!!) Visual Studio Express 2005 line), I looked to one of the threads above to install a "new" compiler, named Visual Studio Express 2005.

I followed this guideline, but I posted a message here in this thread (see some messages before this one) to mention things don't work fine...

Now I see you're talking about another M$ debugger: "Microsoft Debugging Tools for Windows".  Is this newer/better/different to the free Express 2005 compiler?  Is this the debugger we have to install iso. the Express 2005, like it is mentioned a few messages above?

Pls. clarify if possible, because it's a bit "blurred" for me now.

Best rgds,

--Geert
"Minds are like parachutes, they only work when opened"

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: C::B and MS 2005 free compiler?
« Reply #14 on: August 14, 2006, 10:49:53 am »
Quote
Now I see you're talking about another M$ debugger: "Microsoft Debugging Tools for Windows".  Is this newer/better/different to the free Express 2005 compiler?  Is this the debugger we have to install iso. the Express 2005, like it is mentioned a few messages above?

OK, let's get some things straight first.

The Visual* Microsoft IDEs use the Ms debuggers "natively", i.e. communicating with the debugger DLLs through an API of some sort.

We don't have access to those DLLs and/or the API. So we must interface through a command-line frontend for the debugger. Much as we do with GDB.
This command-line frontend is cdb.exe. I don't know if it's part of the Visual* IDE editions. If you have one of them you can check for yourself. If it's there, no problem, put its path in "Additional paths" and it should work (assuming it is using the same text-interface as the standalone cdb.exe provided by Debugging Tools for Windows).
But, if cdb.exe is not on your hard disk, you must install the Debugging Tools for Windows which contain it, as said in my previous post.
Be patient!
This bug will be fixed soon...