Skip to main content
gamedev.net
🔒 Locked

SWIG Lua include path

Started by medevilenemy 1 reply 2k views
Original Post
medevilenemy
medevilenemy
Quick question: Is there a way to tell swig where to look for the lua headers when it is generating wrapper code? I would rather not have to manually change the #include lines every time I regenerate the wrappers.
There was a saying we had in college: Those who walk into the engineering building are never quite the same when they walk out.
owl
owl
You mean the include directives for lua.h, lualib.h etc in the cpp swig generates from the .i file (file_wrap.cxx)?
It expect them to be in the directories you configured your project to look for include files as this cpp file will compile among with your own source files.
In your IDE go to the project "build options" / "compiler search directories" and add the path to the directory containing the Lua header files.
[size="2"]I like the Walrus best.
medevilenemy
medevilenemy
Instead of them being in my default path, I keep them in /lua/lua.h and whatnot

but yeah, just added ...include/lua/ to the list of directories to search. That should do it.
There was a saying we had in college: Those who walk into the engineering building are never quite the same when they walk out.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.