|
![](/i/fill.gif) |
In article <36C3426B.32FC9456@public.uni-hamburg.de> , Daniel Fenner
<Dan### [at] public uni-hamburg de> wrote:
> 1) I guess 'extern "C" {...}' is used to include C headers into C++
> files
> (correct me if I am wrong)
> What I need is the opposite : including a C++ header into a C file.
Some compilers allow to enforce this with a cdecl declaration of a function.
Instead of
void foo();
you would write
void cdecl foo();
However, cdecl is _not_ an ISO C or ISO C++ keyword and might not work with
your compiler.
> 2) As a work-around I compiled the hole source code as C++. (the option
> for VC5.0 is /TP) I'm not completly happy with this. A lot of things
> had to be changed (prototypes and typecasts mainly) Furthermore the
> linker now produces some unresolved references I can not explain.
> I used /FORCE and had luck :->.
Hmm, this is strange. Where were these changes required? In the core code or
in the platform specific code? The core code itself should compile without
error using a C++ compiler...if it does not, it would be very interesting
where VC had problems.
Thorsten
Post a reply to this message
|
![](/i/fill.gif) |