On 11/10/2015 04:38 PM, Opa114 wrote:
Hi,
can someone explain me how i use NSS and NSPR in my C++ Project? I'm
new to C++ and want use in project the NSS libraries, so i thought i
could include the header files i need, but did not work, so what's
the right way?
2 things:
When you ask a question and want others to help you it's best to give
details, a statement like "did not work" doesn't tell the reader
anything, only you know how it didn't work (but in this case I can
probably guess)
You need to declare the headers are C language via extern "C". This is a
very common C++ issue and discussed widely. Some headers will add the
extern "C" declaration as a friendly service, I just checked the NSS
headers and unfortunately only 2 of the headers actually do this so
you'll have to provide the declaration yourself.
extern "C" {
#include "nss.h"
}
should do the trick, google mixing C and C++, you should find a ton of
information.
Must i compile NSS and NSPR first and the use the DLL / Libs? Would
be very helpful if someone could explain it in detail.
Thanks a lot!
--
John
--
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto