Author Topic: Visual C++ 2008 ?  (Read 12758 times)

Offline johne53

  • Regular
  • ***
  • Posts: 253
Visual C++ 2008 ?
« on: October 24, 2009, 10:16:04 am »
Sometime last year I installed C::B under Windows. I think it was installed from a zip file (7zip perhaps?) - i.e. not compiled from source. I've been using it with cygwin gcc and (very occasionally) with Visual C++ version 6.

I need to upgrade my copy of Visual C++ but I noticed that the only later edition (available in Code::Blocks's dropdown list) is Visual Studio 2005. AFAIK 2005 is no longer available. I just wondered if:-

a) I should install Visual Studio 2008 and "hope" it works if I select the 2005 option - or

b) Will 2008 be listed as an option if I upgrade Code::Blocks?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Visual C++ 2008 ?
« Reply #1 on: October 24, 2009, 12:23:21 pm »
b) Will 2008 be listed as an option if I upgrade Code::Blocks?

Yes it's listed, but if it works out of the box without tweaking, I don't know (didn't use visual studio since old VS6.0 times).

You can try an actual nightly, but it has an issue with filling the symbols-browser-tree, which can lead to a slowdown in very large projects, or when showing everything in the symbols-browser.
If that is a problem for you, you should wait for the next nightly, where this issue is fixed.

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: Visual C++ 2008 ?
« Reply #2 on: October 24, 2009, 10:16:08 pm »
a) I should install Visual Studio 2008 and "hope" it works if I select the 2005 option - or

b) Will 2008 be listed as an option if I upgrade Code::Blocks?

I am using nightly build 5859 with Visual C++ 2008 Express. It works fine. I also used it with Visual C++ 2005 Express in the past successfully. VC2008 Express works better than VC2005 Express with Code::Blocks for wxWidgets development, because 2008 includes the SDK.


Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Visual C++ 2008 ?
« Reply #3 on: October 25, 2009, 12:18:00 pm »
Thanks guys. Believe it or not I managed to find VC++2005. At some stage I might try out VC++2008 but for the time being I want to stick with 2005 because it seems to have a high degree of backwards compatibility with VC++6.

VC++2005 runs fine from its own IDE but when I try to compile a module using C::B as my IDE I get an unhandled exception and C::B stops working.

Jens, if you can let me know when the symbols-browser-tree issue is fixed, I'll upgrade to the latest nightly. Or if it's going to take a long time to fix, is there any way I can find out what's causing the exception?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Visual C++ 2008 ?
« Reply #4 on: October 25, 2009, 12:31:17 pm »
Jens, if you can let me know when the symbols-browser-tree issue is fixed, I'll upgrade to the latest nightly.

It's fixed in trunk and will be in the next nightly.
The symbols-browser issue does not slow down the whole IDE.
If you disable the symbols-browser, you will not have problems.
CodeCompletion works, it was just an issue with filling the tree-control.

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Visual C++ 2008 ?
« Reply #5 on: October 25, 2009, 02:28:32 pm »
Thanks Jens. I don't know if this is significant but I can't seem to download any of the nightly builds. I've tried using Internet Explorer, FireFox and Safari but none of the links seem to work in any browser. Is the server down maybe?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Visual C++ 2008 ?
« Reply #6 on: October 25, 2009, 02:53:42 pm »
Try the second berlios-server the first one is down at the moment, see this post of Tim (stahta01) http://forums.codeblocks.org/index.php/topic,11311.msg77650.html#msg77650 .

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Visual C++ 2008 ?
« Reply #7 on: October 25, 2009, 04:26:08 pm »
Okay, I went to the 2nd server and upgraded C::B, together with mingwm10.dll and wxmsw28u_gcc_cb.dll

Firstly, VC++ 2008 isn't listed among the supported compilers - although that isn't too important because I'm still using 2005 which is listed. However C::B still crashes when I try to compile anything using VC++2005. The crash is slightly more graceful this time. Instead of getting an "unhandled exception" I now get the familiar Windows dialog box saying "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."

Sounds to me like a mismatched DLL problem. I'm running Windows XP Home Edition, Service Pack 2. Should that be okay?

P.S. mingwm10.dll is dated 3rd August 2007 which seems quite old. Is that correct?
« Last Edit: October 25, 2009, 04:28:40 pm by johne53 »

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Visual C++ 2008 ?
« Reply #8 on: October 26, 2009, 10:26:32 am »
FWIW I've tried two further experiments this morning - neither of which has fixed the problem.

The first thing I did was to rename my CodeBlocks folder to CodeBlocks.old and then re-install C::B completely afresh. When that didn't work I installed VC++2008 and I tried running it instead of VC++2005. That didn't solve the problem either.

The only thing I can think of is that I'm running the 'Express' editions of VC++. Maybe they just don't work with CodeBlocks. However, they work fine within themselves so I can't think of a reason why they shouldn't work with CodeBlocks.

Is there any way to find out what's causing this runtime termination? It happens as soon as I try to compile any file with anything later than VC++6. I don't think C::B is even getting to the stage of creating any log files....  :(

Offline koso

  • Multiple posting newcomer
  • *
  • Posts: 58
Re: Visual C++ 2008 ?
« Reply #9 on: October 26, 2009, 10:31:28 am »
Have you tried it with clear C::B configuration files? If not, backup them and try to run without them, they should be recreated on next startup of C::B -> sometimes this helps.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Visual C++ 2008 ?
« Reply #10 on: October 26, 2009, 10:57:05 am »
Firstly, VC++ 2008 isn't listed among the supported compilers - although that isn't too important because I'm still using 2005 which is listed.
[...]
P.S. mingwm10.dll is dated 3rd August 2007 which seems quite old. Is that correct?

I wonder why it is not listed, I just downloaded and installed the svn r5859 and have an entry Microsoft Visual C++ 2005/2008, if it's not there something went wrong.

Yes, it seems to be the correct version of mingwm10.dll.

As koso wrote, you can try to delete (or better temporarily rename) C::B's conf-folder and see what happens.

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Visual C++ 2008 ?
« Reply #11 on: October 26, 2009, 11:15:20 am »
Koso - thanks for the tip. That's left me with some important changes - some good and some bad. The bad news is that I no longer have any entry to select VC++6 as a compiler option (though hopefully I could add it back again?)

The good news is that the compiler entry for VC++2005 now says "Microsoft Visual C++ 2005/2008" and it no longer seems to be crashing if I select it as the project's compiler.

Strangely enough however, the only build options that work are Build (CTRL+F9) and Rebuild All (CTRL+F11). I can no longer simply compile an individual file using CTRL+SHIFT+F9 (that option just seems to get ignored).

So it's one step forward and two steps backward at the moment - but at least some kind of building is now possible with VC++2005 and 2008.

Jens, I can probably figure out how to restore my old option for VC++6 by copying the relevant section from my (backed up) config file - but can you help me to make CTRL+SHIFT+F9 work again? i use that quite a lot.
« Last Edit: October 26, 2009, 11:34:34 am by johne53 »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Visual C++ 2008 ?
« Reply #12 on: October 26, 2009, 12:22:43 pm »
I don't know, why Ctrl+Shift+F9 does not work, it works for me if gcc is my default compiler, but if I make VC++2005/2008 to my default compiler, nothing happens (except for clearing th elog window), but I do not have any MS-compiler installed.

To copy settings from the backed up default.conf to the newly created one, you should use cb_share_config.exe, which resides in C::B's executable folder.

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Visual C++ 2008 ?
« Reply #13 on: October 26, 2009, 01:10:37 pm »
I don't know, why Ctrl+Shift+F9 does not work, it works for me if gcc is my default compiler, but if I make VC++2005/2008 to my default compiler, nothing happens (except for clearing th elog window)

Yes, that's what I'm getting too. However, the other build options work for me, so the compiler is obviously present.

I'm just going out for a couple of hours but I'll try cb_share_config.exe a little later. Thanks for letting me know.

Offline johne53

  • Regular
  • ***
  • Posts: 253
Re: Visual C++ 2008 ?
« Reply #14 on: October 26, 2009, 04:15:06 pm »
Hi Jens. I managed to do the relevant merging with cb_share_config.exe and it seems to have worked fine. However AFAICT Ctrl+Shift+F9 just doesn't work any more with the majority of compilers. The main compiler I use with C::B is Cygwin-gcc. This has worked for at least a couple of years but is now exhibiting the same problem (Ctrl+F9 works, Ctrl+F11 works but Ctrl+Shift+F9 has stopped working).