My code compiles and links just fine on PC #1 using VS 2013 Pro. It fails linking on PC #2 using VS 2013 Community Edition. The failure is three unresolved externals from Advapi32.lib -- CryptAcquireContextW, CryptReleaseContext, and CryptGenRandom.
This leads to several key questions:
Why doesn't VS 2013 warn you when it can't find a library that's on the linker input line?
Why is Advapi32.lib unavailable in the Community Edition?
What can one do to fix this problem?
Thanks.
Related
I am trying to run a nightly build on TFS 2018. One of the projects in my solution uses Intel C++ compiler. I have installed Parallel Studio XE 2015 update 5 composer edition and I have integrated it with the Visual Studio 2013 on the virtual machine.
During the execution I am getting the error:
[error]C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\x64\PlatformToolsets\Intel C++ Compiler XE 15.0\Toolset.targets(145,5): Error MSB8001: "MSG010" is an invalid value for the "Code" parameter.**
I tried to do some research online but I did not find any solution for my problem.
Can anyone who has faced a similar kind of issue help me with this?
I have visual studio C++ 6.0 and visual studio C++ 2010 express installed in my PC. My friend is able to compile the same project in his PC with visual studio 2010 express.But my PC throws and error
LINK : fatal error LNK1123: failure during conversion to COFF
I do not want to uninstall visual studio C++ 6.0. I have to keep that for other projects. I can uninstall/install Visual studio C++ 2010 express.
Please help me to solve this compatibility issue.
thank you.
UPDATE [SOLUTION] :
I solved issue by changing .NET framework.
I checked that my PC had .NET framework 4.5 installed so I uninstalled it and installed .NET framework 4. And now I can successfully compile my project in visual studio C++ 2010 express.
I do not even need to set "Enable Incremental Linking" to "No
(/INCREMENTAL:NO)" without that also it is working.
Thank you all.
I solved issue by changing .NET framework.
I checked that my PC had .NET framework 4.5 installed so I uninstalled it and installed .NET framework 4. And now I can successfully compile my project in visual studio C++ 2010 express.
I do not even need to set "Enable Incremental Linking" to "No
(/INCREMENTAL:NO)" without that also it is working.
Thank you all.
I have been using Visual Studio 2010 Express for my CUDA-related development. Recently, I upgraded from CUDA 5.0 to 5.5. When I did so, I discovered what is seemingly an odd bug: whenever I go to clean (or to rebuild) my VS project, I get an error related to nvcc:
nvcc : fatal error : nvcc cannot find a supported version of Microsoft Visual Studio. Only the versions 2008, 2010, and 2012 are supported
I get this same error on multiple independent projects whenever I try to clean them. The error goes away if I use Visual Studio 2010 Professional.
I was wondering if anyone else has come across this error, and, if so, are there any workarounds (other than switching to VS 2010 Professional)?
Thank you,
Aaron
According to the release notes for CUDA 5.5, Visual Studio 2010 Express is not supported. The supported versions of Visual Studio are:
Compiler IDE
Visual C++ 11.0 Visual Studio 2012
Visual C++ 11.0 Visual Studio 2012 Express (32-bit)
Visual C++ 10.0 Visual Studio 2010
Visual C++ 9.0 Visual Studio 2008
I am having some trouble with the mex setup in terms of selecting a compiler. I have attempted to install windows SDK 7.1 but it fails each time. According to THIS forum it is because i have visual studio 10.0 installed (which I do). So ideally i should be able to set up mex with this compiler. But when i try i get the following error:
Welcome to mex -setup. This utility will help you set up
a default compiler. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2012a/win64.html
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n? n
Select a compiler:
[1] Intel C++ 12.0 (with Microsoft Software Development Kit (SDK) linker)
...
[14] Microsoft Visual C++ 2010
[0] None
Compiler: 14
Warning: The default location for Microsoft Visual C++ 2010 compiler is:
"C:\Program Files (x86)\Microsoft Visual Studio 10.0"
but either that directory does not exist or the configuration
is invalid.
*****************************************************************************
Error: Microsoft Visual C++ 2010 requires the Microsoft Windows Software
Development Kit (SDK), but the SDK cannot be found. Examine your
Microsoft Visual C++ 2010 installation.
*****************************************************************************
Error using mex (line 206)
Unable to complete successfully.
So obviously i do need SDK??? I have tried un-installing the SDK 7.1 from microsoft several times but no luck.
I have thought that maybe i need to manually point mex deeper into the visual studio file system in order to find the compiler, any ideas about that?
I am using Windows 7 64 bit with matlab R2012a.
Thanks for your help.
I don't know the reason for this but this is how I got it right.
Uninstall all versions of Microsoft Visual C++ Redistributable from your computer.
Install Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1 from here: https://www.microsoft.com/en-in/download/details.aspx?id=4422
Try mex -setup again.
I have Visual Studio 2010 installed. However, MATLAB doesn't find the compiler.
>> mex -setup
Please choose your compiler for building external interface (MEX) files:
Would you like mex to locate installed compilers [y]/n? y
Select a compiler:
[0] None
Compiler:
If I answer n to the question, I get the following
Would you like mex to locate installed compilers [y]/n? n
Select a compiler:
[1] Intel C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[2] Intel C++ 9.1 (with Microsoft Visual C++ 2005 SP1 linker)
[3] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[4] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker)
[5] Intel Visual Fortran 10.1 (with Microsoft Visual C++ 2005 SP1 linker)
[6] Microsoft Visual C++ 2005 SP1
[7] Microsoft Visual C++ 2008 Express
[8] Microsoft Visual C++ 2008 SP1
[0] None
Compiler: 8
The default location for Microsoft Visual C++ 2008 SP1 compilers is C:\Program Files (x86)\Microsoft Visual Studio 9.0,
but that directory does not exist on this machine.
Use C:\Program Files (x86)\Microsoft Visual Studio 9.0 anyway [y]/n? n
Please enter the location of your compiler: [C:\Program Files (x86)\Microsoft Visual Studio 9.0]
What is the easiest way to compile my c++ code to make it available in MATLAB? Install Visual C++ 2008? oO
It depends on what MATLAB version you are using. R2010b supports VS2010 out of the box. If you have R2010a, there is a patch available:
Update From the World of MEX: Visual Studio 2010 Support
How can I use Microsoft Visual C++ 2010 to create MEX files with MATLAB 7.10 (R2010a)?
There are more than 1 ways of working around your problem, and only one involves money :)
Buy/Upgrade to a new Matlab version (R2010b recognizes and works with VS2010).
You don't have to install the full VS2008 package, the old Windows SDK v7.0 is enough. Once installed, matlab should recognize is when you do a mbuild -setup.
As you yourself suggested, install VS2008.
For future reference: http://www.mathworks.com/support/compilers/R2010b/index.html
You can also make your c++ code available to Matlab without using mex. Matlab is capable of loading external DLLs and calling their functions. So you can wrap your code into a DLL, and bypass mex entirely.
Generally, I found this to be an easier way of calling C or C++ code from matlab. The drawback is that you would not have all the facilities for manipulating matlab data structures that mex provides. You can still pass data back and forth, some things are more cumbersome, such as allocating an array in C and giving the ownership of it to matlab.