1

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 ?

Viraj
  • 777
  • 1
  • 13
  • 32

1 Answers1

1
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.

Community
  • 1
  • 1
jww
  • 97,681
  • 90
  • 411
  • 885
  • By Cross platform I meant cross OS(windows and linux). In any case your solution solved the problem and I can now run the executable in almost all linux distributions. Thanks ! – Viraj Dec 02 '14 at 08:34