Performing a WHIRLPOOL hash in C++ - c++

This sounds like a relatively simple question, but I haven't been able to get Crypto++ to work. I'm using Microsoft Visual C++ 2010 Express (I'm cheap) and the .vcxproj/.vcproj/.sln files included in the library simply don't work. There are a lot of files, too, and I'm just not sure what exactly I need.
So does anyone know of a solution I could just drop in or something? Reference implementations are fine as long as they're not ridiculously inefficient or something. Sorry for such a mundane question, but I've looked around myself and I couldn't find anything I need - I guess cryptography just isn't my area of expertise.
That being said, though, it would be nice to get Crypto++ to work, if anyone has a clue as to how I might get VC++ 2010 to load the project files. The error is extremely... not descriptive. It just says the project couldn't be loaded and gives me -2147483647 as an error number.
EDIT: Here's the Conversion Report error:
The following error has occurred during XML parsing: File: C:\Users\Kyle\Desktop\Exoterra\Dependencies\crypto\cryptlib.vcproj Line: 102 Column: 5 Error Message: System error: -2147154677. The file 'C:\Users\Kyle\Desktop\Exoterra\Dependencies\crypto\cryptlib.vcproj' has failed to load.
This is line 102 of cryptlib.vcproj:
Name="VCPostBuildEventTool"
EDIT (again): I got it to work. I deleted everything referring to x64 in the project file and now it converted properly. Thanks anyway.

Not sure what problem you had.
Download version 5.6.1;
Unzip the downloaded archive;
Double click on cryptest.sln;
Visual Studio will open and ask if you want to convert the project;
Say yes;
After a while Visual Studio will show the converted solution;
With the Express version you want be able to compile the resource files in Visual Studio. You will need to use the rc compiler from the Windows SDK to compile them.

Related

2>LINK : fatal error LNK1104: cannot open file 'dxerr.lib'

So, I've been trying to get this small project up and running.
I'm not a C/C++ expert and I think I'm not gonna receive any help with this issue given that the project seems somehow abandoned..
So I'm asking here.
This is what I have done so far:
cloned
created a _out directory
cmake'd from there
Then in VS Community Edition 15 2017 I get the following:
2>LINK : fatal error LNK1104: cannot open file 'dxerr.lib'
Reading around it seems that this is an outdated library not available anymore since Windows SDK 8+.
In the article they terminate saying:
VS 2015/2017: The VS 2015/2017 C Runtime is not compatible with the DXERR.LIB that ships in the legacy DirectX SDK. You will get link errors trying to use it. You can use this module to replace DXERR LIB but will have to rebuild the code that uses it. You can try linking with legacy_stdio_definitions.lib instead, but ideally you'd remove this dependency on the legacy DirectX SDK.
I have no idea which solution applies best to my case and how I can implement it.
Anyway, another thing I tried was removing from dxerr.lib from Additional Dependencies within the SDL2 project Linker properties, like I read here.
But then I got plenty of other errors
So, I'm at a dead end at the moment.

building curl 7.46.0 on windows without cmd

curl being new to me, I am figuring out an easier way to compile it on Windows. I've managed to find a good documentation explaining in layman's terms all the steps, however this doc is based on curl-7.9.6.
It was simpler since curllib.dsw which is the Visual Studio Project file for curllib was found in folder curl-7.9.6\lib. So building it was resulting in libcurl.dll + libcurl.lib
Unfortunately this project file is no more in the latest version 7.46.0, and I would not like to mess around using other techniques I am not familiar with, compiler other than msvc (e.g MinGw), and if possible without resorting to cmd.
I have already done some researches online before posting this thread, but we never know maybe someone has written on this topic very simple documentation that everyone could understand and willing to share it publicly to get both the static library file and DLL (raised just above) or have found a way to get back the project file (.dsw) in the latest release which will a priori be straightforward to compile using Visual Studio 2013 (v120)
Best

error MSB6006: "CL.exe" exited with code -1073741805

I am getting the following compile error when building a C++ application in VS 2010
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(153,5): error MSB6006: "CL.exe" exited with code -1073741805.
I know it has something got to do with property settings, but I am not quite sure as to what i should do, Can someone tell me what i should do to remove this error?..Thanks in advance.
I have a long experience with finding and reporting compiler bugs.
First, MSBuild leaves some files that includes the actual command line used to invoke CL.exe. It also sets environment variables, so you might need to look at /v:d output to see the actual steps to reproduce. Get CL.exe to produce the error without MSBuild.
Then prune things out of the source file until you get a small thing that still frys the compiler. I delete stuff starting at the bottom. I remove #include's that are no longer needed; expand out the bottom one that remains and continue.
Save each "save" so you can back out when you kill the error.
Then, log an incident with MS. Once they get it to the proper department, and then determine that it's a compiler bug, they will refund your incident. I recall having something like 3 credits with the MSDN subscription; used that to get it rolling.
You may have had imported property sheets which were not compatible with your current build environment.
Try to open Property Manager and see if any custom property sheets are present.
I just experienced this issue moving from VS2010 to VS2013, where I had some old Windows 8.1 SDK property sheets. Building from the command line caused this error, while building within Visual Studio was fine.

How do I create a WT project in MSVC?

If anyone has used WT successfully with MSVC (mine is 2005), could you please provide some details on how this can be done?
I have installed WT fine , then ran some examples. The problems begin when I try to create a project of my own, as simple as hello.C. I get a thousand compiler errors like this one :
C:\Program Files\Microsoft Visual Studio 8\VC\include\cstdio(25) : error C2143: syntax error : missing '{' before ':'
Possibly some project tuning is required, which I could not figure out, despite trying for many hours...Any help will be appreciated.
[Edit] WT is the Witty (webtoolkit.eu)
Well after searching and googling around for some days , it seems that using CMake is a must in order to build a WT project. This page explains the procedure. Hopefully it will save you some time.
Taking a random stab: Try renaming your file "hello.cpp". MSVC compiles .c files as C by default, not C++.
The first result for WT I found via google is the one Jason D linked. It is a C++ library, not a C library.
If this doesn't help, please provide more info, including what "WT" stands for, and some of your short sample code.

C++ error detection in Visual Studio 2005

Coming from a different development environment (Java, mostly) I'm trying to make analogies to habits I'm used to.
I'm working with a C++ project in Visual Studio 2005, the project takes ~10 minutes to compile after changes. It seems odd that if I make a small syntactical error, I need to wait a few good minutes to get a feedback on that from the compiler, when running the entire project build.
Eclipse gave me the habit that if I make some small change I will immediately get a compiler error with an underline showing the error. Seems reasonable enough that VS should be able to do this.
Is this something I can enable in VS or do I need an external plug-in for this?
The feature you are asking for will be available in Visual Studio 2010. Here is a detailed link of the feature details that will be available.
For now, as others have suggested, you can use Visual Assist which can help a little bit.
These are called Squiggles BTW.
You can try the following:
install a plugin like Visual Assist: it will notify you about most of the errors;
if you want to check yourself, use Ctrl-F7 to compile the file you are currently editing - in such case, you will not need to wait for all project to compile. If you are editing a header file, compile one of the .cpp files it is included in.
Yes, C++ is notorious for its build times. Visual Studio cannot perform on-the-fly syntax checking (in case of C++), but you can install Visual Assist to help with that:
(source: wholetomato.com)
10 minutes is quite a long time to wait, are you doing a full build every time? There are a lot of techniques you can use to speed this up, for example using precompiled headers. I try to organise my code so that I do all of my significant changes in the code file instead of the header, then just do a build of that one file (ctrl F7) to check for errors.
You have the "error list window" that will list your errors and warnings after compilation. If you double click on the error it will directly go to the problematic line of code in your source. It's in the menu Display, sub menu "Other windows".
Keep in mind that compiling C++ is a much more difficult task than compiling Java, which explains the increased time.
Visual Assist X is very cool but only detects typos.
It cannot be compiled "on the fly" which explain the feature you ask is not possible. If you have a multicore machine, you can enable parallel building.
Tools -> Options -> Projects and solutions -> Generate and Execute -> maximum number of parallel compilation.
Resharper for C# has it. But for c++, maybe visual assist x ?
Eclipse gave me the habit that if I make some small change I will immediately get a compiler error with an underline showing the error. Seems reasonable enough that VS should be able to do this.
Eclipse has implemented their own Java compiler, and run that in the background every time you type a word to be able to detect and underline errors. I don't know if I'd call that "reasonable". ;)
It's a lot of work to implement that feature, even in a simple language like Java.
In C++, where, as you've discovered, compiles may take minutes, it's harder still.
Visual Studio 2010 is going to implement this feature (again, using a separate compiler, which is much stripped down, and won't always provide correct results -- that's the compromise necessary to ensure that it's fast enough to compile on the fly).