NASM - The Netwide Assembler
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Calendar
Login
Register
NASM - The Netwide Assembler
»
NASM Forum
»
Using NASM
»
Undefined symbol stdin
« previous
next »
Print
Pages: [
1
]
Author
Topic: Undefined symbol stdin (Read 18030 times)
nobody
Guest
Undefined symbol stdin
«
on:
March 17, 2007, 11:40:12 AM »
Hello im new to solaris and nasm.
I've installed nasm on solaris 10 and getting error "undefined symbol stdin referenced in file FOO.o
I assemble and link like this: nasm -f elf FOO.asm gcc -g FOO.o -o FOO
in FOO.asm i have the line in the .text section: extern fgets
extern stdin
as described by Jeff Duntemam.
What am i doing wrong please???
Logged
Frank Kotler
NASM Developer
Hero Member
Posts: 2667
Country:
Re: Undefined symbol stdin
«
Reply #1 on:
March 17, 2007, 12:34:11 PM »
Try adding "-lc" to the gcc command-line to link in libc.
Best,
Frank
Logged
nobody
Guest
Re: Undefined symbol stdin
«
Reply #2 on:
March 17, 2007, 01:07:23 PM »
Hiyas Frank , i've tried that but no cigar. If you have more suggestion plz mail.
in the mean time i will mess with some PATH stuff.
thx for swift reply.
Logged
Keith Kanios
Full Member
Posts: 383
Country:
Re: Undefined symbol stdin
«
Reply #3 on:
March 17, 2007, 05:36:26 PM »
Isn't "STDIN" apart of the enumeration (STDIN, STDOUT, STDERR)???
If that is the case, change "extern stdin" to "%define stdin 0".
All-in-all, you would probably wish to use scanf() for STDIN, and printf() for STDOUT.
HtH ;)
Logged
Print
Pages: [
1
]
« previous
next »
NASM - The Netwide Assembler
»
NASM Forum
»
Using NASM
»
Undefined symbol stdin