First of all, thanks to all developers that contribute(d) their time and knowledge to create this GREAT! project ;)
However, just some days ago I started exploring the PS2 homebrew/indie development world, and I have to say I'm all excited.
Ok, got the PS2 Independence exploit working, downloaded the precompiled win32 version of the ps2dev sdk (from here), compiled one of the samples that come with it and ran it on my PS2 -> FUN !!
Now I'm trying to extend the samples / write my own programs and now to my first question (I tried to search for similar threads, but found no concrete answer, sry)...
Does the ps2dev sdk provide STL support? I saw that there are STL headers included in the package that I downloaded, but are they available for use?
When I tried to make use the the STL string class I got some serious compilation issues...
(sry, I'm a gcc/makefile newb, so I can't get much out of the error log)
My .cc file:
Code: Select all
#include <stdio.h>
#include <string>
int main(int argc, char **argv)
{
printf("START ");
std::string myStr = "myTestString";
printf("EOP ");
return 0;
}
Code: Select all
EE_BIN = cpp-test.elf
EE_OBJS = cpp-test.o
EE_LIBS = -lstdc++ -ldraw -lgraph -lmath3d -lmf -lpacket -ldma
all: $(EE_BIN)
ee-strip --strip-all $(EE_BIN)
clean:
rm -f *.elf *.o *.a
include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal
Code: Select all
C:\ps2dev\ps2sdk\samples\cpp-test>make
ee-g++ -D_EE -O2 -G0 -Wall -IC:/ps2dev/ps2sdk/ee/include -IC:/ps2dev/ps2sdk/common/include -I. -c cpp-test.cc -o cpp-test.o
ee-gcc -mno-crt0 -TC:/ps2dev/ps2sdk/ee/startup/linkfile -LC:/ps2dev/ps2sdk/ee/lib \
-o cpp-test.elf C:/ps2dev/ps2sdk/ee/startup/crt0.o cpp-test.o -lstdc++ -ldraw -lgraph -lmath3d -lmf -lpacket -ldma -lc -lkernel
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(ios.o)(.text+0x178):../../../../libstdc++-v3/libsupc++/new:89: undefined reference to `_impure_ptr'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(ios.o)(.text+0x180):../../../../libstdc++-v3/libsupc++/new:89: undefined reference to `_impure_ptr'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(ios.o)(.text+0x198):../../../../libstdc++-v3/libsupc++/new:89: undefined reference to `_impure_ptr'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(ios.o)(.text+0x1a0):../../../../libstdc++-v3/libsupc++/new:89: undefined reference to `_impure_ptr'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(ios.o)(.text+0x1bc):../../../../libstdc++-v3/libsupc++/new:89: undefined reference to `_impure_ptr'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(ios.o)(.text+0x1c4):../../../../libstdc++-v3/libsupc++/new:89: more undefined references to `_impure_ptr' follow
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(locale.o)(.text+0x1440):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include/bits/basic_string.h:781: undefined reference to `setlocale'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(locale-inst.o)(.gnu.linkonce.t._ZNKSt8time_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE14_M_extract_numERS3_S5_RiiijRKSt5ctypeIcERSt12_Ios_Iostate+0x1dc): In function `__static_initialization_and_destruction_0':
/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include/bits/char_traits.h:123: undefined reference to `atoi'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(locale-inst.o)(.gnu.linkonce.t._ZSt16__convert_from_vIdEiPciPKcT_RKPii+0x34):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include/ee/bits/c++locale.h:49: undefined reference to `setlocale'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(locale-inst.o)(.gnu.linkonce.t._ZSt16__convert_from_vIdEiPciPKcT_RKPii+0x74):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include/bits/locale_facets.tcc:2021: undefined reference to `setlocale'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(locale-inst.o)(.gnu.linkonce.t._ZSt16__convert_from_vIdEiPciPKcT_RKPii+0xa0): In function `__static_initialization_and_destruction_0':
/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include/ee/bits/c++locale.h:67: undefined reference to `setlocale'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(locale-inst.o)(.gnu.linkonce.t._ZSt16__convert_from_vIeEiPciPKcT_RKPii+0x34):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include/ee/bits/c++locale.h:49: undefined reference to `setlocale'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(locale-inst.o)(.gnu.linkonce.t._ZSt16__convert_from_vIeEiPciPKcT_RKPii+0x74):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include/bits/locale_facets.tcc:2021: undefined reference to `setlocale'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(locale-inst.o)(.gnu.linkonce.t._ZSt16__convert_from_vIeEiPciPKcT_RKPii+0xa0):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include/ee/bits/c++locale.h:67: more undefined references to `setlocale' follow
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(stl-inst.o)(.gnu.linkonce.t._ZNSt24__default_alloc_templateILb1ELi0EE8allocateEj+0xf4):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include/bits/stl_alloc.h:109: undefined reference to `__assert'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(stl-inst.o)(.gnu.linkonce.t._ZNSaIcE8allocateEjPKv+0x110):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include/ee/bits/gthr-single.h:231: undefined reference to `__assert'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(collate_members.o)(.text+0xc):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/collate_members.cc:46: undefined reference to `strcoll'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(collate_members.o)(.text+0x40):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/collate_members.cc:54: undefined reference to `strxfrm'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(time_members.o)(.text+0x38):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/time_members.cc:47: undefined reference to `setlocale'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(time_members.o)(.text+0x50):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/time_members.cc:48: undefined reference to `setlocale'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(time_members.o)(.text+0x64):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/time_members.cc:49: undefined reference to `strftime'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(time_members.o)(.text+0x70):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/time_members.cc:50: undefined reference to `setlocale'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(c++locale.o)(.text+0x1d4): In function `void std::__convert_to_v<long long>(char const*, long long&, std::_Ios_Iostate&, int* const&, int)':
/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/c++locale.cc:89: undefined reference to `strtoll'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(c++locale.o)(.text+0x28c): In function `void std::__convert_to_v<unsigned long long>(char const*, unsigned long long&, std::_Ios_Iostate&, int* const&, int)':
/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/c++locale.cc:106: undefined reference to `strtoull'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(c++locale.o)(.text+0x340): In function `void std::__convert_to_v<float>(char const*, float&, std::_Ios_Iostate&, int* const&, int)':
/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/c++locale.cc:123: undefined reference to `setlocale'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(c++locale.o)(.text+0x35c):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/c++locale.cc:124: undefined reference to `setlocale'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(c++locale.o)(.text+0x38c):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/c++locale.cc:133: undefined reference to `finitef'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(c++locale.o)(.text+0x3c4):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/c++locale.cc:150: undefined reference to `setlocale'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(c++locale.o)(.text+0x470): In function `void std::__convert_to_v<double>(char const*, double&, std::_Ios_Iostate&, int* const&, int)':
/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/c++locale.cc:163: undefined reference to `setlocale'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(c++locale.o)(.text+0x48c):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/c++locale.cc:164: undefined reference to `setlocale'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(c++locale.o)(.text+0x4d8):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/c++locale.cc:172: undefined reference to `setlocale'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(c++locale.o)(.text+0x570): In function `void std::__convert_to_v<long double>(char const*, long double&, std::_Ios_Iostate&, int* const&, int)':
/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/c++locale.cc:185: undefined reference to `setlocale'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(c++locale.o)(.text+0x58c):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/c++locale.cc:186: more undefined references to `setlocale' follow
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(ctype.o)(.text+0x0):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include/ee/bits/ctype_noninline.h:38: undefined reference to `_ctype_'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(ctype.o)(.text+0x8):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/include/ee/bits/ctype_noninline.h:38: undefined reference to `_ctype_'
/cygdrive/c/ps2dev/ee/bin/../lib/gcc-lib/ee/3.2.2/../../../../ee/lib/libstdc++.a(basic_file.o)(.text+0x314):/home/loser/toolchain/gcc-3.2.2/build-ee-c++/ee/libstdc++-v3/src/basic_file.cc:100: undefined reference to `setvbuf'
collect2: ld returned 1 exit status
make: *** [cpp-test.elf] Error 1
C:\ps2dev\ps2sdk\samples\cpp-test>
thx & cheers