My gcc works fine when I compile '''gcc''' but I'm trying to compile a C program with '''mpicc''' and my terminal returns this error, which deletes also the script:
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o: In function `_start':(.text+0x20): undefined reference to `main'collect2: error: ld returned 1 exit status
The compiling instructions are: mpicc -o p35.c
.
How could I solve this?
My gcc version:
gcc --versiongcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0Copyright (C) 2017 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
My mpicc version:
mpicc --versiongcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0Copyright (C) 2017 Free Software Foundation, Inc.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Thanks.