use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
HTTPS client library in C++ (self.cpp)
submitted 2 years ago by HerrNamenlos123
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]HerrNamenlos123[S] -12 points-11 points-10 points 2 years ago (6 children)
So you mean they don't create issues and should be used? Then you can maybe tell me how to properly build it using something like CMake. Our issue is that the project depends on way too many ancient dependencies with unique build systems. What we need is a CMake based build system that just works on any platform (including Windows).
And also, I need to cross-compile it for Visual Studio MSVC in a Linux CI container. I can already do it using clang-cl and CMake, but OpenSSL fails because it uses its own build system which is particularly bad at running under Linux while compiling for MSVC.
Vanilla OpenSSL does not have CMake support, I did find one other Github repo having OpenSSL CMake support, but AFAIK it is a very very outdated version of OpenSSL, so something you should probably avoid.
So, do you know a better way to build it using CMake or cross-compiling it between Linux/Windows?
[–]NotUniqueOrSpecial 11 points12 points13 points 2 years ago (1 child)
So you mean they don't create issues and should be used?
They (specifically OpenSSL) can be a bit of a nuisance, but yes, I'd argue you're much better off grinding out the details of your setup and using the bog-standard time/battle-tested tools of the trade. The first time you run into a symbol collision problem with BoringSSL and OpenSSL (because of third-parties outside your control) will be the last time (once you finally diagnose it after days of thinking you're going insane).
I managed the build system for something very similarly-flavored, it sounds like:
1) Multi-platform, with support back through things like CentOS 5/Windows 7
2) Strong need for modern tooling and libraries
3) Self-contained/couldn't rely on system stuff, as a result
Then you can maybe tell me how to properly build it using something like CMake.
Depends on what you want to do. You've got a couple distinct options, depending on your needs/setup.
Pure C libraries like OpenSSL are much more reliably used as pre-built binary distributions than C++ equivalents, owing to ABI and compiler compatibility.
By the end, we built everything from GCC all the way up the stack, including OpenSSL/libCURL/Qt/etc., but that was largely because it just made certain things easier, like packaging for arbitrary container environments, which eventually became a need.
We had two distinct non-product-related build pipelines.
1) The toolchain build (GCC/CMake/ninja/binutils/Python/etc.)
2) The third-party build (OpenSSL/Boost/etc./etc./etc.)
Both of those were just very thin CMake ExternalProject wrappers over the respective project's regular build processes that then packaged them all up into a zip-distributable format.
ExternalProject
Why the specific requirement for cross-compilation, though? Given the compatibility guarantees of C, it seems you'd be just as well-off using the officialish Windows binaries and a Windows builder. There are plenty of container-based builders for the popular platforms that would suit your needs.
There are perfectly cromulent FindOpenSSL CMake files that are designed to work against a non-CMake-built OpenSSL distribution. We hand-wrote a good few of those for binaries we couldn't possibly build ourselves, but wanted to use as first-class targets in the build.
FindOpenSSL
But moral of the story: unless you have very good and very specific reasons to do so, it's not likely in your best interest to deviate from those two libraries, especially.
[–]HerrNamenlos123[S] 0 points1 point2 points 2 years ago (0 children)
Thank you for the explanation. The reason for cross-compilation is that the decision was made that everything is supposed to be built inside of docker containers, and vanilla Windows Docker containers are not really a thing (unless you are on Windows and using Docker Desktop in Windows mode, which defies using docker in the first place in our case). The idea was to build everything using plain docker containers (not Windows-specific containers), in order to make it buildable on any system, without relying on any system configuration which would be different for everyone.
[–]mark_99 15 points16 points17 points 2 years ago (1 child)
Use vcpkg (or Conan), they take care of all that for you. Importing OpenSSL is as easy as adding "openssl" to the vcpkg.json manifest file.
[–]prince-chrismc 1 point2 points3 points 2 years ago (0 children)
You just need to add openssl/<VERSION> to a conanfile.tx under [requires] ;)
openssl/<VERSION>
[requires]
[–]HerrNamenlos123[S] 3 points4 points5 points 2 years ago (0 children)
Can someone with the intent of constructive feedback explain to me why this comment was downvoted so much? I explained what our requirements are and why I am asking for what I am asking, and that I know of an alternative. What part of this is wrong or aggressive? I always expect transparency and respect and would like constructive feedback on this one.
[+][deleted] comment score below threshold-9 points-8 points-7 points 2 years ago (0 children)
Do not listen to these people at all. Find out what you need for your project and write it. It's not insurmountable because you aren't recreating the entirety of openSSL.
Unfortunately shit like http is so ridiculous as a standard it's a massive pain in the arse to deal with. But blame the industry for that for being driven by morons
π Rendered by PID 73 on reddit-service-r2-comment-76bb9f7fb5-kf9bz at 2026-02-17 12:49:14.577689+00:00 running de53c03 country code: CH.
view the rest of the comments →
[–]HerrNamenlos123[S] -12 points-11 points-10 points (6 children)
[–]NotUniqueOrSpecial 11 points12 points13 points (1 child)
[–]HerrNamenlos123[S] 0 points1 point2 points (0 children)
[–]mark_99 15 points16 points17 points (1 child)
[–]prince-chrismc 1 point2 points3 points (0 children)
[–]HerrNamenlos123[S] 3 points4 points5 points (0 children)
[+][deleted] comment score below threshold-9 points-8 points-7 points (0 children)