Re: Is "undefined reference" the same as "unresolved external symbol"?

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

 



On 18 January 2015 at 01:23, emkessler wrote:
> Jonathan Wakely-4 wrote
>> It usually means you've named the file twice on the command line
>
> Sorry, I should have  noticed that myself. One more question, and I think
> this should be the last.

It's certainly the last one I'm going to answer.

I already asked you to show the full command you're using. Why are you
asking what you did wrong, without showing what you did? Are you
trying to make it difficult on purpose?


> I'm getting the following linker errors:
>
> FluxWarrior2D.o:FluxWarrior2D.cpp:(.text+0x685): undefined reference to
> `__cxa_end_catch'
> FluxWarrior2D.o:FluxWarrior2D.cpp:(.text+0x693): undefined reference to
> `__cxa_end_catch'
> FluxWarrior2D.o:FluxWarrior2D.cpp:(.text+0x6a4): undefined reference to
> `__cxa_get_exception_ptr'
> FluxWarrior2D.o:FluxWarrior2D.cpp:(.text+0x6b3): undefined reference to
> `__cxa_begin_catch'
> FluxWarrior2D.o:FluxWarrior2D.cpp:(.text+0x753): undefined reference to
> `__cxa_end_catch'
> FluxWarrior2D.o:FluxWarrior2D.cpp:(.text+0x762): undefined reference to
> `__cxa_begin_catch'
> FluxWarrior2D.o:FluxWarrior2D.cpp:(.text+0x776): undefined reference to
> `__cxa_end_catch'
>
> I assume that I have to add a library to the command line, but I couldn't
> find it in the documentation. What library do I need to add?


Try linking using g++ not gcc.

Or read the manual https://gcc.gnu.org/onlinedocs/gcc/Invoking-G_002b_002b.html



[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