Find Jobs
Hire Freelancers

Invoke C# DLL from Java on Linux

$10-99999 USD

In Progress
Posted about 8 years ago

$10-99999 USD

Paid on delivery
Hello, I have a C# class that uses .NET I want to invoke it's code from Java on Linux. I have used MONO to create the DLL of this code: mcs /target:library /out:[login to view URL] -platform:x64 [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] I have created a Java class to load this DLL: class FSBridge { static { try { [login to view URL]("/tmp/[login to view URL]"); } catch (UnsatisfiedLinkError e) { [login to view URL]("Native code library failed to load.\n" + e); [login to view URL](1); } } public static void main(String[] args) { [login to view URL]("Start.."); // TODO add code to invoke C# function 'Filter' [login to view URL]("End."); } } It compiles OK but when I run it I see this.. user@host>java FSBridge Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /tmp/[login to view URL] which might have disabled stack guard. The VM will try to fix the stack guard now. It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'. Native code library failed to load. [login to view URL]: /tmp/[login to view URL]: /tmp/[login to view URL]: invalid ELF header (Possible cause: endianness mismatch) When I execute 'execstack' I see this: execstack: "[login to view URL]" is not an ELF file What I need you to do: 1. You need to provide the compilation parameters you used to compile the C# (on Linux) and the Java (on Linux) as well. 2. Get this Java code to execute this C# code without error by providing an example of this Java code invoking the following C# method found inside [login to view URL]: public static IEnumerable<Entry> Filter(AllFeedCollection unfilteredFeeds, string FilterString) So I know you are not a bot, please send a message/comment with the word 'understood' so I know you understand what I wrote. Thank you. I look forward to working with you.
Project ID: 10314426

About the project

Remote project
Active 8 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of BELGIUM
Belgium
5.0
241
Member since Sep 25, 2004

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.