I have installed pthread using this command in my vs code terminal--> sudo apt-get install libpthread-stubs0-dev
When I try to compile the pthread.c file I am getting below error message. Here pthread.c is the file name.
gcc –g –Wall –pthread pthread.c –o pt
/usr/bin/ld: cannot find –g: No such file or directory
/usr/bin/ld: cannot find –Wall: No such file or directory
/usr/bin/ld: cannot find –pthread: No such file or directory
/usr/bin/ld: cannot find –o: No such file or directory
/usr/bin/ld: cannot find pt: No such file or directory
collect2: error: ld returned 1 exit status
I have installed mpi using this command in my vs code terminal--> sudo apt install openmpi-bin
For MPI I am getting error for #include <mpi.h>
. Below is the error message.
#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (/root/mpi.c).C/C++(1696)
When I try to compile the mpi.c file I am getting below error message. Here mpi.c is the file name.
mpicc –g –Wall –o mpi mpi.c
mpi.c:2:10: fatal error: mpi.h: No such file or directory
2 | #include <mpi.h>
| ^~~~~~~
Below is my env details.
~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy