Closed vivekg-ai closed 3 years ago
Looks like you didn’t pass -fobjc-arc
on Windows. Does it make a difference when you add this? You’ll have to use -Xclang -fobjc-arc
with clang-cl
.
With the -fobjc-arc
passing on windows also has the same result.
But got it working by using the msys2 and the below command -
. /c/GNUstep/x64/Debug/share/GNUstep/Makefiles/GNUstep.sh
clang `gnustep-config --objc-flags` -fobjc-arc test.mm `gnustep-config --base-libs` -ldispatch -o test.exe
🎉
Great to hear. I guess it comes down to some difference in the compiler or linker flags then. Would be interesting to know which.
If you'd rather use clang-cl you could dissect the output from gnustep-config --objc-flags
and gnustep-config --base-libs
to figure out what flags you are missing (some of them you'll have to prefix with -Xclang
to pass them to clang-cl, but just try passing them without first and see if clang-cl complains).
Or you can copy the output from the above two commands and use that to call clang (instead of clang-cl) directly in a Windows shell, as MSYS2 is only needed to run gnustep-config.
Also does it work when you remove the @autoreleasepool
?
Also does it work when you remove the
@autoreleasepool
?
Yes it works with arc. Great work! 🙏
Also does it work when you remove the
@autoreleasepool
?Yes it works with arc. Great work! 🙏
Great! Do you mean it works when you add -Xclang -fobjc-arc
, or without it when you remove @autoreleasepool
(which should definitely be supported)?
I assume this is fixed on your end. Please re-open if not.
Great! Do you mean it works when you add -Xclang -fobjc-arc, or without it when you remove @autoreleasepool (which should definitely be supported)?
Yes I had to use -Xclang -fobjc-arc
for ARC. And yes had to remove @autoreleasepool
when I did not pass the flag.
The issue is resolved on my end. Thank you for looking into it! 👍
I build the toolchain as directed in this repositories instructions. After this, I was able to build the toolchain successfully.
Having said that, I am facing the below issue -
test.mm
Compilation environment
and the output is as follows -
on Windows
However, on macOS I compiled it like this
and the output is like -
So any pointers on what might be wrong here?