When I tried to install the same modules as yours, VS upgraded to the lastest version, so i have exactly the same version as yours now
Compilation error in VS2019 from "cabbageCopyFile" new opcode
I’m really stumped on this one. I’ve never had this issue, and I’ve set up countless number of Windows builds environments to build Cabbage on. Even the Azure builds all use the latest version of Visual Studio. Perhaps you can take a look at the software installed in the Azure build. They have a comprehensive list of all installed SDKs/API/OSs etc at this page.
After that I’m out of ideas
I found that double clicking on the error shows where it happens !
So, here it is when I include chrono :
I don’t know, but to me it seems like the variable name “_CR” is misunderstood by VS…
Here is what I get with my new Solution blank project :
Seems to be alright here, VS not trying to “expand to 0x0020” which I think is the issue
Some steps closer to the solution I think
We both very much in the dark here. Can you try adding
#include <ctime>
to the filesystem.hpp file?
I don’t actually think this will help at all… sorry…
I just can’t understand why it says chrono
is not a member of std
. It has been since C++14. Maybe open your simple project up alongside Cabbage and go through the C++ language and linker settings, and see if there are any extra flags added to your simple project.
Also, just to double check, you’re using Producer 5.7.4 to generate the VS project right?
I was right
I just replaced in the chrono header all the “_CR” by “_CRfix” because I don’t know why but the compiler seemed to replace the _CR with the hex value 0x0020
Now it works !
So my guess is that VS has something to auto-expand common identifier names and it was activated for some reasons on my project ?
Really it would need some further investigation, for now I’ll stick with that solution and enjoy the CabbageCopyFile opcode
Thanks for all the guidance and time spent on this Rory !
That’s some seriously impressive work!
So I’m guessing that if you have any issues with the cabbageCopyFile
opcode you’ll be able to submit a fix through a github pull request
Thanks
And I found the culprit :
In this csound file, there is a #define _CR 0x0020
So that was why when trying to compile Cabbage which uses Csound I have this issue, and I don’t have it in a blank project !
And sure if I have issues with the opcode I’ll let you know
Edit : I still don’t get why you don’t have this issue too, maybe different Csound versions ?
It might be, what version are you using? I think I was using 6.15 when I wrote that opcode.
[edit] I see it’s also in that latest Csound source. Odd that I don’t get the same issue here…