compiling C code using aCC on HPUX

From: wenmang (wenmang_at_yahoo.com)
Date: 10/25/03


Date: 24 Oct 2003 16:41:18 -0700

Hi,
We have the 3rd party libraries written in C. And, in every header
file from 3rd party, it has the include guarde:
#ifdef __cplusplus
#define extern "C" {
:
APIs...
:
}
#endif
:
:
To me, it is clear that the 3rd party libraries must be compiled using
C and C++ compiler should not do anything about them and linker should
take care of them at link time.

Here is my question:
Could I compile C++ program using those C APIs? What I mean here is: I
want to use aCC(HPUX) to compile everything and treat all 3rd party C
APIs as regular C functions, and I failed.

If 3rd party header files don't have extern "C" include guard, could I
succeed?
If I want to succeed, I should using C++ compiler to recompile all 3rd
party libraries(C codes), is this a correct statement?



Relevant Pages

  • Re: compiling C code using aCC on HPUX
    ... > And every header file from 3rd party has the guard: ... it is clear that the 3rd party libraries must be compiled using ... The third party source files should contain something like this: ... Your C++ compiler may actually call the C compiler ...
    (comp.lang.cpp)
  • Re: Microcontroller development board
    ... >> I don't believe that TI has ever had their own C compiler for the ... The limited version of the IAR compiler, ... > kits or as a TI download, has been getting better with every version; ... There are also plenty of 4th party compilers out there ...
    (sci.electronics.design)
  • Re: NativeOverlapped default constructor error
    ... I am porting code from another party, and am working in Managed C++. ... constructor DOES exist. ... The compiler recognizes what ...
    (microsoft.public.vc.language)
  • Re: Control for selecting dates and times
    ... I *think* that is only available if the compiler version of VB is installed or if a 3rd party application that used it is installed on the user computer... ... what are the limitations of them? ...
    (microsoft.public.excel.programming)
  • Re: About constants
    ... As you mentioned using extern will stop the compiler from ... But the linker needs to know the *definition* of the ... > another header file. ...
    (microsoft.public.vc.language)