I'm resurrecting an ancient project, one developed when the Visual Studio project type was "IDE". I've got everything building, except for cmath errors like:
'acoshl': ambiguous call to overloaded function
in C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath.
I have no references to cmath or math.h in my code, and nothing tells me why there is a conflict with functions never referenced. Obviously, I don't want to edit system files. :)
Related
I've been trying to compile the Adaptive Communications Environment (ACE) project in MS Visual Studio 17 2022, but have been getting a slew of related linking errors.
Below is an example:
1>C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.33.31629\include\cstdlib(23,41): error C2733: 'abs': you cannot overload a function with 'extern "C"' linkage
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h(464,38): message : see declaration of 'abs'
This issue is obviously not originating in the ACE code, but in the code bundled in with the build tools.
My guess is there is a clash between MSVC 14.33.31629 and Windows Kit 10.
Does any one have any suggestions on a fix? Is there a compiler or pre-processor flag I can use to mitigate this? Should I use different versions of the MS Build Tool or Windows Kit?
I resolved this by upgrading my Windows SDK to version 10.0.20348.0.
I'm using Microsoft Visual Studio 2017 to compile an OpenCL program. I've installed the GPUOpen OpenCL SDK to C:\Program Files (x86)\OCL_SDK_Light with the system variable OCL_ROOT pointing to that directory. However, Visual Studio doesn't seem to recognize the variable when I add it to Additional Include Directories. %OCL_ROOT% is being treated as a literal string while $(OCL_ROOT) doesn't resolve to anything. Only when I use the full file path does Visual Studio recognize the library.
Does Visual Studio not support Windows system variables? Or do I simply have the syntax wrong?
Apparently restarting my computer solved the problem. No idea why Visual Studio didn't recognize the variable even though other programs did.
I've installed the MS VC++ compiler (standalone, not the whole Visual Studio) as a compiler kit for Qt 5.7. Whenever I attempt to build even the most basic project, I get a long list of errors, complaining about undefined symbols.
In particular, things like FLT_RADIX, FLT_MANT_DIG, FLT_DIG, etc. are undefined. I checked the header files that are part of VC (installed in C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include) and noticed that cfloat (where these symbols would likely be defined) is just 284 bytes worth of zeroes. There are other header files that are in similar shape.
I tried repairing/reinstalling visualcppbuildtools_full.exe, all to no avail. How can I get a proper install?
The first install crashed and left some of the header files in a corrupt state. I manually cleared up the junk left behind by the MSVC uninstaller, then reinstalled. This fixed the problem.
So, I have a template function in my C++ header files, and when I make changes to it, Visual Studio 2013 still thinks that the project is up-to-date. So when i run my project, it runs like I didn't make any changes.
I can replicate this situation with any header file and template function, and only way to resolve it seems to be rebuilding. Is this just a bug in Visual Studio or do I have some settings wrong?
I have a fairly simple C++ project in Visual C++ 2010 Express on Windows 7. I have no problems compiling in Debug mode for Win32, but when I switch to Release mode for Win32 I get the following compiler error:
LINK : fatal error LNK1296: unable to load msobj100.dll
I know this question has been asked here, but I couldn't get a fix from that solution. I did a search for that file, and it is only located in C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE. Within SysWOW64 and Win32, there are files called 'msobjs.dll', but that's it. Any ideas?
Try to install the Windows SDK to your computer. These Files Should be distributed.Along with it.
See here.
Copy the missing dll file from
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE
to
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin.
VC\Bin is the runtime path.
This problem also bothered me for a long time, and I had to run Release mode in another machine...
and I find the solution just now.