Tiny Core Linux

General TC => Programming & Scripting - Unofficial => Topic started by: awatar100 on August 06, 2013, 12:45:27 PM

Title: Tiny C Compiler problem
Post by: awatar100 on August 06, 2013, 12:45:27 PM
Hello all
I have small problem  - on newest tinycore i have install Tiny C Compiler (because my hdd have only 32MiB !)
And i wish to compile this simple code
Code: [Select]
#include <sys/io.h>
#define PORT 0x378
int main()
{
ioperm(PORT,1,1);
outb(0xff,PORT);
return 0;
}
After this i try to run it frome code but i have error: tcc: undefined symbol 'outb'
But file is present on usr/include/sys/   
;( im not good at C and linux so i dont know what or where is something wrong ;/
change in #include to full path dont make it ok ;/
Title: Re: Tiny C Compiler problem
Post by: curaga on August 06, 2013, 02:19:54 PM
See the outb man page.

Quote
You compile with -O or -O2 or similar.  The functions are defined as inline macros,
       and  will  not  be  substituted in without optimization enabled, causing unresolved
       references at link time.
Title: Re: Tiny C Compiler problem
Post by: awatar100 on August 06, 2013, 02:40:55 PM
THX for info but not good for me ;/ i don't see optimization at TCC man