Can I copy/paste Boost source code and compile directly into my application?
Dear Boosters, I would like to use the Boost/regex library in my application, but I don't want my users to have to install Boost. My preference would be to copy a minimal set of Boost .hpp and .cpp files into a sub-directory of my application and then compile and link the boost/regex stuff in the same way as the rest of my application. Note that the regex library is not a header-only library. So, is there a reasonably straight-forward and well-accepted procedure to do this? Apologies if this topic has already been covered, but I can't seem to get a hit. Many thanks, Fred
On Sat, Jul 28, 2012 at 4:56 PM, Fred
Dear Boosters,
I would like to use the Boost/regex library in my application, but I don't want my users to have to install Boost. My preference would be to copy a minimal set of Boost .hpp and .cpp files into a sub-directory of my application and then compile and link the boost/regex stuff in the same way as the rest of my application.
I think this is what you're looking for: http://www.boost.org/doc/libs/1_50_0/tools/bcp/doc/html/index.html -- Josue Andrade Gomes
I think this is what you're looking for:
http://www.boost.org/doc/libs/1_50_0/tools/bcp/doc/html/index.html
That's exactly what I was looking for!! Thanks very much Josue and the others who took the time to answer.
-- Josue Andrade Gomes _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On 7/28/2012 3:56 PM, Fred wrote:
Dear Boosters,
I would like to use the Boost/regex library in my application, but I don't want my users to have to install Boost. My preference would be to copy a minimal set of Boost .hpp and .cpp files into a sub-directory of my application and then compile and link the boost/regex stuff in the same way as the rest of my application.
Note that the regex library is not a header-only library.
So, is there a reasonably straight-forward and well-accepted procedure to do this?
Apologies if this topic has already been covered, but I can't seem to get a hit.
Many thanks,
Fred
I guess I don't understand the concern. Does your app require your users to install source code? Or are you talking about binaries? Most installers include all required dependencies; it's pretty rare to require users to pre-install something else before installing your app. Is there some reason you don't want to bundle it all together? Do you just want your app to consist of a single executable, so you don't have to distribute DLLs/so's? If so, why not just statically link the libraries? Andy
On Sat, Jul 28, 2012 at 10:17 PM, Michael Chisholm
On 7/28/2012 3:56 PM, Fred wrote:
Dear Boosters,
I would like to use the Boost/regex library in my application, but I don't want my users to have to install Boost. My preference would be to copy a minimal set of Boost .hpp and .cpp files into a sub-directory of my application and then compile and link the boost/regex stuff in the same way as the rest of my application.
Note that the regex library is not a header-only library.
So, is there a reasonably straight-forward and well-accepted procedure to do this?
Apologies if this topic has already been covered, but I can't seem to get a hit.
Many thanks,
Fred
I guess I don't understand the concern. Does your app require your users to install source code? Or are you talking about binaries? Most installers include all required dependencies; it's pretty rare to require users to pre-install something else before installing your app. Is there some reason you don't want to bundle it all together? Do you just want your app to consist of a single executable, so you don't have to distribute DLLs/so's? If so, why not just statically link the libraries?
Andy
I don't have an installer, just a fairly simple Makefile to build the executable from my source code. So I'd like to just add the appropriate targets to the Makefile to compile&link whatever I need to from Boost. I don't want my users to have to 'apt-get install' anything else... Am I wrong? Thx
I don't have an installer, just a fairly simple Makefile to build the executable from my source code. So I'd like to just add the appropriate targets to the Makefile to compile&link whatever I need to from Boost. I don't want my users to have to 'apt-get install' anything else... Am I wrong?
Thx
I should add that I would like to support Linux/OSX/Cygwin...
I second that - just statically link the binaries.
On Sat, Jul 28, 2012 at 10:36 PM, Totally Anonymous
I don't have an installer, just a fairly simple Makefile to build the executable from my source code. So I'd like to just add the appropriate targets to the Makefile to compile&link whatever I need to from Boost. I don't want my users to have to 'apt-get install' anything else... Am I wrong?
Thx
I should add that I would like to support Linux/OSX/Cygwin...
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Totally Anonymous Sent: July-28-12 10:37 PM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Can I copy/paste Boost source code and compile directly into my application?
I don't have an installer, just a fairly simple Makefile to build the executable from my source code. So I'd like to just add the appropriate targets to the Makefile to compile&link whatever I need to from Boost. I don't want my users to have to 'apt-get install' anything else... Am I wrong? ? Thx
I should add that I would like to support Linux/OSX/Cygwin...
So, basically, you want to be able to distribute the source code so that anyone on any Linux distro or on Cygwin can build it. If the user is comfortable with building such an application, then they will have no problem using, say, YaST on Suse or apt-get on Ubuntu to install boost, or even to go to the boost website and download, build and install it themselves. I would not want to be cherry-picking bits and pieces out of boost code: that is so much harder than just using it. If I were in your place, I would just list boost as a pre-requisite and let the user worry about satisfying that requirement. If I were a little masochistic, I would set up virtual machines for every supported platform and built it on each, and then package it all up into a form that the native installers (YaST or apt-get or one of the others) can install. If I were in the business of distributing software for the Linux world, I would go the old reliable route of distributing an archive and can be unpacked, and then the process of building would be the usual sequence of './configure', make, 'make check' and 'make install'. You can go even simpler and just provide a makefile, but that requires you to tell the user what libraries have to be installed, and then leave it to the user to install them before trying to build your program. my $0.03 ;-) Cheers Ted
participants (6)
-
Fred
-
Josue Andrade Gomes
-
Michael Chisholm
-
Michael Lindner
-
Ted Byers
-
Totally Anonymous