Is there something like .dll or .so, but cross-platform?
Asked Answered
P

5

6

is there something like .dll or .so, but cross-platform?

Paralyze answered 25/1, 2010 at 22:29 Comment(3)
i dont meant binary compatibilityParalyze
well the rigid nature of DLL and SO (binary compatibility) is what causes them to have powerful semantics and great weaknesses. What exactly are you trying to ask ?Salmonella
i meant:programm and every dll compiler for every platformParalyze
S
3

It's not clear what you are asking, but if you are asking "how can I make dynamically loadable C/C++ libraries in a cross-platform manner," then the answer is GNU Libtool. It has support for building and consuming them, plus runtime support functions

Schulze answered 25/1, 2010 at 23:3 Comment(0)
S
8

Java .class files and .jar archives will fulfil this requirement, as will .Net assemblies running under Mono.

Steepen answered 25/1, 2010 at 22:35 Comment(2)
They don't really fulfill the requirement for a plethora of reasons -- he isn't asking if there are languages which have a compilation unit that is architecture and vendor indepement :/ You shouldn't state such bold totalities without any disclaimers.Salmonella
The question say "is there something like...". I think the above fits that 'requirement' quite well. I'm not talking about languages in the above. I'm talking about platforms (JVM or .Net)Steepen
C
6

A universal executable format? No.

That's the whole reason for the existence of virtual machines (java) or IL (.Net) - so the same source code can be compiled into a universal intermediate language, that can then be executed by the framework in the underlying system bytecode without the programmer having to know the differences between the systems.

In practice, the VM has to be consistently implemented on all platforms.

Ciscaucasia answered 25/1, 2010 at 22:36 Comment(0)
G
4

not for c/c++ AFAIK, java has .jar files that are sort of analogous though.

Giacobo answered 25/1, 2010 at 22:32 Comment(0)
S
3

It's not clear what you are asking, but if you are asking "how can I make dynamically loadable C/C++ libraries in a cross-platform manner," then the answer is GNU Libtool. It has support for building and consuming them, plus runtime support functions

Schulze answered 25/1, 2010 at 23:3 Comment(0)
S
1

As others have mentioned, not really. Perhaps LLVM will one day bridge the gap allowing us to look at LLVM equivalents as we do static/dynamic object libraries.

Take a look at this reply for some of the reasons why static object libraries aren't generally portable. I say generally because sometimes -- if the OS vendors care enough -- it is possible -- like freebsd executing linux binaries, or WINE implementing a large part of the win32 runtime.

Salmonella answered 25/1, 2010 at 22:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.