Compile error in wxWidgets with VS2010 Beta 2 - visual-studio

i try to build wxWidgets straight from source using VS10 beta 2, but i get this error when i try to compile it:
Error 1 error MSB3073: The command "copy "" ..\..\lib\vc_lib\mswd\wx\setup.h
:VCEnd" exited with code 1. C:\Program Files (x86)\MSBuild\Microsoft.Cp\\v4.0\Microsoft.CppCommon.targets 145
thanks!

I was able to fix that particular error by creating folders in:
/lib/vc_lib
or
/lib/vc_dll
The folders were
msw/wx
mswd/wx
mswu/wx
mswud/wx
.. etc according to the configuration that was being built
I was able to build the lib versions:
Stable Release: 2.8.10 - had to open the /build/msw/wx.dsw in VC 2008 and then in VC 2010 for the project conversion to work.A bit of work setting up the build order, the above folders in /lib and it compiles. Did not attempt building samples.
Development Snapshot: 2.9.0 - a lot easier. It comes with VC 2008 solution files and can be loaded in VC 2010. Set up the folder in the lib output folders and it compiles. Built the /samples/menu project (static lib Debug & Release) without any problems.

If you use svn checkout you need to ensure that the file include/wx/msw/setup.h exists (and not just setup0.h, just copy setup0.h to setup.h if you don't need to edit it). Otherwise check the project settings as they might have been not imported correctly -- the empty file name in copy command is very suspicious, it should be "....\include\wx\msw\setup.h" normally.
FWIW I checked that the build with VC10 beta2 works just yesterday but I had to do this change (http://svn.wxwidgets.org/viewvc/wx?view=revision&revision=62567) in order to get rid of the warnings about unknown compiler version. IOW you should use an svn checkout or apply this patch locally.

Related

Cannot open include file: 'pnglibconf.h':No such file or directory

I'm trying to build libpng in MS Visual studio 2015 community edition but when i built it, i got this error (i used cmake to compile libpng along with compiled zlib to produce libpng's soln file ALL_BUILD.vcxproj )
Cannot open include file: 'pnglibconf.h':No such file or directory
I think this a system specific error,when i try to build this on other system it works fine(because pnglibconfig.h was present with MS VS soln folder). Is there any prerequisites that is missing? Update: I tried building libpng in both debug & release mode, both are showing the same error. Zlib builds fine.
Try to add the folder where the png lib headers are to your include list in the VS project settings
If you aren't using "configure", you may need to copy pnglibconf.h.prebuilt from the scripts directory to pnglibconf.h in your working directory. See Section III of the INSTALL file in your libpng source directory.

MSBuild failing to find assembly following upgrade to VS2015

We have a build script which uses MSBuild to build our solution. It has worked fine for VS2013, but it has broken since we installed VS2015 and upgraded. Initially, it failed with this error:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for v140
(Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, please install v140 build tools. Alternatively, yo
u may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgra
de Solution...". [C:\Users\user\Documents\GitHub[snipped]Api.vcxproj]
So it was failing to build a C++ project since is seemed to default to using version 12 of MSBuild, even though it was a VS2015 project. So I added:
/tv:14.0
To the invocation of MSBuild to force it to use the right tools version. Now it fails with this:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\CodeAnalysis\Microsoft.CodeAnalysis.targets(219,5): error MSB4175: The ta
sk factory "CodeTaskFactory" could not be loaded from the assembly "C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Build.Tasks.v12
.0.dll". Could not load file or assembly 'file:///C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Build.Tasks.v12.0.dll' or one of
its dependencies. The system cannot find the file specified. [C:\Users\user\Documents\GitHub[snip].Api.vcxproj]
Now it's looking for a v12 assembly in the v14 folder. How do I fix this? I can't see any obvious place to make this change.
Note: The C++ project itself might be a red herring, the solution is mostly C# and this might just be the place where it loads in the tasks.

Error while Loading CMU sphinx in visual studio 2013

I am trying to load CMU sphinx in visual studio 2013 but getting some error.
The steps which i followed was
I downloaded sphinxbase-5prealpha and pocketsphinx-5prealpha and extracted to same folder.
Then i complied all the projects from both pocketsphinx and sphinxbase in visual studio(it asked me to upgrade the compliers so i did the upgrade)
now after cleaning the project, when i am trying to build all the project it is throwing a error that 'cannot open sphinxbase.lib' which it is showing in pocketsphinx project.
when i checked the 'sphinxbase.lib' file was already there in the linker of the project.
According to this document the 'sphinxbase.dll' file should be added to the bin files, but it is already added in the directory bot release and debug.
Similarly it is present in debug directory also.
Please help me, can anybody tell me what wrong i am doing here??
I am just a beginner only in this area.
Thanks !
You extracted files incorrectly. The layout must be the following:
root folder
\____pocketsphinx
\____ all files like README, src
\____sphinxbase
\____ all files like README, src
You need to download sources and unpack them into two folders - pocketsphinx and sphinxbase. Then open sphinxbase solution and compile everything. Then open pocketsphinx solution and compile everything. Please note that if you downloaded pocketsphinx-5prealpha you need to rename it to just pocketsphinx. Same for sphinxbase.
Please also note that pocketsphinx_5prealpha_win32 is a binary distribution, you can not compile it. Instead, you can include it directly into your projects.

Compiling FFTW source in Visual studio

Recently I am trying to compile the source code of FFTW in Visual studio 2010. I followed the instruction from the FFTW website. I downloaded the source code fftw-3.3.2.zip and corresponding vs 2010 package fftw-3.3-libs-visual-studio-2010.zip.
I got four projects from the solution, bench, benchf, libfftw-3.3, libfftwf-3.3
But on compiling I got following errors on each of the project:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.Targets(514,5): error MSB8008: Specified platform toolset (Windows7.1SDK) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected.
which points to the following content
I have tried the debug/release build for both x64 and win32, none of them worked.
Could anyone please help me on this?
It seems that it can be solved without installing the Windows 7.1 SDK
Right click on the 'libfftw-3.3' project and selected properties
Go to Configuration Properties -> General
Switch 'Platfrom Toolset' from 'Windows7.1SDK' to 'v100'
Recompile
Works for the projects 'libfftwf-3.3' and 'libfftw-3.3'
The project 'bench' and 'benchf' are failing to build:
fatal error C1083: Cannot open source file: '....\libbench2\aligned-main.c': No such file or directory
Can be solved by removing the aligned-main.c from both projects.
You can also use CMake - I created this CMake file for fftw-3.3.2 which I tested with Visual Studio 2010 x64:
https://bitbucket.org/Vertexwahn/cmakedemos/src/670f189321d89dbd61ddc8c446c91578305f9da2/fftw-3.3.2/CMakeLists.txt?at=default
You also need this config.h file:
https://bitbucket.org/Vertexwahn/cmakedemos/src/670f189321d89dbd61ddc8c446c91578305f9da2/fftw-3.3.2/config.h?at=default
It looks like you need to install the Windows 7.1 SDK, if you have already installed it, try reinstalling it incase it is corrupted.
You can download the 7.1 SDK from http://www.microsoft.com/en-us/download/details.aspx?id=8279

Trouble building Boost Libraries

OS: Win7
IDE: Visual Studio 2010 Professional
Boost Lib Version: 1.47
Downloaded "boost_1_47_setup.exe" installer from http://www.boostpro.com/download/
Initially installed everything for VS 10, then just checked every box (5+ GB install!)
Added the "boost\boost_1_47" path into "Additional Include Directories" in C++->General
Copy/Pasted code from "Getting Started on Windows: 4 - Build a Simple Program Using Boost"
Compiled without issue
Included boost/regex.hpp and re-compiled
Received Error:
LINK : fatal error LNK1104: cannot open file 'libboost_regex-vc100-mt-gd-1_47.lib'
Expected, haven't built the binaries yet.
Ran "Visual Studio Command Prompt" from tools folder in my VS 10 installation as admin
cd'ed to boost root
Ran bootstrap.bat from command line
Received Error:
Building Boost.Build engine
The system cannot find the path specified.
'.\build.bat' is not recognized as an internal or external command,
operable program or batch file.
Failed to build Boost.Build engine.
Please consult bootstrap.log for furter diagnostics.
Everything I did came from the Getting Started page on Boost.org. Not sure if its just dated or if I'm doing something wrong.
Came here looking for answers, found some similar issues, namely the following:
Problem with C++ Boost installation (can't find file) in VC++ 2010
Problem with C++ Boost installation (can't find file) in VC++ 2010
Boost C++ Libraries linker error libboost_serialization-vc100-mt-gd-1_47.lib
Boost C++ Libraries linker error libboost_serialization-vc100-mt-gd-1_47.lib
No dice. Any help would be appreciated. Thanks
The compiler cannot find the BOOST's library file. To fix the issue you have to find on your computer the libboost_regex-vc100-mt-gd-1_47.lib file and add its folder path to the Project->YourProjectName Properties (Alt+F7)->Configuration Properties->Linker->General->Additional Library Directories. After recompile your project.
This is the answer to the above comment of #Johnny 5....thousand. In VS10 the compiler-wide additional libraries are deprecated. I solved the problem by adding a new project property sheet to all my projects. It is possible to do it by calling the Property Manager Tab (View->Property Manager). In the Property Manager Tab is necessary to click right mouse button on the project, select Add New Project Property Sheet, Save the sheet to a well-known place. After to define a new User Macro - Name:BOOST, Value: Your Boost Path, for example c:\boost_1_47_0\, also add the $(BOOST) to the Additional Include Directories and ad the $(BOOST)\lib to the Additional Library Directories. That's all. For all other projects is required to add existing property sheet.

Resources