PsyCommando / ppmdu

Combined code for several utilities used to export and import things to and from the "Pokemon Mystery Dungeon : Explorers of" games on the NDS.
Other
45 stars 6 forks source link

Unable to compile with clang on linux #45

Open marius851000 opened 5 years ago

marius851000 commented 5 years ago

Hello. I actually tried to compile a single file on linux, with clang, not using the solution. I've made a virtual environnment with nix-shell -p pugixml -p poco -p clang --command "clang++ statsutil.cpp -I ." It fail, with multiple errors. (clang 7.1.0) Do you thing you can help me to find what doesn't work/correct the code. I've just a basic knowledge of c++, but I'll try to find what doesn't work. error.txt

marius851000 commented 5 years ago

I think I found an error, in ppmdu/pmd2/pmd2.hpp, that is caused because major and minor at the line 61 is interpreted as function.

marius851000 commented 5 years ago

patch.txt Here is the patch of my current work. There is only 2 error remaining.

PsyCommando commented 5 years ago

Well, first did you compile the dependencies? Also, this whole thing is probably going to be a pain to compile on clang/gcc as is. My suggestion would be to cut it down into smaller parts and compile those. VS project files are xml, so you can probably grep out the included file lists in those.

marius851000 commented 5 years ago

Good news: I succesfully compiled a lightweight version of statutils, able to extract string (I have a problem with locale, thrught, so I sypply deleted them where they where useless. Also, there are strange thing like in the text, but that is probably because du to the locale removal). I've manually writed a Makefile for this, and I let my distro compile the dependancy. (I now need to clear some ugly hack. I just thing that VisualStudio only compiled needed function, while gcc compile the full c++ file. So some function that isn't parsable doesn't compile.

PsyCommando commented 5 years ago

Its possible the locale names are wrong for linux. I used a refernce to see how they were called on other OSes.

NyuBlara commented 1 year ago

I'm sorry to necro this issue, but I have just come across this tool, which comprises the only implementation for an SWDL file decoder that I know of, and I am in dire need of that (for reverse-engineering Professor Layton games, some of which also use the SWDL format). Just like @marius851000, I use Linux, but as for me, I have no idea how to use the provided .sln files. Visual Studio cannot be installed on Linux, and as such, I do not know how to properly compile the project as it is. Would you have any recommendations ?

marius851000 commented 1 year ago

So... I’m not sure why I needed to compile it, but I didn’t use it anymore (and instead use SkyTemple). I rewrote the part what most interested me in Rust. However, if you are interested, I think that Capypara, Irdkwia and Adex worked on this file format. I think Capy shared some python script, that I didn’t took a look at. You can find them on the SkyTemple Matrix/Discord server. ( more info on https://skytemple.org ). If that is of interest to you, I’m also working on an improved version of Irdkwia’s patch to play WAV files, althought it doesn’t use SWDL at all.

NyuBlara commented 1 year ago

Thank you very much for this lead ! I'll be sure to contact the people you mentioned.