Code Monkey home page Code Monkey logo

Comments (7)

bernhard-thiele avatar bernhard-thiele commented on August 29, 2024

I will look into that. I don't know the Windows code too well, since it was initially not written by myself and I work mainly with Linux. Thanks for the issues and fixes you have brought up so far!

from modelica_devicedrivers.

bernhard-thiele avatar bernhard-thiele commented on August 29, 2024

Is this still an issue?

I think we fixed this with fixing the macros in "CompatibilityDefs.h". Also, I don't get that errors on my machine.

Therefore, I will tentatively close the issue ...

from modelica_devicedrivers.

tbeu avatar tbeu commented on August 29, 2024

No, this issue is still not resolved since it still happens for Code Export feature of SimulationX.
See http://stackoverflow.com/questions/1372480/c-redefinition-header-files for a workaround. The problem with exported C code of SimulationX is that Windows.h is included before CompatibilityDefs.h. Thus there is no possibility to define WINSOCKAPI before inclusion of Windows.h.

from modelica_devicedrivers.

tbeu avatar tbeu commented on August 29, 2024

My workaround proposal for MDD:

  1. Remove inclusion of winsock2.h from CompatibilityDefs.h
  2. In MDDBeep.h, MDDJoystick.h, MDDKeyboard.h, MDDRealtimeSynchronize.h and MDDSoftingCAN.h include Windows.h before CompatibilityDefs.h.
  3. Also in MDDSharedMemory.h include Windows.h before CompatibilityDefs.h.
  4. In MDDSerialPort.h and MDDUDPSocket.h replace inclusion of winsock2.h by Windows.h.

from modelica_devicedrivers.

bernhard-thiele avatar bernhard-thiele commented on August 29, 2024

Followed your workaround. Just let me know if we can close the issue, or if there are problems left...

from modelica_devicedrivers.

tbeu avatar tbeu commented on August 29, 2024

Successfully tested with
Blocks.Examples.TestInputJoystick
Blocks.Examples.TestInputKeyboard
Blocks.Examples.TestInputSpaceMouse
Blocks.OperatingSystem.RandomRealSource

from modelica_devicedrivers.

bernhard-thiele avatar bernhard-thiele commented on August 29, 2024

Thanks for testing. I guess I can close this now.

from modelica_devicedrivers.

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.