Rate This Document
Findability
Accuracy
Completeness
Readability

Error "cannot find -lstdc++" Is Reported When BiSheng Compiler in HPCKit Is Used to Compile Code

Symptom

Error "cannot find -lstdc++" is reported when BiSheng Compiler in HPCKit is used to compile code, as shown in the following figure.

Possible Causes

This issue occurs because the libstdc++ package is not installed on the system, preventing the linker (ld) from locating the libstdc++.so library file.

Procedure

Run the yum install libstdc++-devel command as the root user to install the libstdc++ package. After the installation is successful, perform the compilation again. The detailed procedure is as follows:

  1. Log in to the node where the application needs to be compiled as the root user.
  2. Run the following command to install the libstdc++ package:
    1
    yum install libstdc++-devel
    

  3. Run the following command to check whether the installation is successful:
    1
    yum list installed | grep "libstdc++-devel"
    

    If information similar to the following is displayed, the installation is successful.