WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline awatar100

  • Newbie
  • *
  • Posts: 13
Tiny C Compiler problem
« 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 ;/

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Tiny C Compiler problem
« Reply #1 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.
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, 02:40:55 PM »
THX for info but not good for me ;/ i don't see optimization at TCC man