Problem linking objects generated from c++ and c/fortran files

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

 



Hi all,

I have a compatibility problem. If I generate object files from c++ source code (file.cc) with gcc, they are incompatilbe with object files generated from c or fortran sources (file.c or file.f) with g77/gcc. While linking I always get error: reference not found. I looked into those object files using emacs. The function interfaces look indeed different. E.g. the function called interface which has two arguments:

double interface(int arg1, double* arg2)

looks like @interface@ in file.o obtained from file.c but somehow different like @Z9interfaceiDR@ in file.o obtained from file.cc. Is it possible to overcome this problem?
I would expect at least C and C++ compiler to generate compatible object files. But it seems to be not the case.


--
Best regards / Freundliche Grüße

Alexander Maltsev

[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