GithubHelp home page GithubHelp logo

Document BOOST_URL_NO_LIB about url HOT 4 CLOSED

boostorg avatar boostorg commented on August 16, 2024
Document BOOST_URL_NO_LIB

from url.

Comments (4)

alandefreitas avatar alandefreitas commented on August 16, 2024

By "header-only", you mean when the user includes #include <boost/url/src.hpp> in some source file / translation unit, right? If this is header-only, what's not header-only? If it's never header-only, do we always need BOOST_URL_NO_LIB, even if it's
"BOOST_URL_YES_LIB"?

I'm finding this naming convention a little confusing because <boost/url/src.hpp> is not really header-only at all, and the documentation often refers to that mode as header-only without any quotation marks.

"Alternatively you can use the header-only configuration simply by including this header file in exactly one of your new or existing source files"

And quotation marks would also be worse than describing what things literally are without quotation marks anyway. Some libraries, like Asio, really support both modes. So even if "header-only" did always have quotation marks, it's still confusing, because it might imply the library supports "real" header-only and this "header-only" mode with quotation marks.

Maybe it would be more reasonable to just document this like any other boost library that requires linking.

from url.

vinniefalco avatar vinniefalco commented on August 16, 2024

MSVC has "auto-linking" which can only be turned off by defining BOOST_URL_NO_LIB. I use the term "header-only" for marketing purposes. I think the term "header-only" is still applicable, as to use the library in this mode requires only the inclusion of header files.

from url.

alandefreitas avatar alandefreitas commented on August 16, 2024

I use the term "header-only" for marketing purposes.

Yes. I understood that. I don't care that much about libraries being header-only but I understand why many people would care.

I think the term "header-only" is still applicable, as to use the library in this mode requires only the inclusion of header files.

I don't think I would use the term "header-only" in this case, but that's OK. That's not the real problem here.

MSVC has "auto-linking" which can only be turned off by defining BOOST_URL_NO_LIB.

The problem here is I'm confused, probably because the marketing and the technical terms are in conflict. We're asking the user to set a macro *_NO_LIB for something that is *_YES_LIB.

If including src.hpp is considered header-only, I don't know what's considered not header-only. So I don't know when to tell the user not to define BOOST_URL_NO_LIB.

from url.

vinniefalco avatar vinniefalco commented on August 16, 2024

you avoid defining BOOST_URL_NO_LIB when you want to link to the lib, e.g. "libboost_url-vc142-mt-sgd-x64-1_78.lib." But if you are including src.hpp then you aren't linking to the lib you are including the sources directly, thus you must define BOOST_URL_NO_LIB or else Boost.Config will try to activate auto-linking on MSVC.

from url.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.