ThePhD / sol2

Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
http://sol2.rtfd.io/
MIT License
4.18k stars 515 forks source link

How to use the single header file? #1534

Closed rdutta closed 1 year ago

rdutta commented 1 year ago

The documentation links to here but it's a 404. I also tried grabbing sol.hpp from the release page but then the preprocessor couldn't find config.hpp, so I got that too. Then I realized it wants config.hpp in a relative sol subdir (I'm also wondering what forward.hpp is for).

Right now my directory structure in VS looks like this:

project
 ├── external
 │   └── sol
 │       └── sol.hpp config.hpp forward.hpp
 │   └── luajit
 │       └── lua51.lib luajit.lib
 │       └── lua.hpp lua.h luajit.h etc.

Just trying to figure out how to include the headers and link the libs, assuming I have everything.

edit: Also, this all just works when I use vcpkg, but it seems the sol2 port on there comes with its own lua dependency so it can't be used with luajit, or at least not without some way of overriding it.