Skip to content

Update libc DllImport to one that is supported? #41

Closed

Description

@reifujin

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

Activity

  1. yfakariya commented on Sep 26, 2014

    @yfakariya
    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!

  2. reifujin commented on Sep 26, 2014

    @reifujin
    Author

    Hi,

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

  3. yfakariya commented on Sep 29, 2014

    @yfakariya
    Member

    What type of the project? Desktop or windows?

  4. reifujin commented on Sep 29, 2014

    @reifujin
    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".

  5. yfakariya commented on Oct 4, 2014

    @yfakariya
    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 :)

  6. reifujin commented on Oct 6, 2014

    @reifujin
    Author

    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

  7. bunkerdives commented on Dec 12, 2016

    @bunkerdives

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions