Search code examples
c++eclipseshared-librariesubuntu-14.04crypto++

Libcrypto++ shared libraries missing


I somehow managed to install the libcrypto++ library on Ubuntu 14.04. Now, I have a project in Eclipse CDT which I would like to create an executable of and make it independently run on other linux flavors and windows(being ambitious here).

I am using the executable in the Debug folder of eclipse to run my program.

I get the following error when I run try to execute the program on any other machine

error while loading shared libraries: libcrypto++.so

Can anyone tell me:

  1. How I can get rid of this error ?

  2. How can I create a cross platform executable in the Eclipse IDE ?


Solution

  • I get the following error when I run try to execute the program on any other machine
    
    error while loading shared libraries: libcrypto++.so
    
    How I can get rid of this error ?
    

    Eclipse is a pain in the butt at times. Effectively, it tries to use the shared object (libcrypto++.so) whether you want it or not.

    To work around this, specify libcrypptopp.a as an additional object file. Archives are a collection of object files, so they can be used interchangeably with an object file.

    You enter it at Other Objects under C/C++ Build -> Settings -> C++ Linker -> Miscellaneous. You can see a screen capture of where to enter libcrypptopp.a in this Stack Overflow answer.

    Do not list Crypto++ in the library sections of eclipse.


    How can I create a cross platform executable in the Eclipse IDE ?

    Not sure what you mean, but you will need to compile Crypto++ for each platform you plan on supporting. That includes x86, x64, ARM, ARMv7 and MIPS.