Hello all,

I'm trying to compile a little sample, which use the class
PolynomialOver<T> with ModularArithmetic as template parameter T.
But I get following error from linker:
/usr/include/cryptopp/polynomi.h:87: undefined reference to
`CryptoPP::PolynomialOver<CryptoPP::ModularArithmetic>::CoefficientCount(CryptoPP::ModularArithmetic
const&) const'
I have installed Crypto++ 5.6.0 library (libcrypto++-dev, libcrypto+
+8, libcrypto++-dbg, libcrypto++-doc) from Ubuntu-Repository. And I
have tried to compile Crypto++ 5.6.1 as shared library on myself, with
same result.

After some days of search, I have no idea more, who is the
troublemaker...

Cheers, Wladimir

I use gcc 4.4.3.

Here is my source-file:

#include <cryptopp/integer.h>
#include <cryptopp/modarith.h>
#include <cryptopp/polynomi.h>
#include <iostream>

using namespace CryptoPP;
using namespace std;

int main(){
        Integer modulus = Integer(311);
        ModularArithmetic modulo = ModularArithmetic(modulus);
        PolynomialOver<ModularArithmetic> polynomial =
PolynomialOver<ModularArithmetic>();

        PolynomialOver<ModularArithmetic>::Ring R = modulo;
        cout<<polynomial.Degree(R)<<"\n";

        return 0;
}

And my makefile:

CC = g++
CFLAGS = -O3 -Wall -g
LIBS = -lcryptopp
LIBINC =  -L /usr/lib -L /usr/local/lib

OBJ = CryptPP.o
OUT = testCryptPP

%.o:    %.cpp
        $(CC) $(CFLAGS) $(INCLUDES) -c $<

cryptoPP: $(OBJ)
        $(CC) -o $(OUT) $(OBJ) $(LIBS) $(LIBINC)

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

Reply via email to