Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error C1083: “math.h”: No such file or directory #62

Open
ghost opened this issue May 22, 2020 · 5 comments
Open

fatal error C1083: “math.h”: No such file or directory #62

ghost opened this issue May 22, 2020 · 5 comments

Comments

@ghost
Copy link

ghost commented May 22, 2020

When I compile liblinear in Windows 10 with VS2019, I get the following error:

D:\liblinear-2.30>nmake -f Makefile.win lib

Microsoft (R) 程序维护实用工具 14.26.28805.0 版
版权所有 (C) Microsoft Corporation。 保留所有权利。

    cl.exe /nologo /O2 /EHsc /I. /D _WIN64 /D _CRT_SECURE_NO_DEPRECATE -c tron.cpp

tron.cpp
tron.cpp(1): fatal error C1083: 无法打开包括文件: “math.h”: No such file or directory
NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\cl.exe"”: 返回代码“0x2”
Stop.

How to fix it?

@cjlin1
Copy link
Owner

cjlin1 commented May 22, 2020 via email

@ghost
Copy link
Author

ghost commented May 22, 2020

Yes, I have done the first step:

D:\liblinear-2.30>"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"


** Visual Studio 2019 Developer Command Prompt v16.6.0
** Copyright (c) 2020 Microsoft Corporation


[vcvarsall.bat] Environment initialized for: 'x64'

D:\liblinear-2.30>nmake -f Makefile.win lib

Microsoft (R) 程序维护实用工具 14.26.28805.0 版
版权所有 (C) Microsoft Corporation。 保留所有权利。

    cl.exe /nologo /O2 /EHsc /I. /D _WIN64 /D _CRT_SECURE_NO_DEPRECATE -c tron.cpp

tron.cpp
tron.cpp(1): fatal error C1083: 无法打开包括文件: “math.h”: No such file or directory
NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\cl.exe"”: 返回代码“0x2”
Stop.

@cjlin1
Copy link
Owner

cjlin1 commented May 22, 2020 via email

@tanzh-lamda
Copy link

I encountered the same question with Visual Studio 2017 as murongxixi, and I have done the first step. @cjlin1

DId you do the first step indicated in README like: 1. Open a dos command box and change to liblinear directory. If environment variables of VC++ have not been set, type "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"

On 2020-05-22 13:01, murongxixi wrote: When I compile liblinear in Windows 10 with VS2019, I get the following error: D:\liblinear-2.30>nmake -f Makefile.win lib Microsoft (R) 程序维护实用工具 14.26.28805.0 版 版权所有 (C) Microsoft Corporation。 保留所有权利。 cl.exe /nologo /O2 /EHsc /I. /D _WIN64 /D _CRT_SECURE_NO_DEPRECATE -c tron.cpp -lm cl: 命令行 warning D9002 :忽略未知选项“-lm” tron.cpp tron.cpp(1): fatal error C1083: 无法打开包括文件: “math.h”: No such file or directory NMAKE : fatal error U1077: “"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\cl.exe"”: 返回代码“0x2” Stop. How to fix it? -- You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub [1], or unsubscribe [2]. [ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "#62", "url": "#62", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ] Links: ------ [1] #62 [2] https://github.com/notifications/unsubscribe-auth/ABI3BHT74J66ZOBMKXP3UYTRSYBJHANCNFSM4NHPIOOQ

@Bangash514
Copy link

This problem has been solved by my colleague's suggestion;
Visual Studio Installer > Game Development with C++ > Optional ; Install different "Window 10 SDK(10.0.22000.0) and so on
after that simple test the 'hello world' program.
Good luck indeed for all this queries finder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants