- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在 CONTIKI 操作系统和 COOJA 模拟器中进行加密,我厌倦了使用库 libtomcrypt。我将库包含到 CONTIKI 文件夹中,但是当我厌倦调用 rsa_make_key 函数时,它给了我这个错误。提前致谢,希望尽快收到你们的来信。
> make TARGET=cooja clean
rm -f *~ *core core *.srec \
*.lst *.map \
*.cprg *.bin *.data contiki*.a *.firmware core-labels.S *.ihex *.ini \
*.ce *.co
rm -rf
rm -rf obj_cooja
> make sender-node.cooja TARGET=cooja
CC sender-node.c
In file included from ../../../core/./../apps/libtomcrypt/src/headers/tomcrypt.h:80:0,
from sender-node.c:43:
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:4:4: error: redeclaration of enumerator 'PK_PUBLIC'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:4:4: note: previous definition of 'PK_PUBLIC' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:5:4: error: redeclaration of enumerator 'PK_PRIVATE'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:5:4: note: previous definition of 'PK_PRIVATE' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:16:4: error: redeclaration of enumerator 'PKA_RSA'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:16:4: note: previous definition of 'PKA_RSA' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:17:4: error: redeclaration of enumerator 'PKA_DSA'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:17:4: note: previous definition of 'PKA_DSA' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:20:16: error: redefinition of 'struct Oid'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:20:16: note: originally defined here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:24:3: error: conflicting types for 'oid_st'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:24:3: note: previous declaration of 'oid_st' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:26:5: error: conflicting types for 'pk_get_oid'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:26:5: note: previous declaration of 'pk_get_oid' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:32:16: error: redefinition of 'struct Rsa_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:32:16: note: originally defined here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:51:3: error: conflicting types for 'rsa_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:51:3: note: previous declaration of 'rsa_key' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:53:5: error: conflicting types for 'rsa_make_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:53:5: note: previous declaration of 'rsa_make_key' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:55:5: error: conflicting types for 'rsa_get_size'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:55:5: note: previous declaration of 'rsa_get_size' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:57:5: error: conflicting types for 'rsa_exptmod'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:57:5: note: previous declaration of 'rsa_exptmod' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:61:6: error: conflicting types for 'rsa_free'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:61:6: note: previous declaration of 'rsa_free' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:80:5: error: conflicting types for 'rsa_encrypt_key_ex'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:80:5: note: previous declaration of 'rsa_encrypt_key_ex' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:85:5: error: conflicting types for 'rsa_decrypt_key_ex'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:85:5: note: previous declaration of 'rsa_decrypt_key_ex' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:91:5: error: conflicting types for 'rsa_sign_hash_ex'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:91:5: note: previous declaration of 'rsa_sign_hash_ex' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:98:5: error: conflicting types for 'rsa_verify_hash_ex'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:98:5: note: previous declaration of 'rsa_verify_hash_ex' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:104:5: error: conflicting types for 'rsa_sign_saltlen_get_max_ex'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:104:5: note: previous declaration of 'rsa_sign_saltlen_get_max_ex' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:107:5: error: conflicting types for 'rsa_export'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:107:5: note: previous declaration of 'rsa_export' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:108:5: error: conflicting types for 'rsa_import'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:108:5: note: previous declaration of 'rsa_import' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:170:16: error: redefinition of 'struct Dh_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:170:16: note: originally defined here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:174:3: error: conflicting types for 'dh_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:174:3: note: previous declaration of 'dh_key' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:178:5: error: conflicting types for 'dh_get_size'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:178:5: note: previous declaration of 'dh_get_size' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:180:5: error: conflicting types for 'dh_make_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:180:5: note: previous declaration of 'dh_make_key' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:181:6: error: conflicting types for 'dh_free'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:181:6: note: previous declaration of 'dh_free' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:183:5: error: conflicting types for 'dh_export'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:183:5: note: previous declaration of 'dh_export' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:184:5: error: conflicting types for 'dh_import'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:184:5: note: previous declaration of 'dh_import' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:186:5: error: conflicting types for 'dh_shared_secret'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:186:5: note: previous declaration of 'dh_shared_secret' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:189:5: error: conflicting types for 'dh_encrypt_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:189:5: note: previous declaration of 'dh_encrypt_key' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:194:5: error: conflicting types for 'dh_decrypt_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:194:5: note: previous declaration of 'dh_decrypt_key' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:198:5: error: conflicting types for 'dh_sign_hash'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:198:5: note: previous declaration of 'dh_sign_hash' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:202:5: error: conflicting types for 'dh_verify_hash'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:202:5: note: previous declaration of 'dh_verify_hash' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:241:3: error: conflicting types for 'ltc_ecc_set_type'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:241:3: note: previous declaration of 'ltc_ecc_set_type' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:253:3: error: conflicting types for 'ecc_point'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:253:3: note: previous declaration of 'ecc_point' was here
In file included from ../../../core/./../apps/libtomcrypt/src/headers/tomcrypt.h:80:0,
from sender-node.c:43:
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:271:3: error: conflicting types for 'ecc_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:271:3: note: previous declaration of 'ecc_key' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:274:31: error: conflicting types for 'ltc_ecc_sets'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:274:31: note: previous declaration of 'ltc_ecc_sets' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:278:6: error: conflicting types for 'ecc_get_size'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:278:6: note: previous declaration of 'ecc_get_size' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:280:6: error: conflicting types for 'ecc_make_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:280:6: note: previous declaration of 'ecc_make_key' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:281:6: error: conflicting types for 'ecc_make_key_ex'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:281:6: note: previous declaration of 'ecc_make_key_ex' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:282:6: error: conflicting types for 'ecc_free'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:282:6: note: previous declaration of 'ecc_free' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:284:6: error: conflicting types for 'ecc_export'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:284:6: note: previous declaration of 'ecc_export' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:285:6: error: conflicting types for 'ecc_import'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:285:6: note: previous declaration of 'ecc_import' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:286:6: error: conflicting types for 'ecc_import_ex'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:286:6: note: previous declaration of 'ecc_import_ex' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:288:5: error: conflicting types for 'ecc_ansi_x963_export'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:288:5: note: previous declaration of 'ecc_ansi_x963_export' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:289:5: error: conflicting types for 'ecc_ansi_x963_import'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:289:5: note: previous declaration of 'ecc_ansi_x963_import' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:290:5: error: conflicting types for 'ecc_ansi_x963_import_ex'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:290:5: note: previous declaration of 'ecc_ansi_x963_import_ex' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:292:6: error: conflicting types for 'ecc_shared_secret'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:292:6: note: previous declaration of 'ecc_shared_secret' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:295:6: error: conflicting types for 'ecc_encrypt_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:295:6: note: previous declaration of 'ecc_encrypt_key' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:300:6: error: conflicting types for 'ecc_decrypt_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:300:6: note: previous declaration of 'ecc_decrypt_key' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:304:5: error: conflicting types for 'ecc_sign_hash_raw'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:304:5: note: previous declaration of 'ecc_sign_hash_raw' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:308:6: error: conflicting types for 'ecc_sign_hash'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:308:6: note: previous declaration of 'ecc_sign_hash' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:312:5: error: conflicting types for 'ecc_verify_hash_raw'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:312:5: note: previous declaration of 'ecc_verify_hash_raw' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:316:6: error: conflicting types for 'ecc_verify_hash'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:316:6: note: previous declaration of 'ecc_verify_hash' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:321:12: error: conflicting types for 'ltc_ecc_new_point'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:321:12: note: previous declaration of 'ltc_ecc_new_point' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:322:12: error: conflicting types for 'ltc_ecc_del_point'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:322:12: note: previous declaration of 'ltc_ecc_del_point' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:328:5: error: conflicting types for 'ltc_ecc_projective_dbl_point'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:328:5: note: previous declaration of 'ltc_ecc_projective_dbl_point' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:331:5: error: conflicting types for 'ltc_ecc_projective_add_point'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:331:5: note: previous declaration of 'ltc_ecc_projective_add_point' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:349:5: error: conflicting types for 'ltc_ecc_mulmod'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:349:5: note: previous declaration of 'ltc_ecc_mulmod' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:353:5: error: conflicting types for 'ltc_ecc_mul2add'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:353:5: note: previous declaration of 'ltc_ecc_mul2add' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:369:5: error: conflicting types for 'ltc_ecc_map'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:369:5: note: previous declaration of 'ltc_ecc_map' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:403:3: error: conflicting types for 'dsa_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:403:3: note: previous declaration of 'dsa_key' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:405:5: error: conflicting types for 'dsa_make_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:405:5: note: previous declaration of 'dsa_make_key' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:406:6: error: conflicting types for 'dsa_free'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:406:6: note: previous declaration of 'dsa_free' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:408:5: error: conflicting types for 'dsa_sign_hash_raw'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:408:5: note: previous declaration of 'dsa_sign_hash_raw' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:412:5: error: conflicting types for 'dsa_sign_hash'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:412:5: note: previous declaration of 'dsa_sign_hash' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:416:5: error: conflicting types for 'dsa_verify_hash_raw'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:416:5: note: previous declaration of 'dsa_verify_hash_raw' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:420:5: error: conflicting types for 'dsa_verify_hash'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:420:5: note: previous declaration of 'dsa_verify_hash' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:424:5: error: conflicting types for 'dsa_encrypt_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:424:5: note: previous declaration of 'dsa_encrypt_key' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:429:5: error: conflicting types for 'dsa_decrypt_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:429:5: note: previous declaration of 'dsa_decrypt_key' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:433:5: error: conflicting types for 'dsa_import'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:433:5: note: previous declaration of 'dsa_import' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:434:5: error: conflicting types for 'dsa_export'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:434:5: note: previous declaration of 'dsa_export' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:435:5: error: conflicting types for 'dsa_verify_key'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:435:5: note: previous declaration of 'dsa_verify_key' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:437:5: error: conflicting types for 'dsa_shared_secret'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:437:5: note: previous declaration of 'dsa_shared_secret' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:445:14: error: nested redefinition of 'enum ltc_asn1_type_'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:445:14: error: redeclaration of 'enum ltc_asn1_type_'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:445:14: note: originally defined here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:447:2: error: redeclaration of enumerator 'LTC_ASN1_EOL'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:447:2: note: previous definition of 'LTC_ASN1_EOL' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:448:2: error: redeclaration of enumerator 'LTC_ASN1_BOOLEAN'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:448:2: note: previous definition of 'LTC_ASN1_BOOLEAN' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:449:2: error: redeclaration of enumerator 'LTC_ASN1_INTEGER'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:449:2: note: previous definition of 'LTC_ASN1_INTEGER' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:450:2: error: redeclaration of enumerator 'LTC_ASN1_SHORT_INTEGER'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:450:2: note: previous definition of 'LTC_ASN1_SHORT_INTEGER' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:451:2: error: redeclaration of enumerator 'LTC_ASN1_BIT_STRING'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:451:2: note: previous definition of 'LTC_ASN1_BIT_STRING' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:453:2: error: redeclaration of enumerator 'LTC_ASN1_OCTET_STRING'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:453:2: note: previous definition of 'LTC_ASN1_OCTET_STRING' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:454:2: error: redeclaration of enumerator 'LTC_ASN1_NULL'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:454:2: note: previous definition of 'LTC_ASN1_NULL' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:455:2: error: redeclaration of enumerator 'LTC_ASN1_OBJECT_IDENTIFIER'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:455:2: note: previous definition of 'LTC_ASN1_OBJECT_IDENTIFIER' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:456:2: error: redeclaration of enumerator 'LTC_ASN1_IA5_STRING'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:456:2: note: previous definition of 'LTC_ASN1_IA5_STRING' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:457:2: error: redeclaration of enumerator 'LTC_ASN1_PRINTABLE_STRING'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:457:2: note: previous definition of 'LTC_ASN1_PRINTABLE_STRING' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:459:2: error: redeclaration of enumerator 'LTC_ASN1_UTF8_STRING'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:459:2: note: previous definition of 'LTC_ASN1_UTF8_STRING' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:460:2: error: redeclaration of enumerator 'LTC_ASN1_UTCTIME'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:460:2: note: previous definition of 'LTC_ASN1_UTCTIME' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:461:2: error: redeclaration of enumerator 'LTC_ASN1_CHOICE'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:461:2: note: previous definition of 'LTC_ASN1_CHOICE' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:462:2: error: redeclaration of enumerator 'LTC_ASN1_SEQUENCE'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:462:2: note: previous definition of 'LTC_ASN1_SEQUENCE' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:463:2: error: redeclaration of enumerator 'LTC_ASN1_SET'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:463:2: note: previous definition of 'LTC_ASN1_SET' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:465:2: error: redeclaration of enumerator 'LTC_ASN1_SETOF'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:465:2: note: previous definition of 'LTC_ASN1_SETOF' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:466:2: error: redeclaration of enumerator 'LTC_ASN1_RAW_BIT_STRING'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:466:2: note: previous definition of 'LTC_ASN1_RAW_BIT_STRING' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:467:2: error: redeclaration of enumerator 'LTC_ASN1_TELETEX_STRING'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:467:2: note: previous definition of 'LTC_ASN1_TELETEX_STRING' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:468:2: error: redeclaration of enumerator 'LTC_ASN1_CONSTRUCTED'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:468:2: note: previous definition of 'LTC_ASN1_CONSTRUCTED' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:469:2: error: redeclaration of enumerator 'LTC_ASN1_CONTEXT_SPECIFIC'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:469:2: note: previous definition of 'LTC_ASN1_CONTEXT_SPECIFIC' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:473:16: error: redefinition of 'struct ltc_asn1_list_'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:473:16: note: originally defined here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:484:3: error: conflicting types for 'ltc_asn1_list'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:484:3: note: previous declaration of 'ltc_asn1_list' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:497:5: error: conflicting types for 'der_encode_sequence_ex'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:497:5: note: previous declaration of 'der_encode_sequence_ex' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:502:5: error: conflicting types for 'der_decode_sequence_ex'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:502:5: note: previous declaration of 'der_decode_sequence_ex' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:507:5: error: conflicting types for 'der_length_sequence'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:507:5: note: previous declaration of 'der_length_sequence' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:515:5: error: conflicting types for 'der_decode_subject_public_key_info'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:515:5: note: previous declaration of 'der_decode_subject_public_key_info' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:522:5: error: conflicting types for 'der_encode_set'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:522:5: note: previous declaration of 'der_encode_set' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:525:5: error: conflicting types for 'der_encode_setof'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:525:5: note: previous declaration of 'der_encode_setof' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:533:6: error: conflicting types for 'der_decode_sequence_flexi'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:533:6: note: previous declaration of 'der_decode_sequence_flexi' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:535:6: error: conflicting types for 'der_sequence_free'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:535:6: note: previous declaration of 'der_sequence_free' was here
In file included from ../../../core/./../apps/libtomcrypt/src/headers/tomcrypt.h:80:0,
from sender-node.c:43:
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:624:5: error: conflicting types for 'der_decode_choice'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:624:5: note: previous declaration of 'der_decode_choice' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:638:3: error: conflicting types for 'ltc_utctime'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:638:3: note: previous declaration of 'ltc_utctime' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:640:5: error: conflicting types for 'der_encode_utctime'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:640:5: note: previous declaration of 'der_encode_utctime' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:643:5: error: conflicting types for 'der_decode_utctime'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:643:5: note: previous declaration of 'der_decode_utctime' was here
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:646:5: error: conflicting types for 'der_length_utctime'
../../../core/./../apps/libtomcrypt/src/headers/tomcrypt_pk.h:646:5: note: previous declaration of 'der_length_utctime' was here
make: *** [sender-node.co] Error 1
Process returned error code 2
这是我厌倦调用函数 prng_state* prng 的部分;
prng_state* prng;
rsa_key* key;
int result = rsa_make_key(
prng,
0,
rsa_get_size(key),
65537,
key);
我还在代码中包含了库的 tomcrypt.h
#include "../apps/libtomcrypt/src/headers/tomcrypt.h"
最佳答案
我假设 tomcrypt.h
或 `tomcrypt_pk.h"文件被多次包含,因此同样的东西被定义了多次。
为了验证这是否是原因,我将分别在 tomcrypt.h
的顶部和末尾添加以下行。
在顶部:
#ifndef _TOMCRYPT_H
#define _TOMCRYPT_H
最后:
#endif
对 tomcat_pk.h
重复此操作:
#ifndef _TOMCRYPT_PK_H
#define _TOMCRYPT_PK_H
...
#endif
如果代码随后编译,那么问题是同一个头文件在编译单元中被多次包含(直接或间接)也可能适用于其他头文件,例如tomcrypt_pk.h
。因此,您还可以检查是否直接在您的 .c
文件中包含例如 tomcrypt_pk.h
,而另一个头文件(例如 tomcrypt.h
) 也包括这个文件。
如果是这种情况,您有两种主要的方法来解决问题:(1) 删除不必要的包含语句,(2) 保护包含文件不被多次解释,例如通过用 #ifndef - #define
语句包围定义。与选项 (2) 相比,我更喜欢选项 (1)。
请注意 - 正如 StoryTeller 所指出的 - 不鼓励编辑第三方库文件,甚至不鼓励引入此类 #ifndef-#define
语句。如果您无法按照选项 (1) 进行操作,您仍然可以在文件中包含相应的 #include
语句,例如
// in myFile.c:
#ifndef _TOMCRYPT_PK_H
#define _TOMCRYPT_PH_H
#include "tomcrypt_pk.h"
#endif
关于c - 错误 : redeclaration of enumerator for contiki os libtomcrypt library,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41713108/
挖掘这个,这是一个很酷的 Enumerator(惰性序列)从 1 到(Ruby 可以表示的最大 Float): 1.9.3-p327 :014 > e = (1..Float::INFINITY).e
这个问题在这里已经有了答案: Swift 2.0 : 'enumerate' is unavailable: call the 'enumerate()' method on the sequenc
我不确定这是否特定于 ML.NET,但它确实发生在 ML.NET 的上下文中。 我正在使用 ML.NET 对一些图像进行分类。我意识到,无论我是否对结果 IEnumerable 调用 .ToArray
在Collections Framework中,我们有Iterator和ListIterator接口(interface),它们用于迭代数据结构。它们提供了完整的迭代功能。但我想知道为什么 JDK 在
我正在使用 playframework 的异步 I/O 库,它使用 Iteratees 和 Enumerators。我现在有一个 Iterator[T] 作为数据接收器(为简单起见,说它是一个 Ite
更新: private final java.util.Properties tilesPropertyMap = new Properties(); private class Delegati
所以,我有一个像这样的字符串 \begin{enumerate} \item My first item \item My second item \end{enumerate} 并且需要使用正则表达
我有一个数组a = [1, 2, 3, 4, 5] 如果我在数组中有一个元素,我可以通过a[0].next 有没有一种方法可以用来找到前一个元素a[1].previous 或 a[1].before
是否Enumerable#group_by保留每个值内的原始顺序?当我得到这个时: [1, 2, 3, 4, 5].group_by{|i| i % 2} # => {1=>[1, 3, 5], 0=
我已经基于现有的NativeHashMap.Enumerator和UnSafeHashMap.Enumerator结构编写了枚举数,它们以猝发方式工作,但在尝试为嵌套的非托管结构组合枚举数时遇到了麻烦
在 C# 中使用迭代器创建 Enumerable 或 Enumerator 有什么区别?我知道迭代器用于创建实现 Enumerable 或 Enumerator 的私有(private)类... 哪种
自 C++11 过渡以来,GCC 输出警告“条件表达式中的枚举和非枚举类型”。我想了解此警告背后的原因。比较枚举常量有什么危险? 很明显我们可以通过以下方式摆脱这个警告 -Wno-enum-compa
我在 LINQ 查询的性能方面遇到问题,因此我创建了一个简化的小示例来演示下面的问题。该代码采用一个随机的小整数列表,并返回分成几个较小列表的列表,每个列表总计 10 个或更少。 问题是(正如我所写的
我一直对 Enumerable#all? 和 Enumerable#each 的用例感到困惑。例如 ['.txt', '-hello.txt'].all? do |suffix| pu
Enumerable documentation没有明确说明 each 是 each_entry 的别名,但是 each_entry 的描述与我对 each 1 [1, 2] nil Foo.new.
在这段代码中,我创建了一个字符串数组“1”到“10000”: array_of_strings = (1..10000).collect {|i| String(i)} Ruby Core API 是
我正在为我的代码寻求一些帮助,如下所示: for file in file_name : if os.path.isfile(file): for line_number, l
刚刚下载了 Xcode 7 Beta,此错误出现在 enumerate 关键字上。 for (index, string) in enumerate(mySwiftStringArray) { } 谁
刚刚下载了 Xcode 7 Beta,这个错误出现在 enumerate 关键字上。 for (index, string) in enumerate(mySwiftStringArray) { }
为了清楚起见,假设我们有学生和类(class),这是多对多的关系。 我有一个字典,其中键是学生 ID,而 Enumerable 是一个类的集合(假设我们只有 id ),我想将其恢复为 classId、
我是一名优秀的程序员,十分优秀!