Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ryuukk opened this issue Jun 14, 2022 · 1 comment
Labels

Comments

@ryuukk
Copy link
Contributor

ryuukk commented Jun 14, 2022

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

@HuskyNator
Copy link

Is this still a bug following the aforementioned merger?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants