dub icon indicating copy to clipboard operation
dub copied to clipboard

ImportC: .c files are not passed to compiler, results in unresoved external symbol

Open ryuukk opened this issue 3 years ago • 1 comments
trafficstars

System information

  • dub: 1.29.0
  • windows x64 / arch linux
  • dmd: v2.100.0

Bug Description

When compiling a project with a .c file, dub doesn't feed it to the compiler, wich results then in compile error, unresolved external symbol

How to reproduce?

nk.c

int test(void)
{
    return 1;
}

app.d

import std.stdio;
import nk = nk;

void main()
{
    if (nk.test() != 0)
    {
	    writeln("test");
    }
}

nk.obj : error LNK2019: unresolved external symbol test referenced in function _Dmain

Expected Behavior

It should feed to the compiler: dmd -m64 app.d nk.c and properly compile

ryuukk avatar Jun 14 '22 14:06 ryuukk

Is this still a bug following the aforementioned merger?

HuskyNator avatar Jan 05 '24 02:01 HuskyNator