-
December 14th, 2015, 11:46 AM
#1
VS 2015 and standard headers
Hello, I'm first time trying to compile old C sources with VC14 and it seems some standard headers are missing
math.h
It appeared as present yet as in VC12. What is replacement of this? Thanks
-
December 14th, 2015, 12:41 PM
#2
Re: VS 2015 and standard headers
-
December 14th, 2015, 12:44 PM
#3
Re: VS 2015 and standard headers
Thanks for hint Philip Nicoletti but if the sources are from 3rd party and I don't want to edit them is there a way to redirect?
-
December 14th, 2015, 01:13 PM
#4
Re: VS 2015 and standard headers
math.h is definitely available for VS 2015. It is c standard library header.
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
December 14th, 2015, 01:28 PM
#5
Re: VS 2015 and standard headers
Really? That gives sense but I don't have the header file in my C:\Program Files (x86)\Visual Studio 2015\VC\include\
What's wrong? Setup finshed more or less successfully and I of course included C++
-
December 14th, 2015, 02:41 PM
#6
Re: VS 2015 and standard headers
Yikes! math.h is not in ...\visual Studio 14\vc\include. With my VS2015 install it is picking up math.h from ...\windows kits\10\include\10.0.10240.0\ucrt ?????
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
December 14th, 2015, 02:51 PM
#7
Re: VS 2015 and standard headers
IMHO the math.h shouldnot be picked from anywhere else than vc\include.
The setup seems somehow fishy as it reported some 3rd party component errors on completion.
Add/Remove programs control panel offers only Modify which gives error message
Error on attempt to uninstall Microsoft Visual Studio Enterprise 2015 item. Probably it was already uninstalled.
Do you want to remove Microsoft Visual Studio Enterprise 2015 item from Programs and functions list?
Therefore I don't have an idea how to fix the installation.
-
December 15th, 2015, 03:25 AM
#8
Re: VS 2015 and standard headers
Originally Posted by Anakunda
Therefore I don't have an idea how to fix the installation.
Here's info about breaking changes in VS 2015.
https://msdn.microsoft.com/en-us/library/bb531344.aspx
Search for math.h on that page.
-
December 15th, 2015, 05:13 AM
#9
Re: VS 2015 and standard headers
Thanks tiliavirga for useful link. The article describes that all content of math.h was moved to cmath but is not clear if math.h was completely removed or stayed as dummy file with include redirect. Can you confirm math.h is completely missing?
What solution would you suggest then if I don't want to modify existing sources?
#ifdef _STD_USING
#undef _STD_USING
#include <math.h> <======= still referencing C header file which is not present in whole VS directory
#define _STD_USING
#else /* _STD_USING */
#include <math.h> <======= math.h
#endif /* _STD_USING */
Last edited by Anakunda; December 15th, 2015 at 05:17 AM.
-
December 15th, 2015, 05:25 AM
#10
Re: VS 2015 and standard headers
Have you searched your system to see if you can find it somewhere?
All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!
C++23 Compiler: Microsoft VS2022 (17.6.5)
-
December 15th, 2015, 05:29 AM
#11
Re: VS 2015 and standard headers
Compiler finds it in C:\Users\Anakunda\Documents\C\3rd_party\STLport\stlport\math.h but this seems not more compatible (sources are from 2008)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|