TInyXML++ Premake with Visual Studio 2010 - c++

I tried to compile TinyXML++(or TICPP) using premake4 with these settings: "premake4 vs2010 [--unicode] [--ticpp-shared] [--dynamic-runtime]". It compiles the .libs but I can't compile TiCPP.vcxproj because the compiler says "Unable to start program c:\ticpp\lib\ticpp.lib. This file is an unrecognized or unsupported binary file." Anyone got a clue how to make this work? Oh and one more thing, why does Windows ask me if I want to open a .vcxproj with Visual Studio 2010 or Visual Studio 10? How do I make it so that it only picks one, and what's the difference. I tried the first answer, but it didn't work.

Download last version of premake, it does support VS2010
I have compiled tinyXML++ using it, by executing:
premake4 vs2010
it does generate valid sln and vcxproj files.

From oolua build instructions
Visual Studio 2010 (vs10) is not currently supported by premake yet if you have vs10 installed you can run the following command, it will generate vs9 projects and update them using the vs10 command line tool.
premake4 vs2010
As vs10 adds files which have not been created directly by premake, a specific clean operation has been added to the premake script.
premake4 cleanVS10
Scripts to build a local install, build and run unit test etc. have been added for vs10 in the script directory.
Notes:
* oolua's premake4 script may not be the same as yours.
* VS2010 support is borked in premake. Current workaround is to make a 2008 project and make VS2010 convert it for you.

Related

Building Visual Studio solution using devenv command line

I am trying to build, using devenv, a Microsoft Visual Studio 2017 C++ solution which compiles and builds properly using the IDE, version 15.9.12. So far, so good.
https://learn.microsoft.com/en-us/visualstudio/ide/reference/project-devenv-exe?view=vs-2019
When trying to build using Windows command line and devenv command, I find problems with the includes, I don't know how to tell the system where to look. I have appended in the Windows PATH all the folders where the needed HEADERS are, however it does not work.
Any ideas? What am I doing wrong?.
Thank you.

visual studio 2017, d3dx9.h No such file or directory

I'm trying to compile mpc-hc. Compilation instructions say to use VS2015, but I went for VS2017 instead.
What package should I install to get Direct3D9 headers?

Cocos 2d x not generating libcoco2d.vcxproj or libspine.vcxproj

My config:
Windows 10, python 2.7, Visual Studio 2015 community
I downloaded cocos, I successfully run setup.py
Then I proceed to execute "cocos new -l cpp -p com.whatever.Test -d D:\Projects\Cocos\Test".
Everything seems to run ok, no error message whatsoever. If I go to my folder, I can see all the project folders etc.
I open the sln file within Win32 and it opens the project in visual studio 2015.
Here comes the problem: the solution has 6 projects. 2 of them are not loading and, as a consequence, the main project fails. The failing projects are libcocos2d and libspine. There are no project files generated in their respective folders, so VS can't find the required libcoco2d.vcxproj or libspine.vcxproj.
I'm lost here people, I don't have a single clue on what do I have to do to generate both projects.
Any help will be very much appreciated.
Thanks
I found what was wrong. The cocos.py script, at some point, calls CMake. I downloaded CMake and I built the projects using that. It failed. Then I realized that CMake was using the wrong compiler. Even having Visual Studio 2015, the correct compiler is Visual Studio 2014, not Visual Studio 2015 (Thanks a lot M$...). Then CMake was working. After that I tried the script again, and everything is perfect now.

Force Cmake & Emscripten to use VS 2010 for compiling

How can I force Cmake to use Visual Studio 2010 for compiling my emscripten projects, and now VS 2015?
I keep running into an issue where cmake says it cannot find the build tools for MSBuild v140. I know it exists though, as the file path is
C:\Program Files (x86)\MSBuild\14.0\Bin
I've even tried setting the path in the Emscripten Command Prompt with
set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
but the issue still occurs.
If I open this solution in VS 2015, I can see that the configuration is set to Msbuild v 1.40, so I can't wrap my head around why Emscripten says it can't locate it.
The closest thing I could find is in this GitHub bug report on Emscripten.
Any suggestions?
Emscripten in Visual Studio is only supported for VS2010 AFAIK. Personally, I suggest you work with makefiles when generating from CMake. It is much more stable from my experience. The Visual Studio support for Emscripten is not working well, at least for me.
But if you still want to use VS2010, then you have to set the CMake generator to "Visual Studio 10 2010", and then specify the Emscripten toolchain file. You might have to set the CMake platform name to Emscripten, using the -A argument.
cmake.exe -G "Visual Studio 10 2010" -A Emscripten -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%\cmake\Modules\Platform\Emscripten.cmake
I tried doing this, but each time I did, Emscripten would return a different path to Emscripten.cmake, and say it couldn't find it. Not sure where it was getting this new path from.
Long story short, I realized I installed the web installer for Emscripten installed. So I uninstalled that and instead went with the Full installer, and it all worked well.

use msbuild to compile a vcxproj created by vs2010 on a computer without vs

I have created a large Visual C++ 10.0 project which builds nicely within the visual studio ide as well as within the "special" Visual Studio Command Prompt using msbuild with a vcxproj file.
However this project needs to be compiled by computers that do not have the vs ide, but only have the msbuild tool and the vc++ 10.0 runtime files.
The problem is that the vcxproj (created by the vs ide) file contains references to files such as Microsoft.Cpp.Default.props and Microsoft.Cpp.targets which clearly won't be available in a computer without visual studio.
Since all the compile and link command line options are available and fixed (no changes will be necessary), how is it possible to create a new vcxproj file to implement the compiling and linking of the project using these options?
I was finally able to make some tests on a "clean" computer. These are the results:
First, I installed .NET Framework 4.0 from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17718. Along with it, MSBuild 4.0 was also installed automatically. When I tried to compile I got the following error:
error MSB4019: The imported project "H:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
which means that extra files are needed to compile the vcxproj and these files were missing. Note that simple project files written by hand (and not by the VS IDE) are expected to compile without problems since they contain no references to theses files (I did not test it for certain).
Next, I installed Windows SDK 7.1 from http://www.microsoft.com/download/en/details.aspx?id=8442. The error about missing files disappeared, but I got a new one. This new error (along with the way I overcomed it) is described in http://www.damirscorner.com/CommentView,guid,9121bd6b-876c-4051-8487-de1b95a7e919.aspx.
Doing the above successfully allowed me build my vcxproj file on a computer without vs2010.
I think that the files that you mention are not part of Visual Studio. They are part of MSbuild.