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

Compiling failure on Windows #999

Closed
bryanwweber opened this issue Mar 25, 2021 · 1 comment · Fixed by #1000
Closed

Compiling failure on Windows #999

bryanwweber opened this issue Mar 25, 2021 · 1 comment · Fixed by #1000

Comments

@bryanwweber
Copy link
Member

Problem description

Compiling with MSVC 14.2 on Windows 10 from MS Visual Studio 2019 gives the following error message:

cl /Fobuild\src\kinetics\ReactionData.obj /c src\kinetics\ReactionData.cpp /EHsc /MD /nologo /D_SCL_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_WARNINGS /O2 /Zi /Fdbuild\src\kinetics\ReactionData.obj.pdb /W3 /DNDEBUG 
/Iinclude /Iinclude\cantera\ext /Ibuild\src /IC:\Users\bww09001\Miniconda3\envs\cantera-dev\Library\include
ReactionData.cpp
C:\Users\bww09001\Documents\GitHub\cantera\include\cantera/kinetics/ReactionData.h(43): error C2039: 'log': is not a member of 'std'
predefined C++ types (compiler internal)(340): note: see declaration of 'std'
C:\Users\bww09001\Documents\GitHub\cantera\include\cantera/kinetics/ReactionData.h(43): error C3861: 'log': identifier not found

These changes were introduced in #982. Unfortunately, I'm not that familiar with compiling on Windows to know how to fix this. One would assume that the logarithm function would be part of a standard library... I'm also not sure why this wasn't caught by the CI suite.

Steps to reproduce

  1. Compile the current main branch (908a2cc) on Windows with MSVC 14.2. It's unclear whether this is related to the specific version of the compiler, or the standard include directories, or what.

System information

  • Cantera version: main
  • OS: Windows 10
  • MSVC 14.2, VS 2019
@ischoegl
Copy link
Member

I ran into the same issue on my windows machine (which I use occasionally) yesterday - including <math.h> is the minimum fix.

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

Successfully merging a pull request may close this issue.

2 participants