Your message dated Wed, 05 Dec 2012 19:02:08 +0000
with message-id <1354734128.15123.762.camel@julia>
and subject line Re: Bug#695208: libcrypto++-dev: Cannot link a basic program
with the static library
has caused the Debian Bug report #695208,
regarding libcrypto++-dev: Cannot link a basic program with the static library
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
695208: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=695208
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libcrypto++-dev
Version: 5.6.1-6
Severity: normal
Dear Maintainer,
With the following test case (found
http://www.cryptopp.com/wiki/Linux#Source_Code)
----
#include <iostream>
using std::cout;
using std::endl;
#include "cryptopp/integer.h"
using CryptoPP::Integer;
int main( int, char** ) {
Integer i;
cout << "i: " << i << endl;
return 0;
}
----
The static compilation fails to work.
$ g++ /usr/lib/libcryptopp.a -o foo foo.c
/tmp/ccsezyIV.o: In function `main':
foo.c:(.text+0x1b2): undefined reference to `CryptoPP::Integer::Integer()'
foo.c:(.text+0x1d0): undefined reference to
`CryptoPP::operator<<(std::ostream&, CryptoPP::Integer const&)'
/tmp/ccsezyIV.o: In function `CryptoPP::Integer::~Integer()':
foo.c:(.text._ZN8CryptoPP7IntegerD2Ev[_ZN8CryptoPP7IntegerD5Ev]+0x14):
undefined reference to `vtable for CryptoPP::Integer'
/tmp/ccsezyIV.o: In function `CryptoPP::SecBlock<unsigned long long,
CryptoPP::AllocatorWithCleanup<unsigned long long, false> >::~SecBlock()':
foo.c:(.text._ZN8CryptoPP8SecBlockIyNS_20AllocatorWithCleanupIyLb0EEEED2Ev[_ZN8CryptoPP8SecBlockIyNS_20AllocatorWithCleanupIyLb0EEEED5Ev]+0x27):
undefined reference to `CryptoPP::AllocatorWithCleanup<unsigned long long,
false>::deallocate(void*, unsigned long)'
collect2: error: ld returned 1 exit status
Thanks
Sylvestre
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (600, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libcrypto++-dev depends on:
ii libcrypto++9 5.6.1-6
libcrypto++-dev recommends no packages.
libcrypto++-dev suggests no packages.
-- no debconf information
--- End Message ---
--- Begin Message ---
Dear Reporter, Sylvestre,
On Wed, 2012-12-05 at 14:32 +0100, Sylvestre Ledru wrote:
> With the following test case (found
> http://www.cryptopp.com/wiki/Linux#Source_Code)
[...]
> The static compilation fails to work.
> $ g++ /usr/lib/libcryptopp.a -o foo foo.c
Reason is that the compilation options are wrongly ordered. Thus, the
wiki needs to be updated. First set the source and output, then list the
libraries needed to compile the code.
This will work:
g++ -o foo foo.c /usr/lib/libcryptopp.a
Regards,
Laszlo/GCS
signature.asc
Description: This is a digitally signed message part
--- End Message ---