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

MSVC: toupper is not a member of std #1019

Closed
1 of 3 tasks
carlocorradini opened this issue Jan 20, 2024 · 1 comment · Fixed by #1020
Closed
1 of 3 tasks

MSVC: toupper is not a member of std #1019

carlocorradini opened this issue Jan 20, 2024 · 1 comment · Fixed by #1020

Comments

@carlocorradini
Copy link
Contributor

I'm submitting a ...

  • bug report
  • feature request
  • support request => Please do not submit support request here, see note at the top of this template.

Describe the issue
Using MSVC 14.0 (2015), I receive the following error during compilation:
error C2039: 'toupper': is not a member of 'std'

What is the current behavior?
Compilation error:
error C2039: 'toupper': is not a member of 'std'

What is the expected behavior?
Compile without errors

Please tell us about your environment:

  • OS: Windows 10
  • JSBSim: v1.2.0
  • Language: C++

Other information
The bug is simple to resolve.
I'll create a PR ASAP

@seanmcleod
Copy link
Member

Hmm, I was a bit surprised since we don't have an issue compiling aeromatic using the github build workflow and when I compile locally. But I see you're using a fairly old MSVC (2015) and we're using MSVC (2019) as part of the github build workflow and I'm compiling locally with MSVC (2022).

Having a quick look locally (MSVC 2022) I see the following in <string> which is included by aeromatic's types.cpp.

// The <cctype> include below is to workaround many projects that assumed
// <string> includes it. We workaround it instead of fixing all the upstream
// projects because <cctype> is inexpensive. See VSO-663136.
#include <cctype>

Which explains why it compiles fine with MSVC 2022, and probably for the same reason with MSVC 2019.

I've approved the workflow run for - #1020

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

Successfully merging a pull request may close this issue.

2 participants