Need help wih cross compilation setup

Technical discussion on the newly released and hard to find PS3.

Moderators: cheriff, emoon

Post Reply
dXtr
Posts: 3
Joined: Sun Mar 09, 2008 10:17 am

Need help wih cross compilation setup

Post by dXtr »

Hi, I've been reading here on and off now for some time and thought I finally setup my Ubuntu PC so I can start doing some otheros coding of mine own :)

So I've followed the few guides I've found
I think it was this one:
http://mikearthur.co.uk/2007/12/15/ibm- ... ntu-howto/
and tried to install the packages talked about here:
http://forums.ps2dev.org/viewtopic.php?t=9855

Right now my PS3 has psubuntu installed so I can more easily try if my cross compilation environment works.

I wrote a simple test:

Code: Select all

#include <stdio.h>

int main&#40;&#41;
&#123;
	printf&#40;"Hello, world!\n"&#41;;
	return&#40;0&#41;;
&#125;
Compiled with "ppu-gcc Main.cpp"and copied a.out over to the PS3.
And tried to run, everything went OK.
So now I tried the same code but compiled it with ppu-g++ to see if compiling C++ code would work, no problem so I tried running it and all I get in the terminal on the PS3 is something like:
"error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory"

Anyone happend to know what could be wrong?

Thanks.
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

apt-get install libstdc++6
dXtr
Posts: 3
Joined: Sun Mar 09, 2008 10:17 am

Post by dXtr »

Thanks, tried it.. but as I already suspected it was already installed.
Any other ideas?

Thanks.
dXtr
Posts: 3
Joined: Sun Mar 09, 2008 10:17 am

Post by dXtr »

Solved it.
Aprently he was searching for a 64bit version of libstdc++ that wasn't installed. doh! ;)

So all I did was
sudo apt-get install lib64stdc++6
And then it finally worked.
munckfish
Posts: 1
Joined: Fri Apr 18, 2008 10:23 pm
Location: Edinburgh, UK
Contact:

Post by munckfish »

sudo apt-get install gcc-multilib

... should install everything you need to compile/link for 64 bit.
Post Reply