Author Topic: Installing libraries from VC++ 6.0  (Read 10902 times)

Offline Alturin

  • Multiple posting newcomer
  • *
  • Posts: 79
Installing libraries from VC++ 6.0
« on: July 06, 2006, 12:04:33 am »
[FIXED]
The instructions at the wiki 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.
« Last Edit: July 24, 2006, 04:24:28 pm by Alturin »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline lfm

  • Multiple posting newcomer
  • *
  • Posts: 68
But no debbuger: cdb.exe ?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9545
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.
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 lfm

  • Multiple posting newcomer
  • *
  • Posts: 68
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 ?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9545
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.
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 Alturin

  • Multiple posting newcomer
  • *
  • Posts: 79
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 :).

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
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 ;)
Be patient!
This bug will be fixed soon...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline lfm

  • Multiple posting newcomer
  • *
  • Posts: 68
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: [Select]
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
......
« Last Edit: July 06, 2006, 11:33:48 am by lfm »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9545
Code: [Select]
[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]
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 lfm

  • Multiple posting newcomer
  • *
  • Posts: 68
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
I open the default.conf, find this compiler id is "microsoft_visual_c_6".

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
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.
Be patient!
This bug will be fixed soon...

Offline Alturin

  • Multiple posting newcomer
  • *
  • Posts: 79
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?
« Last Edit: July 06, 2006, 12:40:44 pm by Alturin »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9545
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: [Select]
    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.
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 Alturin

  • Multiple posting newcomer
  • *
  • Posts: 79
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!

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
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.
Be patient!
This bug will be fixed soon...

Offline Alturin

  • Multiple posting newcomer
  • *
  • Posts: 79
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: [Select]
error C2065: 'OSVERSIONINFO' : undeclared identifierWhen I don't have WIN32 defined, I get errors like
Code: [Select]
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: [Select]
#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  :(

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
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.
Be patient!
This bug will be fixed soon...

Offline Alturin

  • Multiple posting newcomer
  • *
  • Posts: 79
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?