You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
extern int puts(const char*);
void foo(void){ puts(“foo”); }
dmd main.d fails due to undefined reference to foo (as a/foo.c is not compiled to object code). However, dmd main.d a/foo.c also fails with the error “module foo from file a/foo.c must be imported with ‘import foo;’”. In a D file you would declare “module a.foo;”, but there is no way to do that with ImportC.
The text was updated successfully, but these errors were encountered:
dave287091 reported this on 2024-07-20T22:47:18Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=24668
Description
Consider the following source code layout:
with files
main.d:
a/foo.c:
dmd main.d
fails due to undefined reference to foo (as a/foo.c is not compiled to object code). However,dmd main.d a/foo.c
also fails with the error “modulefoo
from file a/foo.c must be imported with ‘import foo;’”. In a D file you would declare “module a.foo;”, but there is no way to do that with ImportC.The text was updated successfully, but these errors were encountered: