C libraries with single header AND source file #169
-
Hi, I am trying to develop, within So far I have, amongst others, the following section in the bindings' nldecl.prepend_code = [=[
##[[
cinclude 'argtable3.h'
if not ARGTABLE_NO_IMPL then
cinclude 'argtable3.c'
end
]]
]=] There are, however, a few things I don't understand: How am I supposed to handle the C files (both I have placed I have tried the
What is the recommended way of adding local C files to a project? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Maybe you wanted to add In short if you have all 4 files |
Beta Was this translation helpful? Give feedback.
-
Hi Eduardo Yes, as long as files are all in the same directory (like in the My questions were more about what to do in a real project where I want to organize files, modules and libs in different folders. My original idea was to have this structure:
And this is what didn't work using the I have also tried these two approaches that both worked using
and
|
Beta Was this translation helpful? Give feedback.
-
In that case, use the following:
This should fix the command line error you were getting, notice the |
Beta Was this translation helpful? Give feedback.
-
It worked like a charm. Thanks a lot! |
Beta Was this translation helpful? Give feedback.
In that case, use the following:
This should fix the command line error you were getting, notice the
=
added.