-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
static library build #84
Comments
@nickdesaulniers You can not compile the So, for example you have header // foo.h
void foo(); // foo.cpp
#include <iostream>
void foo() {
std::cout << "Hello from foo!" << std::endl
} So, you want to use I hope the process more or less clear. |
ah, so that's why |
Thanks @vpetrigo for the explanation. In fact, the class makes heavy use of templates to be applicable in many scenarios where we know little about the values we want to store to JSON, but can rely on the fact that they are some kind of STL containers. |
I'm trying to build this as a static lib that I can link to, but must admit I'm out of my depth. Is it possible? I've added the usual cmake commands but am getting various errors. If I try to build the archive manually, I get that it's empty. If I compile
src/json.hpp
to an object file, it's only 200B in file size, which seems wrong,objdump
doesn't print any symbols from it, andar
complains that the would be archive would be wrong. What am I missing here? I recognize the library is meant to be included as a header, and static linking doesn't save me from having to import the forward declarations anyways.The text was updated successfully, but these errors were encountered: