Thread View: gnu.g++.help
3 messages
3 total messages
Started by The Supreme Commander
Mon, 09 Nov 1992 16:40
Help with g++/CC problem
Author: The Supreme Commander
Date: Mon, 09 Nov 1992 16:40
Date: Mon, 09 Nov 1992 16:40
22 lines
1272 bytes
1272 bytes
I have a c++ program that compiles fine under the Sun CC compiler, and I've managed to massage the code so that g++ accepts it, but I get this linker error: _malloc__FUl Obviously, it can't find the routine for this. Now, malloc is included in the standard libraries, so this can't be the problem. I would appreciate any help or advice on this problem. Again, CC will compile perfectly, so g++ must be doing something else to the code! E-mail responses preferred, but posts are welcome too. ...Manu -- --------------------------------------------------------------------- The Supreme Commander wishes you a Supreme day. I'm a Magic Man, oooh, I got the magic hands, yeah... Don't mind me, I'm just attempting to dock.
Re: Help with g++/CC problem
Author: Conor P. Cahill
Date: Tue, 10 Nov 1992 12:43
Date: Tue, 10 Nov 1992 12:43
23 lines
1162 bytes
1162 bytes
In article <BxGJo4.G0z@usenet.ucs.indiana.edu>, msingh@silver.ucs.indiana.edu (The Supreme Commander) writes:
>
> I have a c++ program that compiles fine under the Sun CC compiler, and
> I've managed to massage the code so that g++ accepts it, but I get
> this linker error:
> _malloc__FUl
This is the symbol generated for "void malloc(unsigned long)" when it
is not defined to be an external C function. What you probably need
to do is add something like the following somewhere in your header
file (whereever you define malloc):
extern "C"
{
void * malloc(unsigned long);
};
--
*** SENTINEL(tm) The ultimate Debugging Environment - email for more info ***
Conor P. Cahill (703)430-9247 cpcahil@virtech.vti.com
Virtual Technologies, Inc. 46030 Manekin Plaza Dulles, VA 20166
Re: Help with g++/CC problem
Author: The Supreme Commander
Date: Tue, 10 Nov 1992 22:13
Date: Tue, 10 Nov 1992 22:13
14 lines
1042 bytes
1042 bytes
Just a quick note to thank everyone who responded to my question! I figured it would be something simple. I still don't quite understand why g++ is pickier than CC, but I guess that's irrelevant. ...Manu -- --------------------------------------------------------------------- The Supreme Commander wishes you a Supreme day. I'm a Magic Man, oooh, I got the magic hands, yeah... Don't mind me, I'm just attempting to dock.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads