Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
204 Views

catastrophic error: cannot open source file "stdio.h"

I am trying to compile some C code using the Intel compiler.  This is standard C code that has been compiled by other C compilers.  I am on Windows 10.  I just downloaded and installed the 2020 version of Parallel_Studio XE (Update 1).  I have two versions of Microsoft Visual Studio installed they are: Visual Studio Professional 2019 and Visual Studio Professional 2017.  Both versions of Visual Studio have the desktop C++ module installed.  They also have the Windows C++ SDK installed. 

When I try to compile the code I get errors that say catastrophic error: cannot open source file "stdio.h" and catastrophic error: cannot open source file "stdlib.h".

I am compiling using the command line from a .bat file.

I have seen many people asking about these errors on the forums and the answer is always "Intel requires Microsoft Visual Studio for these files.  Make sure that the C++ module is installed in Visual Studio".  I have done all of the suggested fixes but nothing works.  I have uninstalled and reinstalled the C++ modules in both versions of Visual Studio and I then uninstalled and reinstalled Intel Parallel Studio.

Does anybody have any other suggestions?

Thanks,

Ed

0 Kudos
4 Replies
Highlighted
Beginner
204 Views

I was able to resolve my issues but setting some of the required environment variables. 

I am working on a legacy project that uses .bat files to compile all of the Fortran and C code.  It occurred that I had not set all of the required environment variables in the .bat files.  I opened a regular cmd window and typed "set" to list all of the environment variables and their values.  I then opened an Intel Parallel Studio compiler environment window and typed "set" to list all of the environment variables.  I was able to determine which environment variables I needed to add to my .bat files.

0 Kudos
Highlighted
Moderator
204 Views

Hi,

Glad to hear that your issue got resolved!

Please let us know if we can close this thread.

 

Regards

Goutham

0 Kudos
Highlighted
Beginner
204 Views

You can close the thread.

0 Kudos
Highlighted
Moderator
204 Views

Hi,

Thanks for confirming to close the thread.

We are closing this thread, feel free to raise a new thread for any further queries. 

 

Thanks

Goutham

0 Kudos