🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #41920

Creating a NMAGIC file using GCC/G++ on a DEC Unix 3.2c system

#41920
From: Randy Marchany
Date: Thu, 01 Feb 1996 00:00
32 lines
1566 bytes
I posted a note earlier asking how to create an NMAGIC file using GCC/G++ 2.7.0
The error messages were:

% gcc -o setsched setsched.c -n
collect2: ld returned 1 exit status
/usr/bin/ld:
NMAGIC files must be created -non_shared.
% gcc -o setsched setsched.c -n -non_shared
gcc: unrecognized option `-non_shared'
collect2: ld returned 1 exit status
/usr/bin/ld:
NMAGIC files must be created -non_shared.
% gcc -o setsched setsched.c -n -Xlinker -non_shared
collect2: ld returned 1 exit status
/usr/bin/ld:
-non_shared: must specify only one of -shared, -call_shared, -non_shared
/usr/bin/ld: Usage: /usr/bin/ld [options] file [...]

**************************

It turns out the -static option is what is needed to do this. The follwoing
command string did the trick:

     gcc -o setsched setsched.c -n -static

to create the file. 

	-Randy Marchany
	VA Tech Computing Center
	Blacksburg, VA 24060

INTERNET: randy.marchany@vt.edu
Technical Details
Message-ID: <4eria7$3k7@solaris.cc.vt.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <4ebm7d$lpq@solaris.cc.vt.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,8b4268954cc56d3f
X-Google-Attributes: gid11318c,public
From: Randy Marchany <marchany>
Subject: Creating a NMAGIC file using GCC/G++ on a DEC Unix 3.2c system
Date: 1996/02/01
Message-ID: <4eria7$3k7@solaris.cc.vt.edu>
X-Deja-AN: 137754068
references: <4ebm7d$lpq@solaris.cc.vt.edu>
content-type: text/plain; charset=us-ascii
organization: Virginia Tech, Blacksburg, Virginia
x-url: news://news.vt.edu/4ebm7d$lpq@solaris.cc.vt.edu
mime-version: 1.0
newsgroups: gnu.gcc.help
x-mailer: Mozilla 1.1N (X11; I; OSF1 V3.2 alpha)