[Botan-devel] linking botan to examples cd2
Jack Lloyd
lloyd at randombit.net
Thu Feb 15 15:11:02 EST 2007
I really have no idea; I have never seen errors of this sort before.
Borland C++ 6 may or may not work at all (I don't have access to it
and as far as I know it has never been tested; most/all versions of
5.x fail pretty miserably in various ways).
How did you compile the library, and how are you invoking the compiler
when you try to compile the examples?
-Jack
On Wed, Feb 14, 2007 at 05:41:25PM +0100, matkow at vp.pl wrote:
> sorry for splitting my request in? a few messeges but i made more tries to
> link programs with botan library. I hope it will help more to solve my
> problem, i am really a bit hurry..
>
> ?
>
> Last error reports were from Borland C++ 6 compilator (bcc).
>
> Errors from Visual C++ 2005 express i posted in err_hashcpp_VC.txt.
>
> I tried also to link botan library manualy by '#pragma comment(lib,
> "libbotan.lib")' and i got errors posted in err_hashcpp_VC_pc.txt.
>
> I also made a try to link example hash.cpp in Borland C++ 6 with the same
> '#pragma...' and got such error:
>
> [Linker Error] 'D:\DOKUMENTY\PROJEKT\BOTAN-1.6.1\DOC\EXAMPLES\LIBBOTAN.LIB'
> contains invalid OMF record, type 0x21 (possibly COFF)
>
> Any idea what can be wrong?
> Compiling...
> hash2.cpp
> d:\dokumenty\projekt\botan\include\botan\base.h(29) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
> d:\dokumenty\projekt\botan\include\botan\base.h(30) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
> d:\dokumenty\projekt\botan\include\botan\base.h(158) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
> Linking...
> hash2.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall Botan::Pipe::~Pipe(void)" (??1Pipe at Botan@@UAE at XZ) referenced in function _main
> hash2.obj : error LNK2019: unresolved external symbol "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl Botan::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class Botan::Pipe &)" (??6Botan@@YAAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@AAV12 at AAVPipe@0@@Z) referenced in function _main
> hash2.obj : error LNK2019: unresolved external symbol "public: void __thiscall Botan::Pipe::set_default_msg(unsigned int)" (?set_default_msg at Pipe@Botan@@QAEXI at Z) referenced in function _main
> hash2.obj : error LNK2019: unresolved external symbol "public: void __thiscall Botan::Pipe::end_msg(void)" (?end_msg at Pipe@Botan@@QAEXXZ) referenced in function _main
> hash2.obj : error LNK2019: unresolved external symbol "class std::basic_istream<char,struct std::char_traits<char> > & __cdecl Botan::operator>>(class std::basic_istream<char,struct std::char_traits<char> > &,class Botan::Pipe &)" (??5Botan@@YAAAV?$basic_istream at DU?$char_traits at D@std@@@std@@AAV12 at AAVPipe@0@@Z) referenced in function _main
> hash2.obj : error LNK2019: unresolved external symbol "public: void __thiscall Botan::Pipe::start_msg(void)" (?start_msg at Pipe@Botan@@QAEXXZ) referenced in function _main
> hash2.obj : error LNK2019: unresolved external symbol "public: __thiscall Botan::Pipe::Pipe(class Botan::Filter *,class Botan::Filter *,class Botan::Filter *,class Botan::Filter *)" (??0Pipe at Botan@@QAE at PAVFilter@1 at 000@Z) referenced in function _main
> hash2.obj : error LNK2019: unresolved external symbol "public: __thiscall Botan::Hash_Filter::Hash_Filter(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int)" (??0Hash_Filter at Botan@@QAE at ABV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@I at Z) referenced in function _main
> hash2.obj : error LNK2019: unresolved external symbol "public: __thiscall Botan::Hex_Encoder::Hex_Encoder(bool,unsigned int,enum Botan::Hex_Encoder::Case)" (??0Hex_Encoder at Botan@@QAE at _NIW4Case@01@@Z) referenced in function _main
> hash2.obj : error LNK2019: unresolved external symbol "bool __cdecl Botan::have_hash(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?have_hash at Botan@@YA_NABV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@@Z) referenced in function _main
> hash2.obj : error LNK2019: unresolved external symbol "public: static void __cdecl Botan::LibraryInitializer::initialize(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?initialize at LibraryInitializer@Botan@@SAXABV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@@Z) referenced in function "public: __thiscall Botan::LibraryInitializer::LibraryInitializer(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0LibraryInitializer at Botan@@QAE at ABV?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@@Z)
> hash2.obj : error LNK2019: unresolved external symbol "public: static void __cdecl Botan::LibraryInitializer::deinitialize(void)" (?deinitialize at LibraryInitializer@Botan@@SAXXZ) referenced in function "public: __thiscall Botan::LibraryInitializer::~LibraryInitializer(void)" (??1LibraryInitializer at Botan@@QAE at XZ)
> D:\Dokumenty\Projekt\examples\hash2\Debug\hash2.exe : fatal error LNK1120: 12 unresolved externals
> I forgot to say i work on Windows XP SP2 OS.
>
> One more example for compiling hasher.cpp from doc\examples\ and got?warning
> msg:
>
> [C++ Warning] exceptn.h(22): W8058 Cannot create pre-compiled header:
> initialized data in header
>
> ?
>
> the rest of of linking errors almost the same for all examples.
>
> I have included text file of errors
> Deleting intermediate and output files for project 'hash2', configuration 'Debug|Win32'
> Compiling...
> stdafx.cpp
> hash2.cpp
> d:\dokumenty\projekt\botan\include\botan\base.h(29) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
> d:\dokumenty\projekt\botan\include\botan\base.h(30) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
> d:\dokumenty\projekt\botan\include\botan\base.h(158) : warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
> Generating Code...
> Compiling manifest to resources...
> Linking...
> LINK : fatal error LNK1104: cannot open file 'libbotan.lib'
> _______________________________________________
> botan-devel mailing list
> botan-devel at randombit.net
> http://www.randombit.net/mailman/listinfo/botan-devel
More information about the botan-devel
mailing list