(Linux) Help with compiling

Hi y'all, I need help. I developed a game when I used Windows, but I switched to Ubuntu a longer time ago, and I realized I won't be able to compile the way I did before. The pdc command only works when I run the executable for it, which isn't really a program. However, if I run this command:

/home/gungu/PlaydateSDK-2.0.1/bin/pdc "/home/gungu/PlaydateSDK-2.0.1"

it gives me this error:

error: main.lua or pdex binary required

It also happens when I run it from the "Source" folder

My files look like this:
(the command was ran from the top folder)

Does anyone know how I could fix this?

I think you may just be missing the envirnoment variables. If you haven't already, check out section 3.3 of Inside Playdate.

My laptop runs Ubuntu 22.04, and I just added the following two lines to the end of my .profile:

export PLAYDATE_SDK_PATH=$HOME/PlaydateSDK-2.0.1

Then either reboot or run source ~/.profile to ensure the new .profile is run.

Once the environment is right, you should be able to just run pdc path/to/source path/to/output.pdx.

@brakels is on the right track, you need to set your playdate sdk path env value. Furthermore, the command you've listed shows you're trying to compile the entire SDK folder, not a single project. It may be helpful to brush up on the pdc arguments in the docs or by running pdc with no args from the CI.

Thanks everyone! I added the first enviroment variable, but not the second, so I did that, and I'm just about to reboot.

Thank you so much. The pdc command finally works instead of running the binaries, and compiling worked too!