Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update libc DllImport to one that is supported? #41

Closed
reifujin opened this issue Sep 26, 2014 · 7 comments
Closed

Update libc DllImport to one that is supported? #41

reifujin opened this issue Sep 26, 2014 · 7 comments

Comments

@reifujin
Copy link

Hey,

I was trying to compile your library through the .NET Native toolchain and realised that it has a dependency on libc.dll (UnsafeNativeMethods.cs:52) for memcmp. (As a result, it doesn't run and probably fails during runtime.) I believe MSFT has deprecated libc.dll (http://msdn.microsoft.com/en-us/library/abx4dbyh.aspx) and only allows you to use libcmt or mscvrt. (It's in that tiny Note section.)

Is it possible to update this method?

Thanks!
Connie

@yfakariya
Copy link
Member

Hi,

Would you tell me what platform did you use? libc is intended for non-Windows build, so I will add compiler directive around it.

Thanks!

@reifujin
Copy link
Author

Hi,

I was on Windows 8.1 with VS 2014 CTP. I had installed MsgPack through the nuget package.

@yfakariya
Copy link
Member

What type of the project? Desktop or windows?

@reifujin
Copy link
Author

Project type was Universal App. I was running the Windows Store App part of it. The compiler directive is "WINDOWS_APP". I don't know if it'll run on Windows Phone, but I did not check. The compiler directive for that is "WINDOWS_PHONE_APP".

@yfakariya
Copy link
Member

Thank you for response. I've fixed this issue, so can you test it?

  1. Check out issue41 branch.
  2. Open msgpack.sln and build src/WinRT/MsgPack.WinRT.Portable project as Release configuration.
  3. The (repoistory-root)\bin\portable-net45+win+wpa81\MsgPack.dll is patched DLL for Universal apps.

I'm happy if you continously contribute to enable MsgPack in .NET Native :)

@reifujin
Copy link
Author

reifujin commented Oct 6, 2014

Hey,

I've compiled it and tested it on my application. It runs! :)

However, using the library may take some effort because .NET Native handles Reflection a lot differently than before (since it is statically compiled and there is no JIT). I am working to see if I can add some runtime directives to get it to work. :)

Connie

@reifujin reifujin closed this as completed Oct 6, 2014
@bunkerdives
Copy link

bunkerdives commented Dec 12, 2016

Did the fix for this issue ever make it into master? We are also trying to use MsgPack in a windows store app, and are unable to, due to the libc.dll dependency when installing from Nuget. I think the nuspec would also need to be modified for this project? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants