see here
|
Isn't that why it uses this command to run the script?
sudo gcc -O2 -o rccar rccar.c I don't know C/C++ so it's just a guess. |
u got me there this time
|
"man outb" for me...
Hm,
According to the man page for my distribution ("man outb") Quote:
Code:
sysop$ nl rccar.c|grep outb I'm thinking that maybe one of the "outb" friends might help.... As for the optimization flags ("-O" versus "-O2" versus nothing), I think we're safe. The "outb" doesn't appear to be affected by those flags.... |
Quote:
@Original poster try putting this on the top of the file #define outb(n, port) outportb(port, n) #define inpb inportb |
Found more "outb" information....
Found an interesting chunk over here;
Quote:
|
Quote:
|
Got this after adding
#define outb(n, port) outportb(port, n) #define inpb inport [CODE]shawn@shawn-desktop:~/Desktop$ sudo gcc -O2 -o rccar rccar.c [sudo] password for shawn: rccar.c: In function ‘main’: rccar.c:131: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result /tmp/ccuSNFAn.o: In function `main': rccar.c:(.text+0x11e): undefined reference to `outportb' rccar.c:(.text+0x150): undefined reference to `outportb' rccar.c:(.text+0x180): undefined reference to `outportb' rccar.c:(.text+0x1b0): undefined reference to `outportb' rccar.c:(.text+0x1e0): undefined reference to `outportb' /tmp/ccuSNFAn.o:rccar.c:(.text+0x210): more undefined references to `outportb' follow collect2: ld returned 1 exit status /CODE] |
dang it!
this is one of those few reasons dos/windows is better then linux |
FYI: swapping the port and value for all the "outb" statements didn't work.
Code:
sysop$ diff rccar.c rccar.c.new |
"Teh Win" or "Fail" ?
Okay, get this, I added "#include <sys/io.h>
Code:
sysop$ gcc -O2 -o rccar rccar.c |
try compiling with gcc -O2 rccar rccar.c
|
When I added #include <sys/io.h>
I got this Code:
shawn@shawn-desktop:~/Desktop$ sudo gcc -O2 -o rccar rccar.c |
I get this when I compile using
sudo gcc -O2 rccar rccar.c as opposed to sudo gcc -O2 -o rccar rccar.c Code:
shawn@shawn-desktop:~/Desktop$ sudo gcc -O2 rccar rccar.c |
Quote:
Quote:
|
All times are GMT -5. The time now is 06:27 AM. |