[prev in list] [next in list] [prev in thread] [next in thread] 

List:       botan-devel
Subject:    [Botan-devel] Errors during linking examples from
From:       matkow () vp ! pl (matkow at vp ! pl)
Date:       2007-02-14 17:00:59
Message-ID: 20070214170115Z4325449-2174+2 () kps4 ! test ! onet ! pl
[Download RAW message or body]

HTML attachment scrubbed and removed
-------------- next part --------------
Hi,
I just started using botan library. I work on Windows XP SP2 OS. I have
compiled it under MS Visual C++ 2005 express to .lib file. I tried to run
some examples from botan-1.6.1\doc\examples catalgo, but in both
compilators, Borland C++ 6.0 and compilator mentioned before, i got linking
error. I followed instructions included in building.pdf, library and include
paths are set on catalog where is botan library file and \include\botan\
catalog with headers.
Example of error reports during compilation of hash.cpp from doc\examples\
under? Borland C++ 6 :
[C++ Warning] exceptn.h(22): W8058 Cannot create pre-compiled header:
initialized data in header
[Linker Error] Unresolved external
'Botan::LibraryInitializer::deinitialize()' referenced from
D:\DOKUMENTY\PROJEKT\BOTAN-1.6.1\DOC\EXAMPLES\HASH.OBJ
[Linker Error] Unresolved external 'Botan::Pipe::~Pipe()' referenced from
D:\DOKUMENTY\PROJEKT\BOTAN-1.6.1\DOC\EXAMPLES\HASH.OBJI have included file
of all errors for this compilation.
It seems compilator can't find library but path library is set. I don't
where else i can include botan library.
the rest of of linking errors almost the same for all examples
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..
Error report during compilation underVisual C++ 2005 express:

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 tried also to link botan library manualy by '#pragma comment(lib,
"libbotan.lib")' and i got errors:

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'

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?

Please help.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic