Can't find windows.winmd – if path specified, erros multiply - c++

I must work on a Visual Studio C++ solution done many years ago by a corporation that doen't have C++ experts.
I have few experience with C++, a lot with Visual Studio, but zero experience on those two together (when I used to program in C++ it was always for Linux).
This solution has 9 projects and used to compile for Windows Embedded using Visual Studio 6.0 under Windows XP or Windows Vista.
I now must make it compile for x86 and ARM, using Visual Studio 2017 under Windows 7.
The only error I have on compiling is well-known:
Can't find assembly windows.winmd. Specify the path using/AIor set the environment variable LIBPATH.
If I follow the advice and add C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.17134.0 to the /AI parameter of the main project, I get 100+ compiler errors.
The previous error I had was: missing "platform.winmd", but after adding to /AI the path to that file the error disappeared. Solving the problem "windows.winmd" isn't trivial at all, because I have many of those files on my computer.
I just want to compile the project and I'm banging my head against this single error. Can someone help?

I would say with 99,999% probability, it is impossible to work with WinCE projects in VS2017. You really need to have old good VS 6.0 that is equipped with necessary toolchains and project types (indeed they're obsolete now).
Also, there is a non-zero chance you have to have lower OS version (something like WinXP or so) as some CE-time SDKs can be not compatible with Win10.

Related

C++ via Visual Studio Video - "Include file not found in browse.path." C/C++ [1, 1]

I have read numerous examples and videos to learn how to fix this to no avail. I am new to using Visual Studio Code and I seem to not be able to resolve this issue independently. I've reset my settings, deleted and reinstalled, etc. One common occurrence I am seeing is to access "MingGW", which I apparently do not have installed on my computer and/or have access to. I am in need of great assistance!
Apparently, the error is related to the fact that you don't have a compiler installed on your machine (or VS Code can't find its directory).
You can download the compiler from its official website here:
Mingw-w64
The answer is in your question ""MingGW", which I apparently do not have installed on my computer and/or have access to"
Install MingGw, and then compile.
Here is a Link to help you get started on setting up the MinGW for Visual Studio
It sounds like you are also new to C++. Are you on Windows? (I will assume so since you explicitly mentioned MinGW).
MinGW is an older version of the compiler, and I would encourage you to install the official Microsoft Sdk instead - that is, if you want the easy road.
Are you using Visual Studio or Visual Studio Code? They are two very different application, and if you are new to either programming or C++ I would heartily recommend Visual Studio as it does all the "complicated things" for you.
There is a difference between installing Visual Studio Code (a text editor) and a compiler (MinGW, MSVC++, clang, GCC, Intel, etc.).
Btw., I know your pain - we have all been there! Don't expect things to be easy in programming, it takes some time. This is especially true for C++ which has more complications than other languages (but worth the effort!).

Deploy a c++ game to other windows machines

I have created a c++ game with the following libraries : SDL2 and SDL2_MIXER. I want to give the game to some friends who have no programming experience to play with. Now I don't really know how to do that.
What I have tried is to use installshield limited edition with visual studio. After giving the installation program to some friends they all had a common problem-error that a dll MVCsomething was missing.
What is the simplest way to give my friends the app? Since c++ is translated to assembly do I have to compile the source again each time I change a machine?
Given the way that you've tagged your question, it is unclear if you are using Visual Studio or CodeBlocks to compile the code.
I guessing that you're compiling it in Visual Studio, and therefore they're getting an error that they don't have the appropriate MSVCRT DLLs—in other words, the C runtime library that your code depends upon, having been compiled with Microsoft's compiler. Point them to download the version of the Visual C++ Redistributable matching the version of Visual Studio that you're using on your development computer. For example, if you have VS 2015, they'll need to install Visual C++ Redistributable for Visual Studio 2015.
Alternatively, you can bundle the required redistributable into your installer to make sure that it gets installed automatically, if it isn't already. In InstallShield, I believe that's done by marking the VC++ Redistributable as a "requirement". Make sure that it's set as a prerequisite. Although, judging from the answer to this question, it may be that InstallShield LE doesn't support this. If that's the case, my advice would be to ditch InstallShield altogether and use something like Inno Setup to build an installer. There is a moderate learning curve, but it is useful knowledge. That being said, I can't believe Microsoft would ship a mechanism for creating a setup program with Visual Studio that didn't support automated installation of the CRT. I have not kept up with what Visual Studio supports nowadays with respect to setup wizards.
Since c++ is translated to assembly do I have to compile the source again each time I change a machine?
No, no. Assuming that your friends are all running Windows (and not, say, Linux) and have x86-based machines (which they do if they're running Windows), your code will work fine. The only hitch would be if you are compiling 64-bit code that runs on your machine, but they only have 32-bit machines. Then you'll need to have a 32-bit and 64-bit version. (Or a single 32-bit version, which will run on both.)

Visual studio 2013 project with v120_xp toolset has MIDL 2072 error

I have recently moved to visual studio 2013 and upgrade all my c++ projects to use 8.1 of the windows SDK and the v120_xp toolset. A large majority of the projects are compiling and working fine i do however have two projects that refuse to build with several errors similar to the following error:
error MIDL2072: inapplicable attribute : [annotation] [ Field 'pDescription' of Struct 'D3D10_MESSAGE' ( Type 'D3D10_MESSAGE' ) ]
All the errors refer to the d3d10sdklayers.idl file. This occurs when the projects idl file is compiled as part of the project if i compile the file alone its fine.
Any help or suggestions are appreciated, thanks.
and upgrade all my c++ projects to use 8.1 of the windows SDK
That's where that went wrong. When you use the v120_xp toolset then you use an old version of the Windows SDK. Version 7.1, the last one that's still compatible with XP. With #include files that are different, and build tools like midl.exe that are older.
You cannot use this old version of midl.exe on the 8.1 version of d3d10sdklayers.idl. It contains attributes that it doesn't know how to process. It chokes on the _Field_size_(DescriptionByteLength) that's present in that file. Only the 8.x version of midl.exe can deal with it.
You are kinda lucky to run into this problem, there are a lot more hidden traps in the 8.1 SDK headers that will make your program fail to work properly on XP. Pretty hard to diagnose too. If you require XP compatibility then you must use the 7.1 headers. You'll have to fix to the damage you did to the projects, presumably the VC++ Directories settings. Or give up on supporting XP, the time has come.

x64 if Visual Studio C++ 2012?

I have been using SDL with Visual C++ for a while, mostly making practice games, but I find that I can't give the game to other people unless they have Visual C++ themselves. One problem that I found using a Dependency Tracker was that the source files and such used both x86 and x64. After looking through, I found that my Visual Studio source files were all in x64, so naturally I went through and modified my SDL files to be the x64 package instead of the x86. After fussing about how it still insisted on not working, I found out that the program that I was exporting was in x86 all along! I've been trying since to get it to export in x64 since, but I simply don't know how. Can somebody help me do this?
Oh well, this question is a bit hard to understand for me. It looks, like MSalters suggested, that you mix up some terms.
The source of your problem is probably just the missing Visual Studio Redistributable on the target computer.
You can get it here. Not that this is the redistributable for VS 2012 Update 1. There are also different versions for x86 and x64 (also arm). Depending on what your output is, you have to deliver the right version of the redistributable with you programms.

setup visual studio express for arm

I'd like to compile panda3d for arm and downloaded the c++ version visual studio express. Sadly the last time I used c++ is about 4 years ago. I googled how to get the project to compile to arm but I only found this:
http://www.ehow.co.uk/how_7675465_add-support-visual-studio-express.html
It looks pretty straightforward but the problem is: I'm using the german version of visual studio and there are no such options. I tried to download the english version but the installer detected my systems language and fell back to german. I searched all menus I could find for proper compiler options but couldn't find anything. Now I wonder: The options can not simply have vanished in the german version. Are you having similar experiences ? Can you give me advice how to setup arm support or where to find the right settings ? Even better, if you're german, too, can you check if you have appropriate menus ?
Thank you for your time
UPDATE:
I'm using windows 7 64bit and have tried visual studio c++ express 2010 and visual studio c++ express 2008. The device I'd like to target will run with a nvidia tegra 3.
UPDATE #2:
I'd like to target a linux distro, most probably ubuntu.
If there's no support for arm in visualstudio I could switch to any other IDE just as well. Actually I only need that one compilation and figured using Visual Studio would be least problematic. If there's another easy alternative I'd appreciate it, if you told me.
That's probably unrelated to your German version; my English setup of VS2010 doesn't have that option either. But what precise platform are you targetting? The different Visual Studio versions are tied in with particular Windows CE versions, and compatibility is rather limited.
Not sure if OP is aware, but targeting a linux distro doesn't play well with visual studio.
Definitely wrong path.
IMO, using Visual Studio is the best tool for development, with pretty good on-device debugging capabilities, even though ARM support is quite limited, it's still is one of the best tools. But you won't be able to make anything with for a linux distro, it will work only as an advanced text editor.