Reshat Sabiq wrote:

I tried to use a simple wrapper object in a namespace, and that pretty
much was the only thing i changed. But seamingly, it caused my extension
to stop working: I get NS_ERROR_XPC_BAD_IID now.

I now see a mozilla guideline suggesting not to use them for portability
reasons. Is it just portability, or could it cause the code that
otherwise works on the platform not to work? In other words, will an
extension using a namespaced object work on any platform?

P.S. I assume c++ compiler on Linux is smart enough to know about
namespaces, and that's what i built it with.
Thanks.
Well, after spending several hours trying to get my namespaced object to work, it only took me 10 minutes to get the same code to work by replacing the namespaced C++ object (well , it was also using templates and extending another templates-based class) with a plain C-style struct. Does this confirm that namespaces cannot be used in mozilla (on Linux at least), or should i perhaps look into my Makefile for things i might have screwed up when building with the namespaced templates-based C++ object defined in a separate file (i basically just added a -I and then the .cpp file to the c++ -o target that was building the extension's single .cpp file previously)?

P.S. If it's not a matter of the Makefile, i'm guessing this might be due to -fno-rtti, cause i'm fairly certain namespaces are supported by c++ compilers on Linux.

Thanks.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to