The process of compiling a C / C ++ program

Run error when linking pgc ++ during compilation.
Can you show me that process? I have tried a lot of ways but it often fails

Hi hang9898,

What failures are you seeing? What command line are you using? Without specific details, it’s difficult to determine what’s wrong.

Linking should be something like:

pgc++ -o exename.out object1.o obejct2.o

Where “exename.out” is the name of the executable you want to create and the “object” files are the object files you created. If the “-o” command is not included, the default to create an executable named “a.out”.

You can also compile and link using the same command line:

pgc++ -o exename.out source1.cpp source2.cpp

-Mat