Closed BraveEvidence closed 5 months ago
This is not for asking support questions, what bug in the engine are you experiencing? This is not for any official part of the engine it looks like
@AThousandShips Yes I understand but there is literally no help on all other forums
That doesn't mean this is the appropriate forum, this is for bug reporting, not support, especially not for things that aren't part of the engine
I wish you good luck in finding a solution, but closing this as this isn't the right place for this
Tested versions
Godot 4.2.2
System information
Godot v4.2.2.stable - macOS 14.5.0 - Vulkan (Mobile) - integrated Apple M1 - Apple M1 (8 Threads)
Issue description
I am trying to create an
iOS
plugin forGodot Game Engine
. For that I need to create a static library. I am trying to call myswift
code fromobjective-c++
. Here is the source code but it results in an error when I runscons target=release_debug arch=arm64 plugin=arithematic version=4.0
sayingI have tried asking it on Stackoverflow , Swift Forums and GodotForums but have not received any solution yet
Steps to reproduce
I am trying to call my
swift
code fromarithematic.mm
I have created the
Bridging Header
for myswift
file and included it inarithematic.mm
#import "arithematic-Swift.h"
Now Godot requires scons to build the '.a' file from a static library, to do that we need to run
scons target=release_debug arch=arm64 plugin=arithematic version=4.0
but as soon as I run it I get error sayingNow I also have a SConstruct file which I am guessing is causing the issue
As you can see above it does not know how to compile the
Bridging-Header
andswift
fileHere is what I tried adding in the above
SConstruct
fileIt results in even more errors as I don't have enough experience in scons
If I create a simple
iOS
project withobjective-c++
and removegodot
specific code and just add aswift
file and build the project from Xcode it works perfectly fine so the error is most probably fromSConstruct
file which I have createdI tried adding this path /Users/Desktop/samples/Godot/mytrial/work/plugin/arithematic to CPPPATH in SConstruct but same issue. Also tried /Users/Desktop/samples/Godot/mytrial/work/plugin/arithematic/arithematic-Swift.h and /Users/Desktop/samples/Godot/mytrial/work/plugin/arithematic/arithematic-Bridging-Header.h
Minimal reproduction project (MRP)
https://github.com/BraveEvidence/GodotSampleStatic/tree/main