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

Using header and dynlib pragmas together results in bad codegen #11851

Open
genotrance opened this issue Jul 29, 2019 · 0 comments
Open

Using header and dynlib pragmas together results in bad codegen #11851

genotrance opened this issue Jul 29, 2019 · 0 comments

Comments

@genotrance
Copy link
Contributor

proc test() {.header: "test.h", dynlib: "test.so".}

test()

On compiling with nim (tried versions devel to 0.17.0).

Hint: used config file 'nim.cfg' [Conf]
Hint: system [Processing]
Hint: a [Processing]
CC: a
Error: execution of an external compiler program 'gcc -c  -w  -Inim-0.20.2/lib -o nimcache/a.o nimcache/a.c' failed with exit code: 1

nimcache/a.c:11:10: fatal error: test.so: No such file or directory
 #include "test.so"
          ^~~~~~~~~
compilation terminated.

Nim is using the dynlib value for #include in the generated C instead of the header.

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

No branches or pull requests

3 participants