Coder Social home page Coder Social logo

Comments (2)

Fluxie avatar Fluxie commented on September 18, 2024

For the automatic discovery #67 to the libraries need to be explicitly linked into to the executable. Otherwise we cannot discover the COM classes with dl_iterate_phdr. => They are no longer loaded dynamically at runtime with dlopen.

Is this still an issue?

from intercom.

Rantanen avatar Rantanen commented on September 18, 2024

What does that mean?

Libraries need to be explicitly linked into the executable

Isn't this the case, ESPECIALLY with static linking?

They are no longer loaded dynamically at runtime with dlopen

How is this a problem with static linkage?

Or did I misunderstand you wondering whether we could just drop this issue as implementing it would make the automatic discovery of COM classes harder in some way? This issue is still an issue as far as I know.

My current mental draft for static linking is...

  • The COM servers need to be explicitly compiled for static linking. This renames the DllGetClassObject (and other global functions) with some sort of library prefix, such as TestLib_DllGetClassObject
  • The C++ bits are initialized by registering the library manually:
    int main() {
       intercom::register_library(
            TestLib_DllGetClassObject,
            ... // libid? libname? whatever else we need
       );
    }
  • After this the intercom::CreateInstance, etc. can be used like before.
    • We'd still use the generated headers, etc. that define the IIDs. The only thing that changes is how the correct DllGetClassObject, etc. entry points are found.
  • Static linking is not supported with Windows builtin COM functionality.

This would not be the "recommended" way; But some use cases might require static linking: embedded platforms, single-file deployments, etc. so we should make it possible even if not convenient.

from intercom.

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.