问题一:
./sshcrypto.c:25: error: field ‘key’ has incomplete type
./sshcrypto.c:30: error: expected specifier-qualifier-list before ‘des_key_schedule’
./sshcrypto.c: In function ‘blowfish_encrypt’:
./sshcrypto.c:131: error: ‘BF_ENCRYPT’ undeclared (first use in this function)
./sshcrypto.c:131: error: (Each undeclared identifier is reported only once
./sshcrypto.c:131: error: for each function it appears in.)
./sshcrypto.c: In function ‘blowfish_decrypt’:
./sshcrypto.c:143: error: ‘BF_DECRYPT’ undeclared (first use in this function)
./sshcrypto.c: In function ‘des3_init’:
./sshcrypto.c:156: error: ‘struct des3_state’ has no member named ‘k1’
./sshcrypto.c:157: error: ‘struct des3_state’ has no member named ‘k2’
./sshcrypto.c:160: error: ‘struct des3_state’ has no member named ‘k3’
./sshcrypto.c:162: error: ‘struct des3_state’ has no member named ‘k3’
./sshcrypto.c:164: error: ‘struct des3_state’ has no member named ‘iv1’
./sshcrypto.c:165: error: ‘struct des3_state’ has no member named ‘iv2’
./sshcrypto.c:166: error: ‘struct des3_state’ has no member named ‘iv3’
./sshcrypto.c: In function ‘des3_encrypt’:
./sshcrypto.c:176: error: ‘struct des3_state’ has no member named ‘iv1’
./sshcrypto.c:176: error: ‘struct des3_state’ has no member named ‘iv2’
./sshcrypto.c:178: error: ‘struct des3_state’ has no member named ‘k1’
./sshcrypto.c:178: error: ‘struct des3_state’ has no member named ‘iv1’
./sshcrypto.c:178: error: ‘DES_ENCRYPT’ undeclared (first use in this function)
./sshcrypto.c:179: error: ‘struct des3_state’ has no member named ‘k2’
./sshcrypto.c:179: error: ‘struct des3_state’ has no member named ‘iv2’
./sshcrypto.c:179: error: ‘DES_DECRYPT’ undeclared (first use in this function)
./sshcrypto.c:180: error: ‘struct des3_state’ has no member named ‘k3’
./sshcrypto.c:180: error: ‘struct des3_state’ has no member named ‘iv3’
./sshcrypto.c: In function ‘des3_decrypt’:
./sshcrypto.c:189: error: ‘struct des3_state’ has no member named ‘iv1’
./sshcrypto.c:189: error: ‘struct des3_state’ has no member named ‘iv2’
./sshcrypto.c:191: error: ‘struct des3_state’ has no member named ‘k3’
./sshcrypto.c:191: error: ‘struct des3_state’ has no member named ‘iv3’
./sshcrypto.c:191: error: ‘DES_DECRYPT’ undeclared (first use in this function)
./sshcrypto.c:192: error: ‘struct des3_state’ has no member named ‘k2’
./sshcrypto.c:192: error: ‘struct des3_state’ has no member named ‘iv2’
./sshcrypto.c:192: error: ‘DES_ENCRYPT’ undeclared (first use in this function)
./sshcrypto.c:193: error: ‘struct des3_state’ has no member named ‘k1’
./sshcrypto.c:193: error: ‘struct des3_state’ has no member named ‘iv1’
make: * [sshcrypto.o] Error 1 解决方法:**
修改sshcrypto.c,内容如下:
#include <sys/types.h>
#include <openssl/ssl.h>
#include <openssl/blowfish.h> ##需要添加的行
#include <openssl/des.h> ##需要添加的行
#include <err.h>
#include <stdio.h>
问题二:
xwd.c:87:29: 错误: X11/Xmu/WinUtil.h:No such file or directorymake: * [xwd.o] 错误 1 解决方法:**
sudo apt-get install libxmu-dev