Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Alturin on July 06, 2006, 12:04:33 am

Title: Installing libraries from VC++ 6.0
Post by: Alturin on July 06, 2006, 12:04:33 am
[FIXED]
The instructions at the wiki (http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_C_6_with_Code::Blocks_IDE) are exactly what I needed, I have updated them to fix the warnings.
[/FIXED]


Heya,

I just started using Code::Blocks and I wanted to continue doing so in my vacation. I'll only have a laptop available though, with no internet, so a quick reply would be immensly appreciated.
I have a project designed to use the VC++ 6.0 libs, which I do have (I might even still have the setup somewhere). When trying to compile the project on a freshly installed Code::Blocks (RC2) it complaints that the function unlink isn't defined. Makes sense, it's in Microsoft's stdio.h, not in MinGW's.
My solution, I have microsoft's stdio.h, I probably have the libraries (although I don't know where to find them?), now how do I get C::B to use those libs?.

I really hope I can get help before I'm leavin' :).
Thanks in advance,

Alturin.
Title: Re: Installing librairys from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: thomas on July 06, 2006, 12:12:33 am
Looks like you are an extremely lucky guy.

Morten wrote a WiKi on how to integrate VisualC 6 only just 5 hours ago: http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_C_6_with_Code::Blocks_IDE

You might want to use a more recent build of Code::Blocks, though, since non-gcc compiler support in RC2 is a bit flakey sometimes.
Title: Re: Installing librairys from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: lfm on July 06, 2006, 03:57:15 am
But no debbuger: cdb.exe ?
Title: Re: Installing librairys from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: MortenMacFly on July 06, 2006, 08:18:28 am
But no debbuger: cdb.exe ?
You need the MS Debugging tools for that. This will include the debugger "cdb.exe". Google for "Microsoft Debugging Tools" on microsoft.com. They are freely available.
With regards, Morten.
Title: Re: Installing librairys from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: lfm on July 06, 2006, 08:37:33 am
You need the MS Debugging tools for that. This will include the debugger "cdb.exe". Google for "Microsoft Debugging Tools" on microsoft.com. They are freely available.
With regards, Morten.
thx!
Is vc6 without debugger(command line) itself ?
Title: Re: Installing librairys from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: MortenMacFly on July 06, 2006, 09:42:14 am
Is vc6 without debugger(command line) itself ?
To be honest: I don't know. I tried to figure out the meanings of the tools behind the IDE but I couldn't figure out what of these is a command line debugger (if there is any).
Anyway, cdb should work just fine usually and is integreated with C::B. So even if there is a VC6 debugger I doubt if it is compatible with C::B. But if you figure out something in that direction please let me (us) know.
Title: Re: Installing librairys from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: Alturin on July 06, 2006, 10:00:52 am
Looks like you are an extremely lucky guy.

Morten wrote a WiKi on how to integrate VisualC 6 only just 5 hours ago: http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_C_6_with_Code::Blocks_IDE

You might want to use a more recent build of Code::Blocks, though, since non-gcc compiler support in RC2 is a bit flakey sometimes.

Extremely lucky indeed :D, thanks heaps Morten!
Is there a sortof stable nightly build that you could reccomend? I wouldn't want to be stuck with a bugged build for two weeks :).
Title: Re: Installing librairys from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: mandrav on July 06, 2006, 10:13:25 am
Is there a sortof stable nightly build that you could reccomend? I wouldn't want to be stuck with a bugged build for two weeks :).

Well, install the latest nightly possible but grab a couple of older ones just to be on the safe side ;)
Title: Re: Installing librairys from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: thomas on July 06, 2006, 10:27:03 am
Quote
Is there a sortof stable nightly build that you could reccomend?
They should all be quite stable. The last available should do you equally well.

I have been using bi-daily updated, self-compiled versions as  "production version" without any problems for many months without any crashes, so stability should not be a concern.

Make sure you don't mix up RC2 and a nightly build, that'll bear dll conflicts.
Title: Re: Installing librairys from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: lfm on July 06, 2006, 11:31:46 am
I using WinXP + VC6 + CDB.EXE(Debugging Tools for Windows) + C::B, there is a error when start debugger, this is the debugger log:
Code
Command-line: D:\Debugging Tools for Windows\cdb.exe -nx -fullname  -quiet -args F:/Prog/Debug/ex03a.exe
Working dir : F:\Prog\
> set prompt >>>>>>cb_gdb:
cdb: Invalid switch 'n'
cdb: Invalid switch 'f'
cdb: Invalid switch 'q'
cdb version 6.6.0003.5
usage: cdb [options]
Options:
  <command-line> command to run under the debugger
......
Title: Re: Installing librairys from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: MortenMacFly on July 06, 2006, 11:38:32 am
Code
[quote author=lfm link=topic=3487.msg27418#msg27418 date=1152178306]
[code]-nx -fullname  -quiet -args
[/quote]
Hehe... looks like the debugger gets passed the arguments for GDB...
I guess it has to do because the compiler id isnt mscvtk anymore... mandrav?! ;-)[/code]
Title: Re: Installing librairys from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: lfm on July 06, 2006, 11:54:52 am
Hehe... looks like the debugger gets passed the arguments for GDB...
I guess it has to do because the compiler id isnt mscvtk anymore... mandrav?! ;-)
This is my reference too:http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_C_6_with_Code::Blocks_IDE (http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_C_6_with_Code::Blocks_IDE)
I open the default.conf, find this compiler id is "microsoft_visual_c_6".
Title: Re: Installing librairys from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: mandrav on July 06, 2006, 12:06:46 pm
Hehe... looks like the debugger gets passed the arguments for GDB...
I guess it has to do because the compiler id isnt mscvtk anymore... mandrav?! ;-)

Right. I 've been meaning to make it smarter than that but I didn't have the time yet. Will try to look into it today.
Title: Re: Installing librairys from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: Alturin on July 06, 2006, 12:26:42 pm
Would it be possible to, say, use the GDB debugger along with the other VC++ 6.0 stuff, instead of the not working cdb.exe?
Title: Re: Installing librairys from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: MortenMacFly on July 06, 2006, 01:20:00 pm
Would it be possible to, say, use the GDB debugger along with the other VC++ 6.0 stuff, instead of the not working cdb.exe?
Hard to say, but I guess there is a reason for why using a debugger optimised for a specific compiler. Currently the only reason why thi is not working is because the compiler id is set to seomething else than "msvctk" if you add the MSVC6 stuff... you could probably patch C::B yourself in the meantime to fix this.
The methoid is in debuggerstate.cpp, called: DebuggerState::StartDriver.
You would have to change the code into something:
Code
    if ((idx == _T("msvctk")) || (idx == _T("microsoft_visual_c_6")))
        m_pDriver = new CDB_driver(m_pPlugin);
    else
        m_pDriver = new GDB_driver(m_pPlugin);
Anyway, this is just a workaround, as mandrav said already.
With regards, Morten.
Title: Re: Installing libraries from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: Alturin on July 06, 2006, 01:28:28 pm
Thanks man, I'll go do that, I was already busy compiling WxWidgets for the SVN C::B, so it'll be to fix that before compiling, again, thanks!
Title: Re: Installing librairys from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: mandrav on July 06, 2006, 02:41:50 pm
Hehe... looks like the debugger gets passed the arguments for GDB...
I guess it has to do because the compiler id isnt mscvtk anymore... mandrav?! ;-)

Right. I 've been meaning to make it smarter than that but I didn't have the time yet. Will try to look into it today.

Found the time, looked into it, made it smarter and commited the fix.
Title: Re: Installing librairys from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: Alturin on July 06, 2006, 11:57:22 pm
Hehe... looks like the debugger gets passed the arguments for GDB...
I guess it has to do because the compiler id isnt mscvtk anymore... mandrav?! ;-)

Right. I 've been meaning to make it smarter than that but I didn't have the time yet. Will try to look into it today.

Found the time, looked into it, made it smarter and commited the fix.

Apparently it still doesn't work, revision 2699 still passes the -g flagg.
Also, following Morten's instruction, WIN32 was not defined? When I manually define WIN32 I get other errors like:
Code
error C2065: 'OSVERSIONINFO' : undeclared identifier
When I don't have WIN32 defined, I get errors like
Code
src\include.h:53: fatal error C1083: Cannot open include file: 'sys/time.h': No such file or directory
:: === Build finished: 1 errors, 0 warnings ===
Here's some of the erroring code:
Code
#ifdef WIN32
#include <time.h>
#include <sys/timeb.h>
#include "wincfg.h" // windows configure file
#else
#include "config.h"
#if defined(__unix__) && !defined(unix) // we expect to see unix
#define unix __unix__
#endif
#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
#include <sys/resource.h>
#include <unistd.h>
#include <sys/socket.h>
#endif

(Working perfectly on VC++ 6.0 and Gcc on FC5).
I think I'm stuck with VC++ 6.0 during my holliday  :(
Title: Re: Installing libraries from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: mandrav on July 07, 2006, 08:32:37 am
Hehe... looks like the debugger gets passed the arguments for GDB...
I guess it has to do because the compiler id isnt mscvtk anymore... mandrav?! ;-)

Right. I 've been meaning to make it smarter than that but I didn't have the time yet. Will try to look into it today.

Found the time, looked into it, made it smarter and commited the fix.

Apparently it still doesn't work, revision 2699 still passes the -g flagg.

Before quoting someone, make sure you 're talking about the same issue. What I fixed had to do with the debugger, not the compiler.
Title: Re: Installing libraries from VC++ 6.0 - Please reply quickly (leavin' friday)
Post by: Alturin on July 24, 2006, 04:26:29 pm
Before quoting someone, make sure you 're talking about the same issue. What I fixed had to do with the debugger, not the compiler.

Sorry, didn't read properly  :oops:, I updated the wiki to (temporarily?) fix the problem, will there be a real fix?