문제

Question: Is it possible to compile a program on linux using a .dll file?

Where this is going: This .dll will be used to write a php extension to some proprietary software from a third party.

Background and Research:

I have been given a library called proprietary.lib. I was curious, as I have never seen the .lib extension before, so I typed:

file proprietary.lib

The output was:

proprietary.lib:  current ar archive

I did some research and found that ar is more-or-less tar (and in fact, I guess tar has since replaced ar in most *nix environments).

Upon inspecting the ar manpage, I saw the t option, which displays a table listing of the contents of that archive. Cool. So I type:

ar t proprietary.lib

And get:

proprietary.dll
proprietary.dll
... (snip X lines) ...
도움이 되었습니까?

해결책

You could try extracting the ar file (Debian packages are ar files, fwiw) and run file on the contents.

You're not going to be able to use Windows DLLs without translation. The only DLL files that I know of that work natively on Linux are compiled with Mono.

If someone gave you a proprietary binary library to code against, you should verify it's compiled for the target architecture (nothing like trying to use am ARM binary on an x86 system) and that it's compiled for Linux.

That being said...good luck. I hate programming against third-party libraries where I have the documentation and the source.

다른 팁

프로젝트의 아키텍처를 설계하는 사람은 시퀀스 다이어그램을 설계하도록 할당됩니다.이 의무는 소프트웨어 하우스의 역학, 관련 스테이크 소지자 및 프로젝트의 심각성에 따라 다양한 팀 구성원에게 할당 될 수 있습니다.

이를 추가하려면 개발자, 테스터, 팀 리더, CTO는 개발주기시 다이어그램을 사용하고 있습니다.또한 관리 및 클라이언트는 프로젝트가 진행되는 방식을 확인하기 위해이를 사용할 수 있습니다.

.dll files are usually Windows shared libraries. (It's also possible that somebody on Linux has built a regular Linux library and called it .dll for some reason.)

It's possible you could link against them using Wine. Support for this was once in there as experimental - I don't know its current status.

Yes We can use dll with the help of wine . just install wine64 in linux

sudo apt-get install wine64
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top