Code: Select all
ccpsx -Xo0x80010000 -Wall -O2 main.cpp -o main.cpe
You may want to make sure that there's a cplus_include_path variable in your PSYQ.INI/SN.INI file that points to your SDK's include directory if you experience compiler errors regarding missing header files. You can also specify it as an environment variable but be aware that it may get in the way of your existing C++ toolchains if you have one installed so I recommend just editing the INI file to avoid a conflict.
I haven't really tested which C++ features are supported but it does support class objects and you can define variables anywhere on your code unlike in C where you can only define variables before any procedure. I haven't checked what kind of allocator the compiler uses when dynamically creating and deleting class objects yet and I have a feeling it might be using the buggy malloc implementation in the BIOS.
Obviously, the C++ implementation is pre C++98 so you may want to be aware of that.