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

Support boost::random and libboost-random #48

Open
cmcqueen opened this issue Oct 16, 2013 · 5 comments
Open

Support boost::random and libboost-random #48

cmcqueen opened this issue Oct 16, 2013 · 5 comments

Comments

@cmcqueen
Copy link

I was trying to use boost::random::random_device, and when linking got a linker error. Apparently I need to link with libboost-random. But these macros don't support it.

So I guess it would be great to have a BOOST_RANDOM macro to link with libboost-random.

@tsuna
Copy link
Owner

tsuna commented Apr 6, 2014

Can you send a pull request?
Thanks.

@cmcqueen
Copy link
Author

cmcqueen commented Apr 7, 2014

Hmm it's a little tricky. I'm not a Boost expert so I'm a little unsure here...

Boost Unix Variants—Header-Only Libraries says

Boost.Random has a binary component which is only needed if you're using random_device.

But many people may want to use Boost.Random without using random_device. And random_device is supposedly not necessarily supported on all platforms.

So, do you think it would be good to have two macros, BOOST_RANDOM which just checks for the headers, and BOOST_RANDOM_DEVICE which links with the library? I don't see such a thing for other macros, so I guess that's not a good idea. But given that random_device may not be supported on all platforms, I'm not sure what code to put in the BOOST_FIND_LIB() macro call when defining BOOST_RANDOM.

@tsuna
Copy link
Owner

tsuna commented Apr 7, 2014

Sounds good yeah.

@cmcqueen
Copy link
Author

cmcqueen commented Apr 7, 2014

Sorry, I edited my comment around the same time you commented I think. So you do think it's okay to have two macros for this case?

@tsuna
Copy link
Owner

tsuna commented Apr 7, 2014

Yeah, either that or make a single macro with an optional argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants