Re: Undefined Reference errors...

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

 



russdot <russdot@xxxxxxxxx> writes:

> 3) Now, when I try to compile (on windows) the provided example main program
> using: g++ -L. main.cpp -lDataIO -o main.exe
> I get 'undefined reference' errors to functions that are defined in the
> library... Am I missing something or doing something wrong?

It is often not possible to link together C++ programs compiled with
different compilers.  This is because different C++ compilers tend to
use different ABIs and different symbol manglings.  This kind of thing
will only work if you restrict yourself to a C API written using extern
"C".

Ian

[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