Re: merging C/C++ code

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

 



Dieter Stüken wrote:
I developed a C++ wrapper around some old C-code using:

It worked great, until the developers of that C-Api meanwhile
also got same idea and included lots of "#ifdef __cplusplus"
and some wrapper classes, too. Unfortunately they are useless to
me and even quite buggy. CGG even refuses to compile them :-(

Although it seems to work, this solution looks very odd to me.
Is there a better way to handle this? I also worry about additional
system headers which may then be included randomly within different
contexts....

If I understand correctly, you're trying to use some header files in a C++ program that think they are C++ aware, but are, infact, not. Any solution that does not actually fix those headers is going to be a hack.

You can either
1) stick with the old headers
2) beat the C-API authors with a C++ std :)
3) hack something akin to what you have, and keep your fingers crossed.

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@xxxxxxxxxxxxxxxx    ::     http://www.planetfall.pwp.blueyonder.co.uk


[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