ImportC: unresolved external symbol
ryuukk_
ryuukk.devv at gmail.com
Tue Jun 14 14:45:21 UTC 2022
On Tuesday, 14 June 2022 at 14:38:17 UTC, Mike Parker wrote:
> On Tuesday, 14 June 2022 at 14:32:50 UTC, ryuukk_ wrote:
>
>>
>> ```
>> nk.obj : error LNK2019: unresolved external symbol test
>> referenced in function _Dmain
>> ```
>>
>> Am i missing something important? (that is a dub project,
>> created with: dub init)
>>
>> DMD: v2.100.0-dirty
>
> This works from the command line:
>
> ```
> dmd -m64 app.d nk.c
> ```
>
> It's possible dub isn't passing the C file to the compiler.
That was the issue!
Adding the file manually in the dub.json solved it!
```
"sourceFiles": [ "source/nk.c" ]
```
That should be easy to fix, i'll fill a PR
Thanks
More information about the Digitalmars-d-learn
mailing list