Compilate code in the c++ error

Hi, I’m try compilate code in the c++ using pgccp1, and take a following error:
line 1:catastrophic error:
could not open source file:“stdio.h” (no directories in search list)
#include(stdio.h)
Somebody help???
Thanks so advanced!!!

Hi lodi,

pgcpp1 is the front end compiler and should not be invoked directly by a user. Please use “pgcpp” (i.e. the compiler driver) instead. It will add the appropriate include directory paths to your compilation.

Hope this helps,
Mat

Thank’s for reply.
I’m try with pgcpp, but give the following errors:

Hi lodi,

I’m not sure. Can you please post or send to PGI Customer Service (trs@pgroup.com) a reproducing example source code?

Thanks,
Mat

send the file

Thanks Lodi,

We’re in the process of adding C++11 support, but until then, you unfortunately can’t use the “thread” class. You’re picking up the Microsoft version of header file which is giving you these odd errors.

  • Mat

Thank you already!
But, now i get error:
LInk: fatal error lnk1104:cannot open file ‘kernel32.lib’

Hi lodi,

I’m not sure. “kernel32.lib” is a Windows system library so should be there.

What is the full output from your link with the “-v” flag added?

  • Mat

Hi,
I’m using pgcpp the without any flag.
Thanks for the answers.

Please add the “-v” flag (verbose) to your compile and post the output.

  • Mat

hi, following output:

thank’s.

kernel32.Lib is present in the Windows 8 SDK:

C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x64\kernel32.Lib
C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x86\kernel32.Lib

Can you please check to see that it is there on the system in use?

Thanks,
Mat

But, mine operational system is windows seven…
That’s folders dont present in the system.
thank’s

But, mine operational system is windows seven…

In order to install the latest version of the PGI compilers, you needed to install the Windows 8 SDK (not to be confused with the Win8 operating system). Did you skip this step when you installed?

If so, please go back and install it, Microsoft SDK Compatibility Information | PGI. You may then need to reinstall the PGI compilers.

  • Mat

thank you. worked!
But as it does to generate an exe file?
thank you, again…

But as it does to generate an exe file?

Sorry, I’m not sure what you mean. Does it still not fine the kernels32.lib? Are you getting a different error?

  • Mat

Thank’s
No error about the kernel32lib,
but how compilate for file .exe in the command line ???

but how compilate for file .exe in the command line ???

The most basic would be:

pgcpp mysourcefile.cpp

which creates an exe called “mysourcefile.exe”.

You change the target exe name via the “-o” flag:

pgcpp mysourcefile.cpp -o mytest.exe

which will create an exe called “mytest.exe”.

From there you may add other flags and/or libraries. Though, I’ll refer you to the PGI User’s Guide for details.

  • Mat