-
Notifications
You must be signed in to change notification settings - Fork 22
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
template/generic instantiation of importc
from here
#118
Comments
Do you have a full error? That is only a small part of the error messages. |
the editor is also pointing out the issue but it only shows "template/generic instantiation of
|
Yeah, the editor shortens the message, sometimes to the point where it is useless.. The actual problem here is at the end:
This happens if the output from Opir is large, which happens very easily. Just throw a couple of zeros on the end of that number and it works fine. |
Thanks for the help. The nim wrapper code is being generated now. I put together a simple test to see if it works, but the compiler is giving "undefined reference" errors for all the symbols im using from the library. im compiling with just honestly im not sure if Im grasping this fully. once the nim wrapper code is generated, do I need to reference the nim file that generated the wrapper? and is an include or import statement used if I want to use the wrapper? the editor is picking up the symbols fine and suggesting autocompletes test_flecs_wrapper:
error message:
beneath the above messages the whole gcc command is printed out, but I excluded it for readability. ill put it down below. |
|
heres the generated code for reference |
You just Those errors are from the C compiler, Futhark doesn't attempt to tell the C compiler how to find the symbols because it can be done in multiple different ways. Typically you'd have a |
wow, it works. I have it running on compilation and it echos everything out as expected. Whats the best way to get the editor to recognize the symbols? I had trouble trying to import the generated nim code directly (the result of passing outputPath to importc). am I better off refactoring the wrapper with my own nim code to obscure all the 'undeclared reference' issues, or is there a way to get editor integration with the futhark code? |
trying to generate a wrapper for flecs (https://github.com/SanderMertens/flecs)
directory looks like this
wrap_flecs.nim is just
nim has an issue with importc line, its giving the error in the title.
The text was updated successfully, but these errors were encountered: