[Botan-devel] linking botan to examples cd2
matkow at vp.pl
matkow at vp.pl
Thu Feb 15 18:39:29 EST 2007
An HTML attachment was scrubbed...
URL: http://www.randombit.net/pipermail/botan-devel/attachments/20070216/1e2d0053/attachment.htm
-------------- next part --------------
I compiled botan library under windows xp in visual c++ 2005 express
with options:
perl configure.pl msvc-windows-x86 --module-set=win32
nmake
Everything was made fine, i've got correct results after "nmake check"
command.
I tried to compile hash.cpp and others under Borland C++ 6 and Visual C++
2005 express by including library in compilator option lib path, by
including it manuali to project and by using #pragma comment.
For BCC after opening hash.cpp project was made automaticly, for VC i made
command line project and then replaced originall main function by code from
hash.cpp. Second try for VC was attaching command line project to .cpp file
but i got the same errors.
I'm not sure if i can use botan library under BOrland compilator if library
was compiled under Visual C++.
For both compilators i got almost the same errors, looks like botan library
isn't included but i put direct path to library in linking options for both
compilators.
I have described all errors in last post on mailing list.
I choosed botan cause it's really simple to use it but i am really suprised
of such problems on the same beginning of using it. First i had problem with
compiling library on Visual C++ 6 but failed.
If You have any idea, please help. I have to make application to my diploma
which will encode disk partitions. Maybe i shoud try to use other
compilator? Any tested, with botan, compilator under windows xp?
Użytkownik Jack Lloyd napisał:
>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 > & __cdecl Botan::operator<<(class std::basic_ostream >
&,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 > & __cdecl Botan::operator>>(class std::basic_istream >
&,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,class std::allocator
> 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,class std::allocator > 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,class std::allocator > 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,class
std::allocator > 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
>
>_______________________________________________
>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