Building dynamic libs


I am getting a lot of dlopen(...) errors when trying to run an example from the main page without static linking. Obviously it’s because I don’t have those libraries.

So how do I build them? And what is an appropriate location for them?


I recently had the same problem.

On windows you need to copy the ‘chaiscript_stdlib-5.6.0.dll’ into a location where the dynamic library loader can find it. The easiest way to do that is to copy it into the same folder as the executable. This file can be build using the Visual Studio project of the same name.

On Linux/Mac I think the same principle applies, except the file woud be or similar. It appears that this file is built as part of the standard ‘make’ command.

Poll: What's Next For ChaiScript?

The main.cpp uses the environment to build a set of search paths:

And passes them to the constructor:

You could use a similar technique. I could also move that default_search_paths code into a location that’s more useful for everyone. Would anyone see value to that?