Author Topic: Compiling phatsig.c under windows  (Read 8140 times)

0 Members and 1 Guest are viewing this topic.

sulaco2k

  • Guest
Compiling phatsig.c under windows
« on: December 09, 2006, 12:28:15 am »
Hi guys, im having trouble compiling phatsig.c on my windows xp box. I am using the correct versions of libtomcrypt/libtommath and have the custom header file in place, yet I am seeing the following errors. Any ideas, thanks

Code: [Select]
1>Linking...
1>Main.obj : error LNK2019: unresolved external symbol _rsa_import referenced in function "void __cdecl init_crypto(void)" (?init_crypto@@YAXXZ)
1>Main.obj : error LNK2019: unresolved external symbol _find_prng referenced in function "void __cdecl init_crypto(void)" (?init_crypto@@YAXXZ)
1>Main.obj : error LNK2019: unresolved external symbol _find_hash referenced in function "void __cdecl init_crypto(void)" (?init_crypto@@YAXXZ)
1>Main.obj : error LNK2019: unresolved external symbol _register_hash referenced in function "void __cdecl init_crypto(void)" (?init_crypto@@YAXXZ)
1>Main.obj : error LNK2001: unresolved external symbol _md5_desc
1>Main.obj : error LNK2001: unresolved external symbol _ltc_mp
1>Main.obj : error LNK2001: unresolved external symbol _ltm_desc
1>Main.obj : error LNK2019: unresolved external symbol _register_prng referenced in function "void __cdecl init_crypto(void)" (?init_crypto@@YAXXZ)
1>Main.obj : error LNK2001: unresolved external symbol _sprng_desc
1>Main.obj : error LNK2019: unresolved external symbol _rsa_exptmod referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol _md5_done referenced in function "void __cdecl get_md5_hash_for_file(char *,unsigned char *)" (?get_md5_hash_for_file@@YAXPADPAE@Z)
1>Main.obj : error LNK2019: unresolved external symbol _md5_process referenced in function "void __cdecl get_md5_hash_for_file(char *,unsigned char *)" (?get_md5_hash_for_file@@YAXPADPAE@Z)
1>Main.obj : error LNK2019: unresolved external symbol _md5_init referenced in function "void __cdecl get_md5_hash_for_file(char *,unsigned char *)" (?get_md5_hash_for_file@@YAXPADPAE@Z)
1>C:\Documents and Settings\Administrator\Desktop\Phatbox\Phatsig\Debug\Phatsig.exe : fatal error LNK1120: 13 unresolved externals

Offline Terry_Kennedy

  • Senior Member
  • Veteran.
  • *****
  • Posts: 253
  • There and back again
Re: Compiling phatsig.c under windows
« Reply #1 on: December 09, 2006, 11:52:52 pm »
Quote
Hi guys, im having trouble compiling phatsig.c on my windows xp box. I am using the correct versions of libtomcrypt/libtommath and have the custom header file in place, yet I am seeing the following errors. Any ideas, thanks

Code: [Select]
1>Linking...
1>Main.obj : error LNK2019: unresolved external symbol _rsa_import referenced in function "void __cdecl init_crypto(void)" (?init_crypto@@YAXXZ)

As a guess, this looks like the linker isn't finding / using your crypto libraries. What sort of command line are you using?

sulaco2k

  • Guest
Re: Compiling phatsig.c under windows
« Reply #2 on: December 11, 2006, 11:58:11 pm »
Hi,

I am compiling the libtommath and libtomcrypt libraries using the supplied makefile.msvc files using the following command:

nmake /Y /f makefile.msvc

I add the libtommath path to the include path to build libtomcrypt.

I am using vc++ 2005 and have included both lib files to the project, and included the header directories.

I think somehow I am building the libraries incorrectly?
« Last Edit: December 11, 2006, 11:58:44 pm by sulaco2k »