Problem building under Visual Studio 2008

232 views
Skip to first unread message

KTC

unread,
Aug 22, 2008, 10:15:24 PM8/22/08
to Crypto++ Users
Hi,

I cannot get the whole thing build using VC9. First I had trouble with
MASM not liking spaces in directories path, which is interesting
considering MASM itself is in a directory containing spaces, and so is
the default project directories.

Having moved the library to root, I still have 4 build configurations
error'ing (batch building every configurations).

------ Build started: Project: cryptdll, Configuration: Debug x64
------
Linking...
Creating library c:\cryptopp552\x64\DLL_Output\Debug\cryptopp.lib
and object c:\cryptopp552\x64\DLL_Output\Debug\cryptopp.exp
x64masm.obj : error LNK2019: unresolved external symbol
s_sosemanukMulTables referenced in function Sosemanuk_OperateKeystream
x64\DLL_Output\Debug\cryptopp.dll : fatal error LNK1120: 1 unresolved
externals
Build log was saved at "file://c:\cryptopp552\x64\cryptdll\Debug
\BuildLog.htm"
cryptdll - 2 error(s), 0 warning(s)
------ Build started: Project: cryptdll, Configuration: Release x64
------
Linking...
Creating library c:\cryptopp552\x64\DLL_Output\Release\cryptopp.lib
and object c:\cryptopp552\x64\DLL_Output\Release\cryptopp.exp
x64masm.obj : error LNK2001: unresolved external symbol
s_sosemanukMulTables
x64\DLL_Output\Release\cryptopp.dll : fatal error LNK1120: 1
unresolved externals
Build log was saved at "file://c:\cryptopp552\x64\cryptdll\Release
\BuildLog.htm"
cryptdll - 2 error(s), 0 warning(s)
------ Build started: Project: dlltest, Configuration: Debug Win32
------
Compiling...
dlltest.cpp
c:\program files\microsoft visual studio 9.0\vc\include
\intrin.h(204) : error C2373: '_InterlockedCompareExchange' :
redefinition; different type modifiers
c:\program files\microsoft visual studio 9.0\vc\include
\memory(995) : see declaration of '_InterlockedCompareExchange'
Build log was saved at "file://c:\cryptopp552\Win32\dlltest\Debug
\BuildLog.htm"
dlltest - 1 error(s), 0 warning(s)
------ Build started: Project: dlltest, Configuration: Release Win32
------
Compiling...
dlltest.cpp
C:\Program Files\Microsoft Visual Studio 9.0\VC\include
\intrin.h(204) : error C2373: '_InterlockedCompareExchange' :
redefinition; different type modifiers
C:\Program Files\Microsoft Visual Studio 9.0\VC\include
\memory(995) : see declaration of '_InterlockedCompareExchange'
Build log was saved at "file://c:\cryptopp552\Win32\dlltest\Release
\BuildLog.htm"
dlltest - 1 error(s), 0 warning(s)
========== Build: 2 succeeded, 4 failed, 18 up-to-date, 0 skipped
==========

Thanks for any help.

KTC

Jeffrey Walton

unread,
Aug 23, 2008, 12:32:26 PM8/23/08
to KTC, Crypto++ Users

KTC

unread,
Aug 23, 2008, 9:02:43 PM8/23/08
to Crypto++ Users
On Aug 23, 5:32 pm, "Jeffrey Walton" <noloa...@gmail.com> wrote:
> http://code.logos.com/blog/2008/08/error_c2373_after_upgrading_to_vs2...
>

Thanks for the link.

Purely declaring that macro (in project settings) just changed it to a
the error "identifier not found". Yes, that's saying it's not declared
after one of the definition from the redefinition error was taken out.
So I had to include <intrin.h> at the top of dlltest.cpp to make sure
the definition is there before <memory> is included. (<memory> uses
_Interlocked* even if its definition of it were taken out by that
macro.)

The other error I've managed to fixed by adding "cryptlib" as a
dependency to "cryptdll" in the project settings.

KTC

Jeffrey Walton

unread,
Sep 1, 2008, 10:12:07 AM9/1/08
to Crypto++ Users
Hi KTC,

[Posting for completeness]. I tired to duplicate this issue with no
joy. The particulars were:

* Windows XP SP3
* Visual Studio 2008 Professional
* Server 2008 SDK

I installed VS 2008 SP1, then performed a build of the cryptlib, then
cryptteset, and finally the dll and dlltest. All builds completed
successfully. Perhaps Microsoft has tweaked a header file since the
original SP release.

Jeff

KTC

unread,
Sep 2, 2008, 9:45:59 AM9/2/08
to Crypto++ Users


On Sep 1, 3:12 pm, Jeffrey Walton <noloa...@gmail.com> wrote:
> Hi KTC,
>
> [Posting for completeness]. I tired to duplicate this issue with no
> joy. The particulars were:
>
> * Windows XP SP3
> * Visual Studio 2008 Professional
> * Server 2008 SDK
>
> I installed VS 2008 SP1, then performed a build of the cryptlib, then
> cryptteset, and finally the dll and dlltest. All builds completed
> successfully. Perhaps Microsoft has tweaked a header file since the
> original SP release.
>
> Jeff
>

Um, that's odd. I have just managed to duplicate it with a fresh
install inside VMWare with no problem.

*Windows XP Professional SP3 install from a slipstreamed XP SP3 CD.
*Windows Update till there's nothing to update anymore. This included
the optional updates.
*Visual Studio 2008 Profesional (included the x64 tools for VC++
that's not selected by default).
* Windows Server 2008 SDK from a DVD burned from the ISO image from
Microsoft. (i.e. 6.0.6001.18000.367; Windows SDK v6.1)
*Windows Update
*Visual Studio 2008 Service Pack 1 from a DVD burned from the ISO
image from Microsoft. (http://www.microsoft.com/downloads/details.aspx?
familyid=27673C47-B3B5-4C67-BD99-84E525B5CE61&displaylang=en)
*Downloaded cryptopp 5.5.2 from SourceForge, and uncompressed in root
directory.
*Open project in VS2008, select batch build, select all, and build all
(twice).

And viola, same problems as noted in original message.

KTC
Reply all
Reply to author
Forward
0 new messages