ImportC: unresolved external symbol
Mike Parker
aldacron at gmail.com
Tue Jun 14 14:38:17 UTC 2022
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.
Assuming everything's configured properly (e.g., both files are
in the same source directory, or the paths are properly set if
they aren't), you should do a verbose build and see what the
compiler command line looks like.
More information about the Digitalmars-d-learn
mailing list