Compiler doesn't link CoreLibs

Platform: Mac
I cannot compile project code that imports any of the CoreLibs.
For example, consider the following code:

import "CoreLibs/timer"

This produces the error: source/main.lua:1: No such file: CoreLibs/timer
Here's what my .zprofile looks like:

export PATH="$PATH:/Users/Ithaca/Developer/Playdate/PlaydateSDK/bin"
export PLAYDATE_SDK_PATH="[$PATH:/]Users/Ithaca/Developer/Playdate/PlaydateSDK"

Notice the braces around the $PATH:/ - I've tried variants without and with this part included.

My ~/.Playdate/Config/ has been adjusted to move the default directory to a dedicated Playdate directory:

SDKRoot	/Users/Ithaca/Developer/Playdate/PlaydateSDK

I'm at a bit of a loss here, because the pdc executable has been correctly added to my PATH.

Has anyone encountered this issue before?

edit: I tried to compile some of the example projects to the same effect.

Ok, seems like I have improperly defined the PLAYDATE_SDK_PATH variable.
Unlike the PATH variable, a different format must be used.
I adjusted the variable to the following:
export PLAYDATE_SDK_PATH=~/Developer/Playdate/PlaydateSDK

I noted that the following were considered invalid:

  • excluding the ~ from the value
  • wrapping the value in parentheses
  • using an absolute file path (like the path variable)
1 Like

Just replying to this thread because it was the first thing I found when searching the forum for an issue I was having!

I started using the SDK on Windows, and noticed when I moved it to Linux a bunch of stuff was broken in VSCode.

The root cause for me was the Windows OS doesn't care about casing in file names but Linux does care about casing in file names.

Eg. I was getting errors from pdc under Linux about 'Corelibs/animation' cannot be found. Notice the issue there? The Playdate SDK folder is called 'CoreLibs'...

VSCode on Linux (with the Playdate extensions) was also complaining it couldn't find PDX files and source files while debugging. All because of subtle file name case differences that Windows doesn't care about!

Hopefully? This might help somebody else in the future if they wonder why their VSCode Playdate Lua project works fine under Windows...but seems broken under Linux :slight_smile:

1 Like