Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I build D++ for static linking? How to stop a dpp::cluster? #34

Closed
MasFlam opened this issue Jun 11, 2021 · 4 comments
Closed

Can I build D++ for static linking? How to stop a dpp::cluster? #34

MasFlam opened this issue Jun 11, 2021 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@MasFlam
Copy link

MasFlam commented Jun 11, 2021

The makefiles cmake generates only seem to build a shared object. Is there a way to compile the library into an archive instead?

@braindigitalis
Copy link
Contributor

braindigitalis commented Jun 11, 2021

Yes but currently only on the dev github branch. After switching to the dev github branch, the build flag -DBUILD_SHARED_LIBS=OFF should give you what you want, let me know if you have any issues with it

@MasFlam
Copy link
Author

MasFlam commented Jun 12, 2021

All seems to be working, thank you for the help. I'm also wondering, is there a way for stopping and disconnecting a dpp::cluster?

@braindigitalis
Copy link
Contributor

not really, as discord doesn't have a quit command as such, you just disconnect the websocket and discord times it out later.

so, you could call cluster::start with true as a parameter and run your own sleep/loop afterwards, when you want to end the cluster call it's destructor and it will close it's sockets. I haven't tested this ability much though as most discord bots are dedicated processes and not embedded in something else.

@braindigitalis braindigitalis added the question Further information is requested label Jun 12, 2021
@braindigitalis braindigitalis self-assigned this Jun 12, 2021
@MasFlam
Copy link
Author

MasFlam commented Jun 13, 2021

I sleep 10 seconds and then delete my cluster but the bot stays running. I don't really need this I guess, I can just run the bot from a shell script and sigint the process whenever i need to, so no big deal.

Thanks again for help and for this awesome library; I'm gonna rename the issue so that it will show up when searching for stopping a cluster too.

@MasFlam MasFlam closed this as completed Jun 13, 2021
@MasFlam MasFlam changed the title Can I build D++ for static linking? Can I build D++ for static linking? How to stop a dpp:cluster? Jun 13, 2021
@MasFlam MasFlam changed the title Can I build D++ for static linking? How to stop a dpp:cluster? Can I build D++ for static linking? How to stop a dpp::cluster? Jun 13, 2021
braindigitalis pushed a commit that referenced this issue Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants