You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling this under Windows Subsystem for Linux (WSL) using Ubuntu, I was able to get this to compile using the following steps:
Install the build tool chain and the dependencies:
sudo apt install build-essential bison flex
Patch nqc/DirList.cpp to replace strlcpy() and strlcat() with strncpy() and strcat() respectively. Usage of sizeof() worked to at least compile bin/nqc. Here's the git diff showing the patched lines. (Note: I'm not sure this is the right way, but it should be close... I think???)
It probably used strncpy and strcat historically before I introduced the "safer" versions, so you should be able to check history. I never really completed the conversion to this API, but ideally this would be handled as a cross-platform compile config rather than reverting the use completely. Esepcially since those two routines are in the project already.
If I get some time I'll take a look at finishing the conversion and either abandoning it or adding the glue to make it work on GNUish platforms.
Hello from the BrickBot org! Linux builds are supported in the codebase there (including a GitHub action set to run on Linux), and NQC-related packages are available for the Slitaz Linux OS. Glad to hear of the good report regarding Ubuntu!
When compiling this under Windows Subsystem for Linux (WSL) using Ubuntu, I was able to get this to compile using the following steps:
sudo apt install build-essential bison flex
nqc/DirList.cpp
to replacestrlcpy()
andstrlcat()
withstrncpy()
andstrcat()
respectively. Usage ofsizeof()
worked to at least compilebin/nqc
. Here's thegit diff
showing the patched lines. (Note: I'm not sure this is the right way, but it should be close... I think???)make
from the root of the repositorybin/nqc
If this sounds acceptable, I'll open a PR for the change.
The text was updated successfully, but these errors were encountered: