Giter Site home page Giter Site logo

Comments (7)

vassilux avatar vassilux commented on May 28, 2024

Hi,
I have the sale issue
Is there a solution for ?

from jsoncpp.

biepenghaomie avatar biepenghaomie commented on May 28, 2024

Hi, I have the sale issue Is there a solution for ?

Of cause.
You can use other name to replace 'IStream' like 'iStream'.
And recompile it.
Luckly,jsoncpp use 'IStream' less.
So you just pay a little time to change all 'IStream' in jsoncpp source code.

from jsoncpp.

vassilux avatar vassilux commented on May 28, 2024

I find soltion to incldue afxole.h before include jsoncpp.h and it works
thanks

from jsoncpp.

BillyDonahue avatar BillyDonahue commented on May 28, 2024

What's the nature of the conflict?
If it's macros, then I would recommend isolating the windows header inclusion into a wrapper .cpp file. Only include it off to the side, where it can do less damage to other headers like jsoncpp's headers.

from jsoncpp.

biepenghaomie avatar biepenghaomie commented on May 28, 2024

What's the nature of the conflict? If it's macros, then I would recommend isolating the windows header inclusion into a wrapper .cpp file. Only include it off to the side, where it can do less damage to other headers like jsoncpp's headers.

Windows header CommCtrl.h has a struct declare which name is IStream in the header.
So it make the conflict between windows header and jsoncpp.

from jsoncpp.

BillyDonahue avatar BillyDonahue commented on May 28, 2024

But jsoncpp defines a Json::IStream, so it's in the Json namespace.

using IStream = std::istream;

This sounds like the conflict is happening due to the user code breaking the separation between namespaces?

Perhaps the user code has using namespace Json; directives or similar usage? If so, just don't do that.

I would like to see a repro and to see what the compiler's actual error message is.

from jsoncpp.

biepenghaomie avatar biepenghaomie commented on May 28, 2024

But jsoncpp defines a Json::IStream, so it's in the Json namespace.

using IStream = std::istream;

This sounds like the conflict is happening due to the user code breaking the separation between namespaces?

Perhaps the user code has using namespace Json; directives or similar usage? If so, just don't do that.

I would like to see a repro and to see what the compiler's actual error message is.

You're right.
Thanks for your reminder.
I overlooked this issue at the time.

from jsoncpp.

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.