user2185983
user2185983

Reputation: 41

cppcms - Shared library - Linux

I am trying to use the cppcms framework on Linux(Debian distribution).

I followed the steps described in the Build tutorial on the site and then tried to build the hello world application.

I have successfully compiled the source, but when I try to run it I get the following error:

./hello: error while loading shared libraries: libcppcms.so.1: cannot open shared object file: No such file or directory

I am relatively new to Linux so I had to a little research and come across these things called Shared Libraries. As I understood, these *.so files are exactly what I was needing to create. I also read that the base folder for libraries was /home/usr/lib so I tried copying the file onto that folder, but it didn't help.

I would really appreciate any help that might get me through this problem.

Thank you!

Upvotes: 4

Views: 1267

Answers (3)

Xanewok
Xanewok

Reputation: 21

Also this worked out for me:

export LD_LIBRARY_PATH=/path/to/library/
./hello -c config.js

where "/path/to/library/" is the actual directory where libcppcms.so.1 lives. (mine was /usr/local/lib/)

[got it from http://comments.gmane.org/gmane.comp.lib.cppcms.user/764 ]

Upvotes: 2

liteflier
liteflier

Reputation: 327

I was able to recover from this problem by executing "sudo ldconfig"

Upvotes: 3

Artyom
Artyom

Reputation: 31243

  1. Instead of building CppCMS on your own, install ready to use deb: http://cppcms.com/wikipp/en/page/apt#Apt-Get.Repositories
  2. You can use the troubleshooting guide that the problem you are talking about was mentioned: http://cppcms.com/wikipp/en/page/cppcms_1x_build_troubleshooting#My.sample.application.does.not.find.the.shared.object..code.libcppcms.so..code..when.I.try.to.run.it.

Upvotes: 1

Related Questions