1 #include<stdio.h>
2 int main(int argc,char *argv[])
3 {
4 printf("Hello\n");
5 return 0;
6 }
我用lsbcc编译器成可执行文件
复制到suse 上面可以运行
复制到风河linux上运行出现这样的错误,高手们请问这是应该怎么改。
Segmentation fault
set_tid_address(0x7f4c427c59d0) = 23797
set_robust_list(0x7f4c427c59e0, 0x18) = 0
rt_sigaction(SIGRTMIN, {0x7f4c42394710, [], SA_RESTORER|SA_SIGINFO, 0x7f4c4239d640}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7f4c423947a0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f4c4239d640}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
------解决方案--------------------
库找不到,改成静态链接就行了。