Re: Trying to call some C code using Extern(C) but got unexpected linker error

2024-06-08 Thread Basile B. via Digitalmars-d-learn
On Saturday, 8 June 2024 at 02:22:00 UTC, Xiaochao Yan wrote: Hi, I am new to D and is experimenting with game development using D and C. I had some problem when trying to recreate the https://dlang.org/spec/importc.html [...] Thanks in advance! on a recent compiler this should work: ```d

Re: Trying to call some C code using Extern(C) but got unexpected linker error

2024-06-07 Thread Steven Schveighoffer via Digitalmars-d-learn
On Saturday, 8 June 2024 at 02:22:00 UTC, Xiaochao Yan wrote: Hi, I am new to D and is experimenting with game development using D and C. I had some problem when trying to recreate the https://dlang.org/spec/importc.html Environment: Windows 11 gcc.exe (i686-posix-dwarf-rev0, Built by MinGW-W6

Trying to call some C code using Extern(C) but got unexpected linker error

2024-06-07 Thread Xiaochao Yan via Digitalmars-d-learn
Hi, I am new to D and is experimenting with game development using D and C. I had some problem when trying to recreate the https://dlang.org/spec/importc.html Environment: Windows 11 gcc.exe (i686-posix-dwarf-rev0, Built by MinGW-W64 project) 8.1.0 Error Message: ``` lld-link: error: undefined