RE: library created with gcc acceptable in MS VC++ application ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Anup,

>By extension, if I stick to ansi C, can I mix gcc compiled libraries:

No, many vendors have their own compiled (.lib, .a) library format.

>Do the answers apply equally to object files (.o, .obj)...?

No.

>...and shared/dynamic libraries (.dll, .so) ?

Yes, given the C ABI caveat.

>e.g. can I replace a .so created with Sun's compiler on solaris with a gcc generated .so ?

Yes, given the C ABI caveat.

>Do the answers follow from some kind of formal ansi C compliance contract (would appreciate a URL) or lack thereof ?

On Solaris, they have a well-specified C ABI specification.

On Windows, there is a well-specified DLL specification. (But that doesn't extend to a C++ ABI for DLLs.)

Other platforms (Linux, Darwin, Amiga, Mac OS 9, et al) are in a similar situation.

> Finally, here is the context of my questions
. My clients:
   . Applications - C/C++
   . Platforms - Windows, Linux, IRIX, Solaris, hp-ux, AIX ...
   . Development environments - MSVS, gcc, etc.. (native compilers)
. Me'self:
   . Algorithms - C (some Java, hope to use gcj)
   . Deliverables - plug-in libraries
   . Development environment - prefer GCC solely

Are your plug in libraries .DLL and .so files, with a C ABI? Then that should work.

I'm not sure what you are using Java for, since Java compiles to bytecode for a JVM.

(In my opinion, the JVM is an operating system unto itself. On par with OS X or Windows NT ... it just happens to be hosted on another OS. That's a somewhat simplified view of things.)

--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux