Re: Can I use a DLL compiled with bcc with a program compiled with gcc?





rozniy wrote:
> Can I use a DLL compiled with bcc with a program compiled with gcc (on
> Windows)?

in principle yes - any well written Win32 DLL is available to any other
development tool able to call it - whether it be another tool of the
same language or something else like VB or Delphi.

> Err, here's the background to my little problem. I'm using Dev-C++ (an
> IDE that uses gcc) with wxWidgets to create a GUI for a certain
> program (on Windows). The program is supposed to use this Data
> Acquisition card... but because of bureuacratic delays, I completed
> the GUI before the card arrived.
>
> WHen the card arrived, I saw, to program for the card, the provided
> libraries are for Visual C++ and Borland C++ (ending with ".lib"), and
> no provision for open source compilers (library files ending with
> ".a")...

Ah! Those aren't compiled DLL's but libraries for use with your
compiler as you would have noted with dissapointment!

> Dear oh dear oh dear...
>
> After thinking for a bit, I had 2 options:
> 1) Download wxWidgets for use with Visual C++, use the provided Data
> Acquisition libraries, and recompile my program
>
> 2) or... use Visual C++ or Borland C++ to create a dll using the
> provided .lib, to use with the original code, and recompile all with
> Dev-C++.
>
> Option 2 seems like less work... but I have doubts. I'm just learning
> to create dll's, so I'm a little fuzzy. Might it work?

there are certain things to remember when writing a DLL - a good Win32
book will explain them, there are also tutorials and code examples on
the www (though the quality varies). once you get the structure right,
the DllMain, imports/exports etc the rest is reasonably
straightforward.

msdn has an article about creating dll's here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_core_prepare_the_win32_dll_for_use.asp

which may be of use if you use VC to make one.

Windows specific programming groups can help with the more indepth stuff

.



Relevant Pages

  • Re: Things to avoid typing at a command prompt
    ... What checks would you expect for bash scripts? ... do you want the equivalent of the WINDOWS ... are you so strident for changing gcc? ...
    (comp.programming)
  • Re: Need help with templated iterators
    ... I'm busy porting an old library that currently runs under Windows onto ... The other compilers you are using probably don't use strict two-phase ... GCC is being rather more standards conformant ... Printing on GNU/Linux? ...
    (comp.os.linux.development.apps)
  • Re: Best free C compiler for Windows?
    ... > The gcc guys are constantly working towards closing the gap with Intel ... As far as free compilers are concerned GCC seems to be the best ... I guess because of this all Windows ports of GCC are totally ...
    (comp.programming)
  • Can I use a DLL compiled with bcc with a program compiled with gcc?
    ... Can I use a DLL compiled with bcc with a program compiled with gcc (on ... I'm using Dev-C++ (an ... program (on Windows). ... no provision for open source compilers (library files ending with ...
    (comp.programming)
  • Re: System-wide hooking, VB+ASM
    ... Yes, the DLL entry point, whether it is called DllMain or something else, is ... Windows before OLE existed. ... For half a century, compilers have generated object ... executables using the DLL get the new version automatically. ...
    (microsoft.public.vb.winapi)