Pdc consistently producing "error: main.lua or pdex binary required" across platforms on example projects

Hi All,

I'm running into the following error when I attempt to use pdc to build unmodified projects from the Examples folder on the command line: "error: main.lua or pdex binary required". The exact command I'm trying to run, from the "PlaydateSDK/Examples" folder is pdc DrumMachine, which produces the error (as does the same command with all the example projects). Since this is a provided example project that I haven't modified, I thought it would be a good place to start. How do I find out more about why this command isn't successful?

I'm running macOS 15.4, have installed the SDK version 2.6.2, and have the $PLAYDATE_SDK_PATH set properly in my environment.

The identical error occurs on Windows 11 when I attempt the same command.

I've also tried:

  1. Running pdc with the verbose flag (doesn't produce any additional output)
  2. Running pdc DrumMachine game.pdx (produces same error)

Some background

The reason I'm using the pdc command is that I've been having trouble helping my students find a universal structure that works for their projects. We're all new to working with the Playdate SDK, and they are working across Macs and PCs, and so we've settled on VSCode with the Playdate Debug extension, which has mostly worked well, but one student is having a strange issue where VSCode doesn't launch the simulator or produce any debugging information. So I've been progressively getting lower and lower level to try to get a project to compile and have now encountered the same error on macOS and Windows any time I try to use the pdc command with the latest SDK (2.6.2).

Thanks in advance,
Josh

You need to enter the DrumMachine directory and run pdc on the Source directory.

That did it, thank you! I couldn't find clear documentation to answer the question of which build tool assumes what about the structure of my Playdate project folder. But I definitely misread the section of the Inside Playdate documentation that says

pdc requires two arguments: the input (source) directory, and an output directory.

Obviously in hindsight, I was equating the source directory with the project directory. But I was so certain that that was correct that I didn't think to really scrutinize the instructions. Thanks again, I really appreciate it!

1 Like