Subject:
|
Re: Error linking c++ with gcc 3.3
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Wed, 18 Jun 2003 09:26:42 GMT
|
Viewed:
|
3159 times
|
| |
| |
On Tuesday 17 June 2003 06:39, Michael van der Kolff wrote:
> Hi, I'm having a slight problem building the c++ demos with gcc-3.3.
> (I had to do a tiny patch against a few files to overcome the fact
> that multiline strings are now not supported). But when it comes to
> building the c++ demos, I get the following stuff:
You should add -fno-rtti -fno-exceptions to the CXXFLAGS in
Makefile.common.
To get rid of the operator new/delete errors you can replace
lib/c++/stub.c with a stub.cpp containing the following. Don't forget
to update the Makefile. This works for me with gcc-3.0.
Jochen
---- stub.cpp ------------------
typedef unsigned size_t;
extern "C" void* malloc(size_t);
extern "C" void free(void*);
void operator delete(void* ptr) {
free(ptr);
}
void *operator new(unsigned int size) {
return malloc(size);
}
--------------------------------
--
Jochen Hoenicke, University of Oldenburg, 26111 Oldenburg, Germany
Email: hoenicke@informatik.uni-oldenburg.de Tel: +49 441 798 3124
|
|
Message has 1 Reply: | | Re: Error linking c++ with gcc 3.3
|
| No, I'm sorry, it doesn't seem to quite work. But it does get rid of the 3 errors at the bottom - Now it's just the operator new/delete stuff. I replaced the stub.c with the thing below, made libc++.a, and just make in lib/c++, and then go to demo (...) (21 years ago, 19-Jun-03, to lugnet.robotics.rcx.legos)
|
Message is in Reply To:
| | Error linking c++ with gcc 3.3
|
| Hi, I'm having a slight problem building the c++ demos with gcc-3.3. (I had to do a tiny patch against a few files to overcome the fact that multiline strings are now not supported). But when it comes to building the c++ demos, I get the following (...) (21 years ago, 17-Jun-03, to lugnet.robotics.rcx.legos)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|