This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Compilation error : Cannot open include file: ‘stdio.h’: No such file or directory

0

Hi,

I try to build latest version of WireShark on a Win7 64 bits machine and when I lunch nmake -f Makefile.nmake all I get this error:

c:\Development\wireshark>nmake -f Makefile.nmake all

Microsoft (R) Program Maintenance Utility Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved.

    cd tools
    "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\nmake.exe" /                   -f Makefile.nmake

Microsoft (R) Program Maintenance Utility Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved.

    cd lemon
    ..\native-nmake "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\nmake.exe" /                   -f Makefile.nmake

Microsoft (R) Program Maintenance Utility Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved.

    cl -WX -I..\..\ /Zi /W3 /MD /O2 /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=1600  /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -DPSAPI_VERSION=1 /D_BIND_TO_CURRENT_CRT_VERSION=1 /MP /GS lemon.c

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved.

lemon.c lemon.c(32) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\cl.EXE"' : return code '0x2' Stop. NMAKE : fatal error U1077: '..\native-nmake.CMD' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\nmake.exe"' : return code '0x2'

nmake -f Makefile.nmake verify_tools does’t return any error

nmake -f Makefile.nmake setup does’t return any error

Any clue why stdio is not found? I reinstalled VC++ express and I still does’t compile.

Thanks,

asked 18 Jul ‘14, 06:49

DBY's gravatar image

DBY
11112
accept rate: 0%

edited 18 Jul ‘14, 07:05

grahamb's gravatar image

grahamb ♦
19.8k330206


One Answer:

0

Looks like the build environment hasn't been set up correctly.

What does set INCLUDE return?

answered 18 Jul '14, 07:07

grahamb's gravatar image

grahamb ♦
19.8k330206
accept rate: 22%

set INCLUDE retunred

INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v7.1\INCLUDE\gl;
(18 Jul '14, 08:01) DBY

stdio.h should be in the first element of your include path c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE, can you check?

(18 Jul '14, 08:17) grahamb ♦

The folder is almost empty. It contains ammintrin.h and srv.h. That's it.

(18 Jul '14, 08:46) DBY

Ok, you have a broken VS installation. I have 206 files in there, although I have VS 2010 Pro not Express. I don't think Express installs stuff in a different location. Do you have any other Microsoft Visual Studio directories listed under C:\Program Files (x86)\?

(18 Jul '14, 09:03) grahamb ♦

No. I found on the web that is a common issue with VC10.

http://connect.microsoft.com/VisualStudio/feedback/details/774158/re-installed-visual-studio-2010-and-c-standard-headers-are-missing

I tried the workaround and it did't work. Since they are only header files, maybe you could zip them and send me the zip?

thanks,

(18 Jul '14, 09:13) DBY

Unfortunately MS doesn't allow distribution of their header files by third parties so I can't do that.

As far as I can see, you can either try again with the suggested fix, or install VS2010 on another machine and copy the files over yourself, or install VS2013. I currently use VS2013 for my Wireshark work and its all OK for me.

(18 Jul '14, 09:21) grahamb ♦

I install VC2010 on a vm and copied the files on my machine and now it cannot find MSVCRT.lib. I will try with VS2013 and hope to get better result.

thanks,

(18 Jul '14, 10:01) DBY

Hi @grahamb, I too am getting the same error.

my "set INCLUDE" returns: INCLUDE=C:\Program Files (x86)\Windows Kits\8.1\include;C:\Program Files (x86)\Windows Kits\8.1\include;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Windows Kits\8.1\include\shared;C:\Program Files (x86)\Windows Kits\8.1\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\winrt;

How do I go ahead?

(08 Oct '14, 07:49) aman

@aman is stdio.h in C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE

(08 Oct '14, 08:03) grahamb ♦

No it is not there. Shall I copy the stdio.h from other folder or just rebuilt the VS13 setup?

(08 Oct '14, 08:07) aman

Very odd, it's there on all the installations I have to hand. What other folder is it in (C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\crt\src\stdio.h)?

(08 Oct '14, 08:17) grahamb ♦

No it is not there too. I searched in the VS folder. Stdio.h is not present.

(08 Oct '14, 08:30) aman

@aman,

I have no idea why it's missing, I suppose you can try to reinstall VS2013 and all the updates to it (currently at Update 3). What is the current update you have for your VS2013 installation?

(08 Oct '14, 08:40) grahamb ♦

I have 12.0.21005. I ll update my VS with latest version.

(08 Oct '14, 08:47) aman

I think that's update 2. Not sure if update 3 will bring back the missing include, but worth a try.

(08 Oct '14, 09:15) grahamb ♦

Hi @grahamb, I installed update3 but the VC folder has no bin folder which should contain vcvars32.bat file. I cant find this file in the update3 installed folder..

(14 Oct '14, 10:37) aman

@aman,

Can you confirm you are looking in Program Files (x86)\Visual Studio 12.0\VC? If the bin dir is missing from there you have much bigger problems as that's where all the toolchain bits (compiler, linker etc.) live.

(14 Oct '14, 11:05) grahamb ♦

I solved it.. was some error with installation. Thanks for your help..

(14 Oct '14, 12:01) aman
showing 5 of 18 show 13 more comments