Hi!
I got the following errors from the linker (using latest version of
DJGPP and gcc/gpp). But, why are the operators
undefined????
Any ideas?
.../../lib/djgpp.v2/libSWORD.a(spy.o):spy.cc:(.text+0x120): undefined
reference t
o `operator new[](unsigned long)'
.../../lib/djgpp.v2/libSWORD.a(spy.o):spy.cc:(.text+0x18c): undefined
reference t
o `operator delete(void*)'
.../../lib/djgpp.v2/libSWORD.a(spy.o):spy.cc:(.text+0x2f6): undefined
reference t
o `operator new[](unsigned long)'
.../../lib/djgpp.v2/libSWORD.a(spy.o):spy.cc:(.text+0x432): undefined
reference t
o `operator delete(void*)'
.../../lib/djgpp.v2/libSWORD.a(spy.o):spy.cc:(.eh_frame+0x11): undefined
referenc
e to `___gxx_personality_v0'
I can compile libsword.a without problems. But if i want to use it, i
got this errors.
Thanks, Flo
PS: DJGPP is the DOS-port of the Gnu Compilers. 2 2394
Florian Xaver wrote: I got the following errors from the linker (using latest version of DJGPP and gcc/gpp). But, why are the operators undefined???? Any ideas?
(a) You didn't define them.
(b) You defined them but didn't supply the source where they are defined
to the compiler.
(c) You defined them, compiled the source, but never gave the object file
to the linker.
(d) They are not for you to define because they are part of the standard
library (although they don't seem to be), but you didn't tell the
linker where to find that library.
Choose the one that fits your situation.
../../lib/djgpp.v2/libSWORD.a(spy.o):spy.cc:(.text+0x120): undefined reference t o `operator new[](unsigned long)' ../../lib/djgpp.v2/libSWORD.a(spy.o):spy.cc:(.text+0x18c): undefined reference t o `operator delete(void*)' ../../lib/djgpp.v2/libSWORD.a(spy.o):spy.cc:(.text+0x2f6): undefined reference t o `operator new[](unsigned long)' ../../lib/djgpp.v2/libSWORD.a(spy.o):spy.cc:(.text+0x432): undefined reference t o `operator delete(void*)' ../../lib/djgpp.v2/libSWORD.a(spy.o):spy.cc:(.eh_frame+0x11): undefined referenc e to `___gxx_personality_v0'
I can compile libsword.a without problems. But if i want to use it, i got this errors.
Thanks, Flo
PS: DJGPP is the DOS-port of the Gnu Compilers.
In comp.lang.c++ it matters not. If you need help on a particular
compiler, consider posting to that compiler's newsgroup (gnu.g++.help).
V
Florian Xaver wrote: Hi!
I got the following errors from the linker (using latest version of DJGPP and gcc/gpp). But, why are the operators undefined???? Any ideas?
../../lib/djgpp.v2/libSWORD.a(spy.o):spy.cc:(.text+0x120): undefined reference t o `operator new[](unsigned long)' ../../lib/djgpp.v2/libSWORD.a(spy.o):spy.cc:(.text+0x18c): undefined reference t o `operator delete(void*)' ../../lib/djgpp.v2/libSWORD.a(spy.o):spy.cc:(.text+0x2f6): undefined reference t o `operator new[](unsigned long)' ../../lib/djgpp.v2/libSWORD.a(spy.o):spy.cc:(.text+0x432): undefined reference t o `operator delete(void*)' ../../lib/djgpp.v2/libSWORD.a(spy.o):spy.cc:(.eh_frame+0x11): undefined referenc e to `___gxx_personality_v0'
I can compile libsword.a without problems. But if i want to use it, i got this errors.
Thanks, Flo
PS: DJGPP is the DOS-port of the Gnu Compilers.
make sure you are always using g++ and not gcc. both compile c++, but
g++ links the appropriate c++ libraries. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Ioannis Vranos |
last post by:
When we use the standard placement new operator provided in <new>, and
not a definition of owr own, isn't a call to placement delete enough?
Consider the code:
#include <new>
|
by: GianGuz |
last post by:
Global new and delete operators can be overloaded to suite particulars
needs. Typically they are overloaded to insert useful debugging/trace
informations. What I would to discuss here concerns the...
|
by: ambar.shome |
last post by:
Hi,
As you know there are few operators in C++ which cant be overloaded.
They are:
.., .*, ::, ?: , new , delete , sizeof , typeid , static_casr ,
dynamic_cast , const_cast ,...
|
by: Shark |
last post by:
Hi, if we need to change the behavior of operator new, it is called
overriding or overloading? My other question is, if we change the
behavior of operator new, do we use malloc to do that or we use...
|
by: Alexander Ubillus |
last post by:
Hello,
I'm reading this book (Self-Paced for 70-536) where it says that operators
are new both to VB:NET and C#. As far as i know operators exist for C# since
1.x and this link says so too:
...
|
by: Lighter |
last post by:
The C++ Standard Doesn't Permit Overloading new and delete?
In the 13.5 of The C++ standard (ISO/IEC 14882, 1998), I cannot find
the specification on overloading the operators new and delete;...
|
by: moleskyca1 |
last post by:
What operators cannot be virtual and why? I looked at FAQ and found
nothing.
I think there are operators that cannot be virtual, but I don't know
why?
|
by: dilabox |
last post by:
Hello,
I have overloaded the global new, delete, new and delete operators
inside a "static library". The library uses private memory allocation
routines that must not be accessible from other...
|
by: C++Liliput |
last post by:
Hi,
I was looking at the implementation of operator new and operator
new in gcc source code and found that the implementation is exactly
the same. The only difference is that the size_t argument...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |