bugwiskers wrote: ↑Fri Feb 09, 2018 10:34 am
I get a segmentation error message I can only assume that has something to do with the address where the file is stored ie home/pi I am using fp=fopen(filename,"r");
use the debugger as suggested above. When it crashes type "bt" (back trace) to get the current location and the call stack, which is often enough.
If this was an x86 executable it would not have got this far, either exec would fail to load it "Exec format error" or perhaps an illegal instruction.
C is highly portable. Unless there is something else horribly wrong, the different directory should not matter at all, it wouldn't be much good otherwise!! I think your problem lies elsewhere.
If your program is reasonably small, you could post it here in a code block.