Hi, excellent content ... I am using a M1 (arm64). This may help someone following your tutorials my current Julia version is 1.7.3. So libfilename.c should be compiled using x86_64 architecture by passing following command clang -arch x86_64 -dynamiclib workflow.c -o libworkflow.dylib then, when Julia is open from VsCode it will work, avoiding architecture mis-matched (arm64 vs x86-rosseta)
It's now March and I'm using version 1.8.5 and I think it's running in native ARM64 for the Mac. Do I still have to do this if I write a C function? I thought I was using a native ARM64 version of Julia at this point.
Thank you for your time and effort. I am using Windows 64. I used the Libdl method using Libdl lib = dlopen("example.dll") This error appears could not load library "example.dll" %1 is not a valid Win32 application. Stacktrace: [1] dlopen(s::String, flags::UInt32; throw_error::Bool) Any idea what might be the problem?
I tested it without the comma in the second option and it worked.
Oops, my mistake. Sorry about that. Nice to know that the ccall macro is a little more flexible than the ccall function!
SIr excellent tutorial. Thanks for teaching.
You're welcome! Thanks for watching!
Good tutorial 😊
Thanks!
Hi, excellent content ... I am using a M1 (arm64). This may help someone following your tutorials
my current Julia version is 1.7.3. So libfilename.c should be compiled using x86_64 architecture by passing following command
clang -arch x86_64 -dynamiclib workflow.c -o libworkflow.dylib
then, when Julia is open from VsCode it will work, avoiding architecture mis-matched (arm64 vs x86-rosseta)
Very cool of you to share your knowledge! I never would've known this. Thanks!
It's now March and I'm using version 1.8.5 and I think it's running in native ARM64 for the Mac. Do I still have to do this if I write a C function? I thought I was using a native ARM64 version of Julia at this point.
Thanks for your nice video. Interesting!
Did you find out, how to call Julia code in C language?
Hey @doggodotjl Which tool do you use to make these tutorials?
Thank you for your time and effort.
I am using Windows 64.
I used the Libdl method
using Libdl
lib = dlopen("example.dll")
This error appears
could not load library "example.dll"
%1 is not a valid Win32 application.
Stacktrace:
[1] dlopen(s::String, flags::UInt32; throw_error::Bool)
Any idea what might be the problem?