Hey all,
So I've been trying to use allejo's really handy plugin, the bztoolkit, which can be found here: https://github.com/allejo/bztoolkit
I've been having a few issues with getting it working, and I think it stems from some misunderstanding I have with referencing .h files.
In allejo's documentation, they say to use the plugin by #include bztoolkit/bzToolkitAPI.h. However, this does not work, and I instead have to do the entire file extension: /home/usr/Documents//bzflag/plugins/bztoolkit/bzToolkitAPI.h. Is this normal? Because I don't have to do the same when including "bzfsAPI.h", "plugin_utils.h", or any of the built-in ones.
Anyway, this *does* compile, however when attempting to start the sever, it says that my plugin cannot be loaded. I'm guessing this is due to including bzToolkitAPI.h, because as soon as I remove the #include, everything works.
Any idea how to fix this? Sorry if this question is a little muddled.
Thanks,
Grue
Plugin include custom header file
Re: Plugin include custom header file
From what I've learned working with other plugins that use bztoolkit, its supposed to be in a sub directory of the plugin that uses it.
For example `bzflag/plugins/sample_plugin/bztoolkit...` and then you use `#include bztoolkit/bzToolKitAPI.h` inside sample_plugin.cpp.
I don't know how it could be used across plugin folders, perhaps try `#include bzToolKitAPI.h` without the path before it.
Hope that's of some help.
For example `bzflag/plugins/sample_plugin/bztoolkit...` and then you use `#include bztoolkit/bzToolKitAPI.h` inside sample_plugin.cpp.
I don't know how it could be used across plugin folders, perhaps try `#include bzToolKitAPI.h` without the path before it.
Hope that's of some help.
If you like what I do and want to support me, you can on ko-fi
Re: Plugin include custom header file
bztoolkit is archived and was last updated in 2017. It also bypasses the API, which may be why you're having problems. The reason we have an API is to expose a (somewhat) stable interface. When you bypass the API, there's almost a guarantee we'll break something on you eventually.