[06x05] How to Call C Code from Julia | How to Use Julia's printf Macro

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024

Комментарии • 12

  • @jaderbrito74
    @jaderbrito74 2 года назад +4

    I tested it without the comma in the second option and it worked.

    • @doggodotjl
      @doggodotjl  2 года назад +2

      Oops, my mistake. Sorry about that. Nice to know that the ccall macro is a little more flexible than the ccall function!

  • @khalidbinhida
    @khalidbinhida Год назад +1

    SIr excellent tutorial. Thanks for teaching.

    • @doggodotjl
      @doggodotjl  Год назад

      You're welcome! Thanks for watching!

  • @vitriowibisono2875
    @vitriowibisono2875 Год назад +1

    Good tutorial 😊

  • @todobien644
    @todobien644 2 года назад +2

    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)

    • @doggodotjl
      @doggodotjl  2 года назад

      Very cool of you to share your knowledge! I never would've known this. Thanks!

    • @brentdaignault7565
      @brentdaignault7565 Год назад

      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.

  • @javadca
    @javadca Год назад +1

    Thanks for your nice video. Interesting!
    Did you find out, how to call Julia code in C language?

  • @KrishnaBanarasi
    @KrishnaBanarasi 2 месяца назад

    Hey @doggodotjl Which tool do you use to make these tutorials?

  • @mmogib
    @mmogib Год назад

    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?