🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #51514

Re: help with DOS version of gcc

#51514
From: DJ Delorie
Date: Thu, 13 May 1993 15:08
31 lines
1595 bytes
In article <1993May13.135200.13948@ennews.eas.asu.edu>, mfindler@enuxha.eas.asu.edu (Michael J. Findler) writes:
>         undefined symbol MyScreen(char *, int) referenced from text segment

The fact that it is reporting the argument types indicates that it is
looking for the C++ mangled name, not the C regular name.

>         The prototype looks like:
> 
>                 void MyScreen( char *picfile, int index = 0 ); // in type.h

If this is to be included by a C++ source file, you need this around it:

	#ifdef __cplusplus
	extern "C" {
	#endif

	void MyScreen( char *picfile, int index = 0 );

	#ifdef __cplusplus
	}
	#endif

>         And the function Definition looks like:
> 
>                 void MyScreen( char *picfile, int index )  // in shade.c

Since you are defining it in a C module, you need to inform the C++
sources of that so they can generate the correct symbol name (C
instead of C++).

DJ
Technical Details
Message-ID: <1sto8vINNh1n@ctron-news.ctron.com>
Path: arc1-ca.pugleaf.net!gmd.de!ira.uka.de!howland.reston.ans.net!noc.near.net!ctron-news.ctron.com!ctron-news.ctron.com!usenet
References: <1993May13.135200.13948@ennews.eas.asu.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,1854bd47c6fe32e6
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-05-13 16:03:05 PST
Path: arc1-ca.pugleaf.net!gmd.de!ira.uka.de!howland.reston.ans.net!noc.near.net!ctron-news.ctron.com!ctron-news.ctron.com!usenet
From: dj@ctron.com (DJ Delorie)
Newsgroups: gnu.gcc.help
Subject: Re: help with DOS version of gcc
Date: 13 May 1993 15:08:15 GMT
Organization: None whatsoever
Lines: 31
Distribution: world
Message-ID: <1sto8vINNh1n@ctron-news.ctron.com>
References: <1993May13.135200.13948@ennews.eas.asu.edu>
Reply-To: dj@ctron.com
NNTP-Posting-Host: delorie.ctron.com