two.c:
#include<stdio. h>
main()
{
printf("hello C is working");
}
#gcc -0 two two.c
#./two
segmetnation fault
#gdb two two.core
This GDB was configured as "i386-marcel-freebsd"..(no debugging symbols found)..
Core was generated by 'two'
Program terminated with signal 11,segmentation fault
Reading symbols from /lib/lib.so.6..(no...
User Profile
Collapse
-
segmentation fault(core dumped)
-
cannot run c compiled programs
iam in the way of making graphics using SDL.i copied from cd usign
mount -a /cdrom
cd /cdrom
cp SDL-1.2.11.tar.gz /usr/test
cd /usr/test
gunzip SDL-1.2.11.tar.gz
tar -xf SDL-1.2.11.tar
cd SDL-1.2.11
./configure
...
...
it stops at
checking whether the c compiler works...configu re:error:cannno t run c compiled programs
if you meant to cross com[pile,use --host... -
undefined reference to main error in SDL
Iam working with graphics.I wrote a pgogram in turbo c for graphics.I need to run on Freebsd system, so installed SDL and trying.when i give make in sdl_image folder
/usr/lib/crt1.o undefined reference to main error is giving
i tried to located crt1.c,i found 5 places,i modified all the files by adding
i
program found with main like this:
extern int main(int,char **,char **);
......
.......
No activity results to display
Show More