Thread: public key cryptography

  1. #1
    Registered User
    Join Date
    Oct 2016
    Posts
    10

    public key cryptography

    hello
    today i have read the book Cryptography in C and C++ (Michael Welschenbach)
    i tried to use a function from the lib given by Authors , to generate prime number
    the code is:
    Code:
    #include <cstdlib>
    #include <iostream>
    #include "_assert.h"
    #include "flint.h"
    #include "flintpp.h"
    #include "kmul.h"
    #include "ripemd.h"
    
    
    using namespace std;
    
    int main(int argc, char *argv[])
    {
        LINT po;
       po=findprime(20,37);
        cerr << "a = " << po << endl;
    
    
    
        system("PAUSE");
        return EXIT_SUCCESS;
    }

    i use the compiler Dev c++ 4.9.9.2 , but i get that error
    [Linker error] undefined reference to `LINT::LINT()'
    [Linker error] undefined reference to `LINT::LINT(int)'
    [Linker error] undefined reference to `findprime(unsigned short, LINT const&)'
    [Linker error] undefined reference to `LINT:perator=(LINT const&)'
    [Linker error] undefined reference to `operator<<(std:stream&, LINT const&)'
    [Linker error] undefined reference to `purge_l'

    the lib can be downloaded from Extra Materials - ISBN 978-1-893115-95-8

    help me please
    thank you

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    Add the "libflint.a" file to your project's linking settings. It's been years since I used DevC++, so I don't remember how to, but the cmd-line equivalent is "-lflint".
    Devoted my life to programming...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Cryptography
    By freddyvorhees in forum C++ Programming
    Replies: 12
    Last Post: 08-15-2008, 09:03 PM
  2. Cryptography and Compression
    By gogo in forum C++ Programming
    Replies: 1
    Last Post: 10-26-2003, 10:24 AM
  3. Cryptography
    By Vamsianitha in forum C Programming
    Replies: 3
    Last Post: 03-05-2003, 02:31 PM
  4. cryptography
    By tsarena in forum C++ Programming
    Replies: 2
    Last Post: 06-05-2002, 04:14 PM

Tags for this Thread