On Tuesday, December 8, 2015 at 12:16:52 AM UTC-5, Tomas Navara wrote:
>
> I compiled static lib for cryptopp just fine for both debug and release. 
> Next I wanted DLL, so I edited ALL configurations to use /MD and /MDd 
> runtime libraries and tried to compile.
>
> cryptlib compiles fine, I can even see the .lib files in Release and Debug 
> folders.
>
> I tried compiling also DLL Import Release and DLL Import Debug -> also 
> fine, output libs in /DLL_Output
>
> But when I compile cryptdll, I get the following error:
>
> C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.
> targets(1189,5): warning MSB8012: TargetPath(C:\Users\michn\Documents\
> Visual Studio 2015\Projects\cryptopp\Win32\DLL_Output\Debug\cryptdll.dll) 
> does not match the Linker's OutputFile property value 
> (C:\Users\michn\Documents\Visual Studio 
> 2015\Projects\cryptopp\Win32\DLL_Output\Debug\cryptopp.dll). This may cause 
> your project to build incorrectly. To correct this, please make sure that 
> $(OutDir), $(TargetName) and $(TargetExt) property values match the value 
> specified in %(Link.OutputFile).
> C:\Program Files 
> (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(1191,5): 
> warning MSB8012: TargetName(cryptdll) does not match the Linker's 
> OutputFile property value (cryptopp). This may cause your project to 
> build incorrectly. To correct this, please make sure that $(OutDir), $(
> TargetName) and $(TargetExt) property values match the value specified in 
> %(Link.OutputFile).
>      Creating library C:\Users\michn\Documents\Visual Studio 2015\Projects
> \cryptopp\Win32\DLL_Output\Debug\\cryptopp.lib and object C:\Users\michn\
> Documents\Visual Studio 2015\Projects\cryptopp\Win32\DLL_Output\Debug\\
> cryptopp.exp
>   Generating code
>   Finished generating code
> ucrtd.lib(ucrtbased.dll) : error LNK2005: __crt_debugger_hook already 
> defined in MSVCRTD.lib(utility_desktop.obj)
> Win32\DLL_Output\Debug\cryptopp.dll : fatal error LNK1169: one or more 
> multiply defined symbols found
>
> What am I doing wrong? I left all other settings default.
>

There's a couple things going on. First (1), you are probably 
mixing/matching runtime libraries Second (2), the Windows DLL is probably 
_not_ what you want because its intended for FIPS validations. There's more 
information available at https://www.cryptopp.com/wiki/Visual_Studio .

For (1) ou can get Visual Studio project files for both VS2005 and VS2010 
that use dynamic runtime libraries on the Visual Studio wiki page.

For (2), a DLL that meets your expectations, you will need to start a new 
DLL project. Here, I stress the "meets your expectations" since you 
probably want everything that's available in the static version of the 
library. The FIPS DLL does not provide that.

If you can wait a few days, I'm putting together some scripts for Visual 
Studio that builds the static LIB and dynamic DLL from the command line 
using a developer prompt. I used to have them, but they are on a broken 
Windows 8 machine that I can no longer access.

Jeff 

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to