Tiny Core Linux
Tiny Core Extensions => TCE Q&A Forum => Topic started by: eagleking95 on February 19, 2016, 08:05:13 AM
-
Hello everyone. I have a TCL virtual machine on VirtualBox. I have installed gcc.tcz, gcc_libs.tcz, gcc_libs-dev.tcz and gcc_base-dev.tcz using Apps. However I cannot compile.
For example for the following C code:
int main() { return 0; }
Raises errors from /usr/local/bin/ld: cannot find crt1.o. If I add #include <stdio.h> then it says: fatal error: stdio.h: No such file or directory.
Any ideas how can I get it to work? Thanks!!
-
Hi,
install compiletc.tcz .
-
It works, thanks!
However I came across another issue. I am trying to compile a program that is using ptrace to block some system calls but I cannot access their codes neither using __NR_<callName> or SYS_<call_name>. For example the compiler gives the error that __NR_socket or SYS_socket is undeclared.
I have included sys/syscall.h, syscall.h and bits/syscall.h ... I don't understand why it says it's undeclared. These constants are defined in those header files.
Any tips/ideas?
-
Hi eagleking95
For example the compiler gives the error that __NR_socket or SYS_socket is undeclared.
That's because they are called __NR_socketcall or SYS_socketcall.
I have included sys/syscall.h, syscall.h and bits/syscall.h
From bits/syscall.h:
"Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."
Information about what you are trying to compile and exact error messages will make it easier to help you.