Hi Unfotunately there are 2 different kinds of dll in Windows. Native created with a c or c++ compiler(delphi ...) and Assembly dlls created wit a .Net compiler (c#,vb.net,c++/Cli ..).
As you wrote you created your dll with Visual C , so it is a native Dll. You can try to compile, your c Source with a linux c compiler like gcc. But this is not a Mono/.Net issue. swo Chaiser wrote: > > 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-tp23852386p23888834.html Sent from the Mono - General mailing list archive at Nabble.com. _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
