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

git: ignore JetBrains Ryder and OSX-specific files #74

Closed
wants to merge 2 commits into from

Conversation

abdullin
Copy link
Contributor

Working with the solution on OSX generates a few transient files:

  • .idea folder for the Jetbrains Ryder
  • .DS_Store for the OSX

This PR simply ignores these folders

OSX native FDB library is called libfdb_c.dylib. Provided with the
library reference of "fdb_c.dll" PInvoke can't find it, since it stops
matching on the first dot. However, if the native library is referenced
as "fdb_c", then PInvoke on OSX will be able find the library by
convention.

Note: to make this work one has to call to disable native library
preloading (see Fdb.Options.DisableNativeLibraryPreloading)
@KrzysFR
Copy link
Member

KrzysFR commented Apr 27, 2018

OK for the .gitignore changes.

The changes to the library loading seem a bit more complex: the code dates from before .NET Core and "supported" for Mono via some #if #else #endif. It looks like with .NET Core, multi-plateform interop should work out of the box with that.

I'd like to investigate if only having [DllImport("fdb_c", ...)] would be enough for all platforms, and also why you need to call Fdb.Options.DisableNativeLibraryPreloading()? Ideally, we should have something that works out of the box on Windows/MacOS/Linux without having to call anything special.

Can you maybe split off these changes to a different PR so that we can focus on this?

@KrzysFR KrzysFR added the build_env Build Environment label Apr 27, 2018
@KrzysFR
Copy link
Member

KrzysFR commented Apr 27, 2018

I have opened issue #75 for the native interop issue. Looks like the call to DisableNativeLibraryPreloading() is to prevent the code from calling WIN32 native API LoadLibrary.

@abdullin
Copy link
Contributor Author

Apologies for mixing two commits in the PR. I forgot that github updates PR with the new commits. I'll clean this PR up.

@abdullin abdullin closed this Apr 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build_env Build Environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants