running compiled C++ code on other system not working

Need help with C, C++, perl, python, etc?

running compiled C++ code on other system not working

Postby hertelbrian » 2006-10-12 03:07

NEWBIE linux user here...
i wrote some simple C++ code on my regular debian machine, compiled using g++, then copied over to my other machine.. which is running Linux pebble 2.4.31

when i try to run the same program (that works fine on my debian machine) on my pebble machine... i get

error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

i'm guessing i dont have proper libraries installed... how do i install them?

i do a apt-cache seach libstdc++ and finds the file i need (libstdc++3) but then i get about 6 of

W: Couldn't stat source package list http://security.debian.org stable/updates/main Packages (/var/lib/apt/lists/security.debian.org_dists_stable_updates_main_binary-i386_Packag
es) - stat (2 No such file or directory)

each one referencing a different list... PLEASE help

would love to just be able to run my C++ program on my pebble box

thanks in advance
hertelbrian
 
Posts: 13
Joined: 2006-10-05 22:49

Postby lacek » 2006-10-12 10:40

Before you could install anything, you need to run the
Code: Select all
apt-get update
command, to make apt download the package description files. After that, apt-get install should succeed. Note that you probably need libstdc++5, not libstdc++3.
lacek
Moderator Team Member
 
Posts: 769
Joined: 2004-03-11 18:49
Location: Budapest, Hungary

Postby hertelbrian » 2006-10-12 12:51

ran apt-get update and that fixed the list problems, and i found libstdc++6.

ran apt-get install libstdc++6

but i still get the same error...

any ideas?
hertelbrian
 
Posts: 13
Joined: 2006-10-05 22:49

Postby lacek » 2006-10-12 14:18

Does libstdc++6 contains the libstdc++.so.5 file? Check with dpkg -L.
Also, install the "apt-file" package. It behaves like apt-get except that it searches in the contents of the packages. It can come in handy when you're searching for libs.
You can use it like this:
Code: Select all
apt-file update
apt-file search libstdc++.so.5
lacek
Moderator Team Member
 
Posts: 769
Joined: 2004-03-11 18:49
Location: Budapest, Hungary


Return to Programming

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable