wizard00 <[EMAIL PROTECTED]> writes:

> gcc try.c -o try would give me linking problem
> 
> /tmp/ccQOkXtu.o: In function `serial_echo_print':
> try.c:(.text+0x31e): undefined reference to `__inb'
> try.c:(.text+0x34a): undefined reference to `__outb'
> try.c:(.text+0x360): undefined reference to `__inb'
> try.c:(.text+0x387): undefined reference to `__outb'
> collect2: ld returned 1 exit status
> 
> but gcc -Os try.c -o try would be OK /w no error
> 
> what's this -Os option? I thought it's only for optimization. 
> from upper error it seems as if missing library. I wouldn't make the
> connection between
> them.

This message is appropriate for [EMAIL PROTECTED], not for
[EMAIL PROTECTED]  Please direct any followups to gcc-help (only).
Thanks.

Most likely the functions are defined in a header file.  When using
-Os they are inlined.  When not using optimization they are not
inlined, and must be found in some library.

Ian

Reply via email to