Open Thomas008 opened 3 months ago
The problem is that you cannot construct Julia String
s in StaticCompiled code — we would need libjulia for that. That is why there are the workarounds with string macros
so when you write
a = “r"
this is already not static-compileable, even if it’s only a temporary variable.
If you can get a C-style string from the system, that’s fine, and you can convert that to a MallocString or StaticString. If you could get your hands on a Julia string, you could convert that too, but the problem is you cannot make one in the first place
Hi, I try to get copmiled abspath() or pwd(). Therefore it would be great, if it possibe to construct a MallocString or StaticString from a "simple" Julia string. Is this possible?
The following function can be compiled:
using
compile_executable(b, (), "C:\\jul\\staticcompiler")
But as soon I use a local variable for the macro, I get LLVM IR errors when compiling:
The same negative result I get from using the constructors StaticString and MallocString:
In the test suites I don't find an example for constructing a MallocString or StaticString out from a String.
Do you have any ideas to get compiled constucting a MallocString or StaticString from a String?