[Mono-list] using dll in linux

Chaiser harel.gr at gmail.com
Fri Jun 5 07:08:41 EDT 2009


But how can I generate a dll file for linux ? 
I'm running my application (exe file) that was compiled on .net  in a linux
environment. 
the code in the exe file refers to functions in a dll file I compiled in
visual studio on windows.
my question is : Can I generate a dll file compiled on linux ? that will
expose the same api and  run my exe file ? will it do the job ?


thanks in advance.



SWO wrote:
> 
> Hi 
> 
> You can't use native windows dll on linux. If you have an linux so file
> you can use it like a dll with pinvoke on linux.
> So if you need native code in your Application you have to provide
> different dlls for each OS
> 
> swo
> 
> 
> Chaiser wrote:
>> 
>> Hey all,
>> 
>> I'm new to mono so I hope that you'll be able to sort my problem.
>> 
>> I wrote a C# program on .net in windows. in my program I'm using a
>> xxx.dll that I created using visual C.
>> 
>> I build the project , got a proj.exe file that is using my xxx.dll.
>> 
>> when I copy my proj.exe+xxx.dll to linux env, and running it with " mono
>> proj.exe " it runs fine until it reaches the part the programs call a
>> function from the xxx.dll ( reasonable cause the xxx.dll written and
>> compiled for win 32 ).
>> 
>> my question is  - how can I use my xxx.dll ( compile it with gcc ?! )
>> with mono in linux ? 
>> 
>> thanks in advance,
>> Joe
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/using-dll-in-linux-tp23852386p23886285.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list