Author Topic: C::B, Microsoft Visual Studio C++ 6.0 and debugging  (Read 2651 times)

Offline pacorrop

  • Single posting newcomer
  • *
  • Posts: 6
C::B, Microsoft Visual Studio C++ 6.0 and debugging
« on: October 17, 2008, 11:23:23 am »
Hi there. First of all, I'm a Spaniard and I don't know if my English is poor or good. Apologizes for that :P

My experience with C::B and MSVS C++ 6.0, VC++ 6.0  has been a very hardy way, but I think I've got it. Here's the sequence I -think I- did:

- I followed the instructions from here and I did compile with few troubles: LNK1181 error is very annoying ;). If anybody else has had this problem and does not yet know how to solve it, I'll be pleased to try to help him. In general, if MSVC compiles and C::B doesn't, I guess there's a problem with options in compiler-linker.

- For debug, I think -but I'm not sure- MSVC ++ 6.0's debugger is wrapped into msdev.exe executable, so I don't know if there's any chance to access from C::B to use it. So I downloaded Windows' debugging tools from Microsoft's website.
    ยท It brings cdb.exe as debugger, but I haven't made it to work inside C::B. So my only way to debug correctly has been executing windbg.exe. Outside from C::B, yes :(. It's not the panacea, wop.

Considerations:

- WinDbg is very fussy with symbol path. And my project was linked with the option -pdbtype:sept (I don't know why was that option, I'm continuing a previous-made project), so WinDbg didn't find the symbol table and I didn't see my variables as I wished. So I removed that option and it worked.

I hope this is useful for you people.

Regards!

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9613
Re: C::B, Microsoft Visual Studio C++ 6.0 and debugging
« Reply #1 on: October 17, 2008, 01:19:31 pm »
LNK1181 error is very annoying ;). If anybody else has had this problem and does not yet know how to solve it, I'll be pleased to try to help him. In general, if MSVC compiles and C::B doesn't, I guess there's a problem with options in compiler-linker.
Just tell it in this thread. What's the actual problem? How to reproduce? How to work-around / solve?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline pacorrop

  • Single posting newcomer
  • *
  • Posts: 6
Re: C::B, Microsoft Visual Studio C++ 6.0 and debugging
« Reply #2 on: October 17, 2008, 03:39:54 pm »
Well, in my particular case, if I compiled from MSVC there wasn't any problem. But, if I import the .dsp file in C::B and I compile, the LNK1181 problem appears. The project used the library qt-mt230nc.lib (Qt version 2? OMG XD), but when I compile from C::B, the problem LNK1181 was attached to a "missing" library: qt-mt230nc.obj. The library was obviously there, but its extension wasn't .obj, but .lib.

What I did is simple: in Project-->Properties-->button Project's Build Options-->Win 32 Debug/Release--> Linker Settings there was an entry called $(QTDIR)\lib\qt-mt230nc (without extension), and I just added the .lib extension. That's all :)

I also changed the name of qt-mt230nc.lib to qt-mt230nc.obj without touching any of linker settings, but I think this way is a bit grotty x)
« Last Edit: October 17, 2008, 03:41:59 pm by pacorrop »