问题描述
我想尝试一个包含makefile的程序,但是当我在 shell 中放入make
时,错误是:
g++ -g -DaUNIX -I../../acroname/aInclude -I../../acroname/aSource -Wl,-rpath,. unix_aLaserDemo_Data/aLaserDemo.o unix_aLaserDemo_Data/acpLaser.o -lpthread -lcrypto -lssl -o ../../acroname/aBinary/aLaserDemo
/usr/bin/ld: cannot find -lcrypto
collect2: ld returned 1 exit status
这是makefile:
CC = g++
CFLAGS = -DaUNIX -I../../acroname/aInclude -I../../acroname/aSource
LFLAGS = -Wl,-rpath,.
SRC = ../../acroname/aSource
BIN = ../../acroname/aBinary
LIBS = -lpthread -lcrypto -lssl \
#LIBS = -lpthread\
-L../../acroname/aBinary -l aUtil -l aIO
OBJ = unix_aLaserDemo_Data
.PHONY : app
app : $(OBJ) $(BIN)/aLaserDemo
$(OBJ) :
mkdir $(OBJ)
$(BIN)/aLaserDemo : $(OBJ)/aLaserDemo.o $(OBJ)/acpLaser.o
$(CC) -g $(CFLAGS) $(LFLAGS) $^ $(LIBS) -o $@
$(OBJ)/aLaserDemo.o : aLaserDemo.cpp
$(CC) -c $(CFLAGS) $< -o $@
$(OBJ)/acpLaser.o : $(SRC)/acpLaser.cpp $(SRC)/acpLaser.h
$(CC) -c $(CFLAGS) $< -o $@
.PHONY : clean
clean :
rm -rf $(OBJ)
rm -f $(BIN)/aLaserDemo
我尝试找到加密货币库:
/usr/lib/i486/libcrypto.so.0.9.8
/usr/lib/i586/libcrypto.so.0.9.8
/usr/lib/i686/cmov/libcrypto.so.0.9.8
/usr/lib/libcrypto.so.0.9.8
我该怎么解决?
最佳答案
我通过安装libssl-dev在12.10上解决了此问题。
sudo apt-get install libssl-dev