Hi,
I'm trying to compile Crypto++ 5.4 with MinGW but got no success till
date. I could compile it successfully with MSVC with the provided
project file, but I whenever I'm using string in a project, it is
starting to throw me lots of undefined symbols (which are string
related).
I've prepared two makefiles for MinGW with Bakefile. But the static
build is building properly whereas the DLL is Not. I'm quoting a
portion of those files. Another point is my app fails to link properly
with the compiled static library.
Static Lib:
# C++ compiler
CXX := g++
# Standard flags for C++
CXXFLAGS :=
# Standard preprocessor flags (common for CC and CXX)
CPPFLAGS :=
CPPDEPS = -MT$@ [EMAIL PROTECTED] -MD
CRYPTOPP_CXXFLAGS = -O2 -DNDEBUG -DWIN32 \
-DCRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2=1 -D_WINDOWS -msse2 -
pipe \
$(CPPFLAGS) $(CXXFLAGS)
CRYPTOPP_OBJECTS = \
cryptopp_algebra.o \
cryptopp_algparam.o \
.......
all: libcryptopp.a
clean:
-if exist .\*.o del .\*.o
-if exist .\*.d del .\*.d
-if exist libcryptopp.a del libcryptopp.a
libcryptopp.a: $(CRYPTOPP_OBJECTS)
if exist $@ del $@
ar rcu $@ $(CRYPTOPP_OBJECTS)
ranlib $@
For DLL:
### Variables: ###
CPPDEPS = -MT$@ [EMAIL PROTECTED] -MD
CRYPTOPP_CXXFLAGS = -O2 -DNDEBUG -DWIN32 -DCRYPTOPP_EXPORTS \
-DCRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2=1 -D_WINDOWS -D_USRDLL \
-DCRYPTOPP_DLL_ONLY -msse2 -pipe $(CPPFLAGS) $(CXXFLAGS)
CRYPTOPP_OBJECTS = \
cryptopp_algebra.o \
cryptopp_algparam.o \
cryptopp_asn.o \
.....
all: cryptopp.dll
clean:
-if exist .\*.o del .\*.o
-if exist .\*.d del .\*.d
-if exist cryptopp.dll del cryptopp.dll
-if exist libcryptopp.a del libcryptopp.a
cryptopp.dll: $(CRYPTOPP_OBJECTS) cryptopp_cryptopp_rc.o
$(CXX) -shared -fPIC -o $@ $(CRYPTOPP_OBJECTS) $(LDFLAGS) -Wl,--out-
implib=libcryptopp.a -lkernel32 -luser32 -lgdi32 -lwinspool -
ladvapi32 -lshell32 -lole32 -lodbc32 -lodbccp32 -loleaut32 -luuid -
lws2_32
I can understand that I made some mistakes. Thus I need some help
regarding--
1. What are the pre-processor flags and compiler settings necessary to
*Compile* Crypto 5.4??
2. What are the settings necessary to compile an app with compiled
crypto++ library?
It would be nice if anyone can give some tips or at least provide me
to a proper resource.
Thanks & Regards,
Biplab
(http://biplab.in)
--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---