Can not find mpirxx.h after building the mpir-2.6.0 library in vc++ - c++

I need to use mpir-2.6.0 library with visual c++ 2010. My code is going to be in c++.
I extracted both folders (mpir-2.6.0 and vsyasm-1.2.0-win32). Then, I copied the content of the folder vsyasm-1.2.0-win32 (including vsyasm.exe after renaming it to yasm.exe and placing it in: C:\Program Files\Microsoft Visual Studio 11.0\VC\bin\. Then, I opened the project: mpir.sln which is placed in: \mpir-2.6.0\build.vc10. Then, I changed the Project configuration to: Release.
When I try to build the whole solution, I get a lot of errors such as:
error C1020: unexpected #endif c:\proj\mpir-2.6.0\mpir-2.6.0\mpir.h 4 1 lib_mpir_gc
error C1020: unexpected #endif c:\proj\mpir-2.6.0\mpir-2.6.0\mpir.h 4 1 lib_mpir_gc
error C1020: unexpected #endif c:\proj\mpir-2.6.0\mpir-2.6.0\mpir.h 4 1 lib_mpir_gc
But when I build every library separately, it is successful.
After the build, I went to: \mpir-2.6.0\build.vc10\Win32\Release
and find the files:
mpir.lib
mpirxx.lib
mpir.pdb
mpirxx.pdb
But I can not find the files:
mpir.h
mpirxx.h
Which I need to copy them the visual studio include file.
My main source for these configuration is: http://www.exploringbinary.com/how-to-install-and-run-gmp-on-windows-using-mpir/ (but this was for old versions for the library and the ysam). I do not understand the reasons for these errors. I was able to configure the library with old version. But I need to upgrade as there are improvements in the library and mine is very old one.

The output files are now located in mpir\lib\Win32\Release or mpir\dll\Win32\Release.
The recommended way to build MPIR specifcally for your CPU is to first run mpir_config.py which is located in the build.vc10 directory. mpir_config.py will prompt you with a list of CPU options. Then when you open mpir.sln, you should only compile code for the specific CPU. And then you compile the C++ wrapper (i.e. compile lib_mpir_p3 first, and then lib_mpir_cxx).
Edit: I just noticed another error from your original post. You need to rename the directory "mpir-2.6.0" to "mpir". The directory layout needs to be "<>\mpir\build.vc10"

I had the same problem with MPIR 2.6.0 and VS 2012. What I did to make MPIR work was to build lib_gc and lib_cxx, both with win32 and release mode. Because my c++ application is win32 console, this way it worked perfectly.
Becuase my windows is 64, I thought I had to build 64 versions, but turned out that I was wrong.

Related

What's the cause of a D8049 error in visual studio?

I'm creating a project with openframeworks (the full source is here: https://github.com/morphogencc/ofxAsio/tree/master/example-udpreceiver), and the empty project seems to compile fine.
I added the ASIO library, and a few header classes, and now the project seems to be give me the following error:
1>------ Build started: Project: example-udpreceiver, Configuration: Debug x64 ------
1> main.cpp
1>cl : Command line error D8049: cannot execute 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\c1xx.dll': command line is too long to fit in debug record
1>cl : Command line error D8040: error creating or communicating with child process
I couldn't find any examples of error D8049 on stackoverflow or even on Microsoft's pages, and google turned up painfully few results. The only remotely useful one was this github issue:
https://github.com/deplinenoise/tundra/issues/270
But I'm still not sure what's causing the problem. Is anyone familiar with this error, and can recommend a method for troubleshooting what's causing it?
thanks in advance!
For me, working with UE4, this was an intermittent error.
I added "bLegacyPublicIncludePaths = false;" to the innermost block of project.Build.cs and recompiled without errors.
Then I removed that line and compiled again w/o errors.
The error message suggested adding "DefaultBuildSettings = BuildSettingsVersion.V2;" to project.Target.cs which worked.
This is a bit of a weird sounding error, as it is from essentially internally generated data. However, you do have control over that. Taking the error message at face value, you probably have many/lots of defined symbols passed in on the command line (or the the ones you do have have lengthy definitions), or you may have some lengthy file paths.
If you look under the project properties, one of the selections under the C++ section is "Command Line", which will show you exactly what gets passed to the compiler. When you view that you can see where you have many or lengthy parameters, and then make changes to shorten them.
Too many defines? Put them in a header (possibly stdafx.h) and include them that way.
Long file paths? Shorten the paths, put the files somewhere else, or set up file system aliases to your real directories that use shorter paths.

C++ Error RC2104 trying to compile PuTTY-PSCP (for Windows) on Visual Studio 6.0

I was about to use PuTTY Development source code for Windows to create my own client application (found here: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) but as I tried to compile the PSCP project (SCP Client), I got the following error :
C:\work\2015\Putty\windows\version.rc2 (18): error RC2104 : undefined
keyword or key name: BINARY_VERSION
I've been going through the various posts involving this error but didn't find anything working :
error RC2104: undefined keyword or key name: DS_SETFONT :
On this post I noticed that the version of MSVC was brought up so I figured maybe something has to be done to get PuTTY to work on VC 6.0 ?
Also I tried to add #include <windows.h> in both version.rc2 (version.rc2 is used for inclusion in all .rc files) and pscp.rc, none worked.
I'll be quick to answer if you need any information (project properties, source code...)
USING Visual Studio 6.0 with SP6 on Windows 8.1
Probably, wrong version.h is seen.
Correctly, the file version.h in the project folder should be seen.
Please try to modify version.rc2:
#include "version.h"
to
#include "..\\..\\..\\version.h"
At least, resource compiler will end successfully.
If you search through the PuTTY source files, you'll notice that BINARY_VERSION is defined in version.h and used in windows/version.rc2, which #includes version.h.
Since your version.rc2 isn't seeing version.h, try to figure out why: Is version.h still present and does it still contain BINARY_VERSION? Are your include paths correct? Is there another version.h somewhere else in your include path that's getting picked up by mistake?
Which source code are you using ?
I tested latest(0.64) "Release source code for Windows".
direct link is
http://the.earth.li/~sgtatham/putty/latest/putty-src.zip
I had tried to compile using VC++ 6.0 Professional with SP6, on my PC,
running Windows XP SP3.
After extracting putty-src.zip to somewhere with keeping folder
structures, did you correctly opened 'putty.dsw' in "putty-src\windows\MSVC" folder?
You should be find in 7 projects in 'FileView' tab of the workspace
in Visual Studio 6.0.
You can switch active project to 'pscp' with context menu via
right button click on 'pscp' project.
With modified version.rc2, resource compiler finished successful.
But two (sshshare.c, winsftp.c) C source files failed compiling
with 20 errors. in 'pscp' project.
Errors while compiling 'winsftp.c' is caused 'TIME_POSIX_TO_WIN'
and 'TIME_WIN_TO_POSIX' macros.
'ull(unsigned long long)' is a 64-bit integer-suffix, newly defined in C99. Since C99 standard is not support on VC6, then caused errors.
I had temporally modified
11644473600ull ------> ((ULONGLONG)11644473600)
10000000ull ---------> ((ULONGLONG)10000000)
and confirmed errors are cleared. (Sorry, no validation the code is correctly generated)
3 errors while compiling 'sshshare.c' is also caused another macro.
I cannot understand why you got 116 errors.

QuantLib 1.5 compiling error cannot open file 'QuantLib-vc100-x64-mt.lib'

I have already installed boost library v1.57.0 (x64) via the binary file, which works properly under my VS2010Pro.
However, when I tried to compile the latest version (v1.5) of QuantLib, by opening QuantLib_vc10.sln file, for both 'Debug' and 'Release' under 'x64' in VS2010, I got something like:
QuantLib.vcxproj -> ...\QuantLib-1.5.\lib\QuantLib--x64-mt.lib
in the 1st project, then 18 failed build with the error:
LINK : fatal error LNK1104: cannot open file 'QuantLib-vc100-x64-mt.lib'
It is clear that the fatal error is due to the incapability of naming library with 'vc100' in the 1st project. But I don't know how to fix the problem.
Any suggestions? Thanks!
The version tag should be taken care of in the QuantLib.props file, which in imported in the project. From searching a bit, though, it looks like the VisualStudioVersion property (which we're relying on) might not be defined in VS10. Try editing QuantLib.props, and adding
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
</PropertyGroup>
before the other two PropertyGroups, and relinking the library (and please, let me know if this works so I can patch the file in the next release).

Trying to get my game running in VC 2010, can't seem to link SOIL library, don't know how to link, game source code included

I've been using CodeBlocks for a while now as I make a little hobby game in C++. Come across a snag whereby I want to see the current values of all the data in my arrays at any point, CodeBlocks doesn't seem to have that ability. Have been told by workmates (professional game programmers) that I should use Visual Studio.
Have previously used Visual Studio C# in the past, was very handy being able to use a break point while debugging other small games I've made and then going through the big list of watches to look at particular array values or any other value from within my program at that time.
So I've created a new blank project in VC2010 and added all my code files to the project. I know I have to link libraries and such, have spent the last few hours trying to figure out how to do that. But even after all that is done, I'm still getting link errors (I think)
First problem is this:
fatal error C1083: Cannot open include file: 'gl\glext.h': No such file or directory
So I commented it out to see how much further I could get.
Eventually had to add to my main.cpp file
#pragma comment (lib, "opengl32.lib")
#pragma comment (lib, "glu32.lib")
#pragma comment (lib, "libsoil.lib")
I ended up copying the libsoil.a file to C:\Program Files\Microsoft Visual Studio 10.0\VC\lib and renaming it to libsoil.lib (as stated on the authors's website http://www.lonesock.net/soil.html)
So now I get this when I compile
1>libsoil.lib(stb_image_aug.o) : error LNK2019: unresolved external symbol ___chkstk referenced in function _stbi_zlib_decode_noheader_buffer
1>libsoil.lib(image_helper.o) : error LNK2019: unresolved external symbol _sqrtf referenced in function _RGBE_to_RGBdivA2
1>C:\Repositories\HappyHelperPuppy\CppVer\HappyHelperPuppy\Debug\HappyHelperPuppy.exe : fatal error LNK1120: 2 unresolved externals
..And I have no idea what to do next. I've spent ages in Google and trawling through forums and I really just don't know what to do.
So as a last ditch effort I'm zipping up all my code and project files and letting anyone whos interested to have a look and see if they can find a solution. It's not like this game will have any secret feature I want to keep under wraps, and all the art is from an open game competition from ages ago ("TIGSource Assembly" for those who know what it is) or from DeviantArt (just wanted something to look at while I made it, wouldn't be final game release art)
The code/game can be found here http://users.on.net/~infernoraven/hhp_busted_code.zip (27mb)
The SOIL library should be in the main directory in its own soil.zip
Any help would be good, but I'm just getting really depressed as I seem to spend most of my time either fighting with the IDE/Compilers or some annoying syntax problem.
The CodeBlocks project files should be in there also, so if you..
un-comment out glext.h
link to SOIL
link to libopengl32 and libglu32
Hopefully it'll compile for you. Otherwise there should be an HappyHelperPuppy.exe that's precompiled by CodeBlocks that should hopefully run and give you an idea of what is suppose to happen
In the SOIL package there are a number of project files for visual studio. When I try to load up the VC9 one and convert it to VC10, I get conversion errors.
Conversion Report - SOIL.vcproj:
Converting project file 'C:\Documents and Settings\Administrator\My Documents\Downloads\soil\Simple OpenGL Image Library\projects\VC9\SOIL.vcproj'.
Failed to upgrade platform 'x64'. Please make sure you have it installed under '%vctargetspath%\platforms\x64'
VCWebServiceProxyGeneratorTool is no longer supported. The tool has been removed from your project settings.
Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.
Attribute 'Detect64BitPortabilityProblems' of 'VCCLCompilerTool' is not supported in this version and has been removed during conversion.
Failed to upgrade 'Debug|x64'. Please make sure you have the corresponding platform installed under '%vctargetspath%\platforms\x64'
The project configuration dimension name/value "(Platform, Win32)" was not found in the project manifest.
Project upgrade failed.
If I use the VC8 project file and try to upgrade that, a libSOIL.lib file is generated by VC2010 throws an error saying "Unable to start program ... \SOIL.lib The specified file is an unrecognized or unsupported binary format"
But the author on his site states that I can simply rename the libSOIL.a file to a libSOIL.lib file and it should work.
The soil.zip file contains some .sln files under the folder projects. Use the proper .sln file to build the library, then link your project against this library. It worked fine on my side.

Using Common Header Files in eVC++ 3

I'm learning C++ and i have the eVT(eMbedded Visual Tools) installed in my computer, because of the eVB 3(eMbedded Visual Basic) for my VB pocket programs, but i'm learning C++, then i want to use the eVC++ 3 for develop some command line aplications, then only to test i created an HelloWorld aplication, just for test, but when i try to compile it gave me this error:
Fatal error C1083: Cannot open include file: 'iostream': No such file or directory
Error executing clarm.exe.
Remember that i can't update to eVC++ 4, because i want to build programs for Windows CE 3.1
Thanks!
You need to add the path to the directory where ostream file resides to the list of the compiler include paths (usually -I directive).
Recently i see some eVC++ example and as i can see, eVC++(remember: Plus Plus) only uses C(Without ++) code.