> You should, however, verify that you're running the right program. Eg if it's 'myprog', after moving it to ~/bin or wherever, verify that 'which myprog' returns ~/bin/myprog.
Seconded: check the $PATH. If that does not help, I suggest eliminating linked libraries as possible cause. A quick checklist: - Linked libraries: are they the same? $ ldd ~/bin/myprog $ ldd ~/src/myprog - Are you using a debugging library like electric fence that may cause segfaults (on purpose)? - Do you have any environment variables affecting the loader (man ld.so)? $ printenv | grep 'LD_' - Are the C programs called from within a shell script that calls the C programs in a manner *different* than your test from the command line? - I suggest using strace to capture the segfault and see what the program (and its calling script?) were doing at that moment. $ strace -o /tmp/mylog.txt -s 4096 -f ~/mypath/myprog Best regards, Stephen Benoit [email protected] > > > On Tue, 30 Oct 2012, Leslie S Satenstein > wrote: > >> If I create a calling script and put the program name as a line in the >> script, there is no segmentation error. >> >> Compiler is gcc 4.7 >> >> >> Regards >> >> Leslie _______________________________________________ mlug mailing list [email protected] https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca
