- 论坛徽章:
- 0
|
为编译了一个openssl 出来,然后把编译出来的文件 有 libcrypto.so.1.0.0 1.0.0这种版本,为连接的时候把 libcrypto.so.1.0.0 的1.0.0改成 libcrypto.so 放在 HMC_OpenLib 目录 然后通过make编译
CC = g++ -Wall -std=gnu++0x -fPIC
RELEASE = 1
UNICODE = 0
LOADBIN = -L ../../../HMC_Release/HMC_OpenLib/
LIB = -static-libgcc -lcrypto -lssl
LOADSO = -Wl,-rpath=../HMC_OpenLib/
LIBINCLUDE = WSProtocol_Connect.o WSProtocol_Codec.o WSProtocol_DllMain.o
ifeq ($(RELEASE),1)
FLAGS = -c -O2
DEBUG =
else
FLAGS = -c -lc_p
DEBUG = -g -pg
endif
ifeq ($(UNICODE),1)
UNICODE = -D _UNICODE
else
UNICODE =
endif
all (LIBINCLUDE)
$(CC) $(DEBUG) $(LOADSO) $(LIBINCLUDE) -o libHMC_WSProtocol.so -shared $(LIB) $(LOADBIN)
WSProtocol_Connect.o:./WSProtocol_Connect/WSProtocol_Connect.cpp
$(CC) $(DEBUG) $(FLAGS) $(UNICODE) ./WSProtocol_Connect/WSProtocol_Connect.cpp
WSProtocol_Codec.o:./WSProtocol_Codec/WSProtocol_Codec.cpp
$(CC) $(DEBUG) $(FLAGS) $(UNICODE) ./WSProtocol_Codec/WSProtocol_Codec.cpp
WSProtocol_DllMain.o:WSProtocol_DllMain.cpp
$(CC) $(DEBUG) $(FLAGS) $(UNICODE) WSProtocol_DllMain.cpp
指定后,发现没用,ldd 这个so 还是发现用到的是 libcrypto.so.1.0.0
libcrypto.so.1.0.0 => not found
libssl.so.1.0.0 => not found
怎么解决这个问题哦。为不想要版本后缀怎么作? |
|