Linking C and C++ together

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

 



Dear GCC-team,

I want to use both C and C++ in a program (unfortunatly, the C source isn't
compatible with C++), and therefore I must compile the C files with "-x c"
(otherwise I get lots of errors, due to old-style function definitions).
This works just fine, but when I try to link both objects together, C++ doesn't
find the C functions and the other way round! (undefined reference)
May this be because I use an older cygwin-version of GCC (3.3.3)? Is there any
work-around (e. g., allowing C code to be compiled into C++ compatible objects)?
I looked through the manual, but I wasn't able to find a solution...

Many thanks,
Daniel Kraft


[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