Install Crypto ++ 5.6.2 on Mac OS X

I am trying to install Crypto ++ 5.6.2 on my Mac. When i started

make -j4 libcryptopp.a" 

I get the following error:

libtool: unrecognized option `-static'
libtool: Try `libtool --help' for more information.
make: *** [libcryptopp.a] Error 1

Can someone please help me with this?

+1
source share
1 answer

Can someone please help me with this?

There are several things you can do to make this easier.

First open GNUmakeand add fPICto line 1:

CXXFLAGS = -DNDEBUG -g -O2 -fPIC

Secondly, open GNUmakeand leave the “version” of the Clang discovery logic on line 18:

CLANG_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "clang")

Thirdly, open GNUmakeand release the GAS check from all sides around Darwin, on line 38. You want the Darwin check to stand alone, without checking ifeq ($(GAS219_OR_LATER),0).

ifeq ($(UNAME),Darwin)
  CXXFLAGS += -arch x86_64 -arch i386
else
  CXXFLAGS += -march=native
endif

-, GNUmake 45:

ifneq ($(CLANG_COMPILER),0)
  CXXFLAGS += -Wno-tautological-compare -Wno-unused-value
endif

make :

# Make the static lib, shared object, and test program
cd cryptopp
make static dynamic cryptest.exe

make:

# Run the test program
cd cryptopp
./cryptest.exe v

:

# Install into /usr/local
cd cryptopp
sudo make install PREFIX=/usr/local

OS X . , LD_PRELOAD ( DYLD_LIBRARY_PATH, . dyld(3) ); -Wl,rpath; -Bstatic; , . lib iOS, !

OS X, , -l -l. , ( , OS X):

g++ -DDEBUG=1 -g3 -O0 -Wall -Wextra -Wno-unused-parameter \
    -I/usr/local/include/cryptopp \
    cryptopp-test.cpp -o cryptopp-test.exe \
    /usr/local/lib/libcryptopp.a

, libcryptopp.a. - , .


Pastebin GNUmakefile, : Crypto ++ makefile OS X .


EDIT ( 2015 .): Crypto ++ Sourceforge GitHub. , , makefile.

+2

All Articles