Are you having problems compiling your Faust code moving from Windows to MacOS?
-
So I have just spent the last 30 mins remembering my process for this activity : Moving a perfectly compiling set of script nodes that use Faust, that build a DLL, from Windows to MacOS - to build a .dylib
I forget and then have to remember how to do this every time for a new project - so I just made myself a note here on the Mac to remind me, and whilst doing so it occurred to me it might be useful for others so here we go:
When porting your perfectly working Windows project over to your Mac machine you might run into any number of problems, but at least one will be to do with the DLL/dynlib you need in each case.
So when you copy across your Windows Project structure and open it in the Mac version of HISE you will find that you need to build the dynlib on Mac(the Mac version of a DLL), and I find in nearly all cases it fails to build, here's what I do to fix it:
-
Move the entire project to a MacOS hard drive, this is probably a problem with Sonoma onwards as it starts to refuse to build stuff if its resident on a removable drive....
-
Delete all the files in these folders:
{Project}/AdditionalSourceCode/nodes. <-- this will be C++ headers or .cpp files
{Project}/DspNetworks/Binaries. <—everything from here
{Project}/DspNetworks/ThirdParty <-- again C++ code in hereAt this point you can load your project open a scriptnode and compile your MacOS DLL..... if it fails at this point I have no more info. to offer you.... but you have my best wishes and good luck to ya....
-
-
@Lindon Maybe one for the docs
-
@d-healey said in Are you having problems compiling your Faust code moving from Windows to MacOS?:
@Lindon Maybe one for the docs
yeah and Id love to add it but I've asked how to add whole new pages to the docs but got no answer....
-
Nice!
Yeah, it's a pain in the booty. It would be cool if we could just export Faust nodes as external cpp that we can forget about. Or any nodes, for that matter, to prevent issues like this.
-
@Lindon said in Are you having problems compiling your Faust code moving from Windows to MacOS?:
yeah and Id love to add it but I've asked how to add whole new pages to the docs but got no answer....
For that you can just upload a markdown file with your documentation, perhaps the working-with-hise category would be appropriate - https://github.com/christophhart/hise_documentation/tree/master/working-with-hise
-
But doesn't it just overwrite those files when you export your DLL the first time on macOS?
But it's definitely good practice to never move the Binaries folder and treat everything in it as throwaway intermediate build files.
If you're "transferring" your project like a sane person with git, just add both
Binaries
folders (both in the root directory and theDspNetworks/Binaries
to.gitignore
and that should be it.{Project}/DspNetworks/ThirdParty <-- again C++ code in here
This is risky advice because it might contain user generated files, but again, it should overwrite anything that it autogenerated when you export the dll.
-
@Christoph-Hart said in Are you having problems compiling your Faust code moving from Windows to MacOS?:
But doesn't it just overwrite those files when you export your DLL the first time on macOS?
No it doesn't.
But it's definitely good practice to never move the Binaries folder and treat everything in it as throwaway intermediate build files.
And the other folders?
If you're "transferring" your project like a sane person with git, just add both
Binaries
folders (both in the root directory and theDspNetworks/Binaries
to.gitignore
and that should be it.{Project}/DspNetworks/ThirdParty <-- again C++ code in here
This is risky advice because it might contain user generated files, but again, it should overwrite anything that it autogenerated when you export the dll.
..but as I say it doesnt - it just errors out in the compile process....
-
I added a page in the Glossary Section of the docs: Development Recipes
This can be used for little best-practice and workflow tips. So if you've got other examples that you stumble over repeatedly and which solution could be useful to others, please don't hesisitate to add.
All best,
Dominik -