Search code examples
c++ubuntumcrypt

mcrypt example not working


I am working on ubuntu in c++ code. I wanted to test an exmple with mcrypt from this link: http://linux.die.net/man/3/mcrypt , but whn i do:

gcc test.c -o testt -lmcrypt 

there is no result back. why?

Where am I wrong?

For both examples the result is the same. appreciate!!


Solution

  • gcc test.c -o testt -lmcrypt
    

    gives no result, because there is no error (see UNIX culture[1]).

    Try to run the resulting binary with

    ./testt
    

    to see the output (if any).

    Probe the file, if you will

    file ./testt
    ldd ./testt
    objdump -Ct ./testt
    

    If all is well, you'll get all kinds of information about your file :)


    [1]: in The Art Of Unix Programming: http://www.faqs.org/docs/artu/ch01s06.html