在Linux下实现了一个有关使用OPENSSL中SHA1算法的程序,直接copy到mac机下编译出现如下错误:
Undefined symbols for architecture x86_64:
"_SHA1_Final", referenced from:
fixSignatureHeader(char*, int) in main.o
"_SHA1_Init", referenced from:
fixSignatureHeader(char*, int) in main.o
"_SHA1_Update", referenced from:
fixSignatureHeader(char*, int) in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile大概如下:
cc = g++
CFLAGS = -g -w -Wall