Unable to build, "Error couldn't create folder"

Howdy, I'm on windows 10, I installed the SDK, added the SDK to PATH but I am unable to build.

The error I get back is "error: Couldn't create folder at D:\Game_dev\Playdate_projects\Attempts\Project_2\build\Project_2.pdx"

The command I run is as follows "pdc D:\Game_dev\Playdate_projects\Attempts\Project_2\source D:\Game_dev\Playdate_projects\Attempts\Project_2\build\Project_2"

I am running CMD or Powershell as administrator and the drive D:\ has full access permissions (as Administrator).

I also attempted to use a template made by a community member to build through VS Code GitHub - Whitebrim/VSCode-PlaydateTemplate: This template will help you with autocompletion and running your code in simulator. Windows & Linux. but I assume it hits the same snag.

I assume I am missing something, and its my first time trying to build anything on windows. Please let me know if I am missing something obvious or if you need any more information.

Edit: SDK is version 1.10.0

Could you try building off your C drive and see if that makes a difference?

I copied the SDK and project files to the C drive, attempted to build and got the same error. I also changed the PATH to the SDK on the c drive and got the same error. Did a full restart after changing PATH same error.

Can you build the examples?

It gives me an entirely different error when trying to build example 2020, "error: C:\Users\Penguin\gamedev\PlaydateSDK\Examples\2020\Source\main.lua:3: No such file: CoreLibs/sprites"

I see the sprites file, and when i tried to build example FlippyFish, it could not find the graphic library which I can also see.

Edit: I did a fresh install of the SDK to C:\program files. PDC cannot see the example's Main.lua file while they are in Program Files, but if moved into Users I get the same error where it cannot find CoreLibs/Sprites when attempting to build 2020.

You need to install the SDK into a read and writable location. Program files is read only. Try installing the SDK someplace writable. Also, if it can't find CoreLibs that means the PLAYDATE_SDK_PATH value isn't pointing to the right spot.

1 Like

Ok I can build! Thank you so much for you patience. It seems that any spaces in the directory path make it so that PDC cannot find the files. It doesn't seem to support quotation mark around the file path which seems to be the default for windows commands, and underscores are probably seen as an entirely different file path.

It should support quotes....I'll look into it a bit more tomorrow. Glad you're on your way! :slight_smile:

Quick follow up, do ^ or ` work for you to escape your path? As noted in this article: https://www.howtogeek.com/694949/how-to-escape-spaces-in-file-paths-on-the-windows-command-line/

Double quotes do seem to work. I may have mistyped something before, my test case also contained 3 less spaces in the file path. ^ and ' do not seem to work. This one was probably all me. I really do appreciate the help.