WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Tiny C Compiler problem  (Read 2519 times)

Offline awatar100

  • Newbie
  • *
  • Posts: 13
Tiny C Compiler problem
« on: August 06, 2013, 09:45:27 AM »
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 ;/

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10960
Re: Tiny C Compiler problem
« Reply #1 on: August 06, 2013, 11:19:54 AM »
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.
The only barriers that can stop you are the ones you create yourself.

Offline awatar100

  • Newbie
  • *
  • Posts: 13
Re: Tiny C Compiler problem
« Reply #2 on: August 06, 2013, 11:40:55 AM »
THX for info but not good for me ;/ i don't see optimization at TCC man