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

documenting System.DllNotFoundException troubleshooting #1085

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

lamg
Copy link
Contributor

@lamg lamg commented Jun 25, 2024

  • I agree that my contribution may be licensed either under MIT or any version of LGPL license.

  • addresses Documentation: Improve DLL not found section #1083

  • I explained how to fix System.DllNotFoundException by calling Module.Initialize()

  • separated the explanation of System.DllNotFoundException being thrown when a custom build binary is used from the details of how to use a custom binary build.

Copy link
Member

@badcel badcel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Please see my comments.

docs/docs/faq.md Outdated
1. Gnome SDK (Linux)
2. MSYS2 (Windows)
3. Homebrew (MacOS)

Each of those sources defines the names of the binaries which must be available to call into them. If a custom build binary is used, the resulting name of the binary can differ from the one specified by the package source, thus resulting in a `DllNotFoundException`.
Each of those sources defines the names of the binaries which must be available to call into them. If a custom build binary is used, the resulting binary name binary may be different from the one specified by the package source, resulting in a `System.DllNotFoundException`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sentence contains an obsolete binary.

docs/docs/faq.md Outdated
The gir.core nuget packages are build against 3 different package sources:
The `System.DllNotFoundException` can be thrown in the following cases:

- required DLLs or Shared Objects (the Unix equivalent of DLLs) are not installed in the OS.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Shared objects should probably be lower case?
  • OS -> operating system

docs/docs/faq.md Outdated

- required DLLs or Shared Objects (the Unix equivalent of DLLs) are not installed in the OS.

- or you forgot to do a `Module.Initialize()` call before instantiating an object in a namespace like `Gtk`, `Gdk` or `GtkSource`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Please don't talk to the reader directly / avoid words like you
  • Remove empty lines between bullet points

@badcel
Copy link
Member

badcel commented Jun 26, 2024

If you update the PR can you please amend your changes via git to still only have one commit when you are did done?

Copy link
Member

@badcel badcel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some more remarks. This time with concrete suggestions to make your life easier.

If you apply them please squash the commits again to avoid having multiple. (This is probably a separate step after applying the changes.)

After this changes I think it is good to go. 🚀

docs/docs/faq.md Outdated
The `System.DllNotFoundException` can be thrown in the following cases:

- required DLLs or shared objects (the Unix equivalent of DLLs) are not installed in the operating system.
- or `Module.Initialize()` was not called before instantiating an object in a namespace like `Gtk`, `Gdk` or `GtkSource`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- or `Module.Initialize()` was not called before instantiating an object in a namespace like `Gtk`, `Gdk` or `GtkSource`.
- `Module.Initialize()` was not called before instantiating an object in a namespace like `Gtk`, `Gdk` or `GtkSource`.

docs/docs/faq.md Outdated
- or `Module.Initialize()` was not called before instantiating an object in a namespace like `Gtk`, `Gdk` or `GtkSource`.
- required DLLs or shared objects are installed, but still `DllNotFoundException` is thrown. In this case, the names of the installed libraries probably don't match the names expected by `gir.core`. This can happen when using a custom build binary.

## How can I use gir.core with a custom binary build of Gtk?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## How can I use gir.core with a custom binary build of Gtk?
## How can I use gir.core with a custom build native binary?

docs/docs/faq.md Outdated

- required DLLs or shared objects (the Unix equivalent of DLLs) are not installed in the operating system.
- or `Module.Initialize()` was not called before instantiating an object in a namespace like `Gtk`, `Gdk` or `GtkSource`.
- required DLLs or shared objects are installed, but still `DllNotFoundException` is thrown. In this case, the names of the installed libraries probably don't match the names expected by `gir.core`. This can happen when using a custom build binary.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- required DLLs or shared objects are installed, but still `DllNotFoundException` is thrown. In this case, the names of the installed libraries probably don't match the names expected by `gir.core`. This can happen when using a custom build binary.
- required DLLs or shared objects are installed, but still `DllNotFoundException` is thrown. In this case, the names of the installed libraries probably don't match the names expected by `gir.core`. This can happen when [using a custom build binary](#how-can-i-use-gircore-with-a-custom-build-native-binary).

@badcel badcel merged commit 95e623b into gircore:main Jun 28, 2024
@badcel
Copy link
Member

badcel commented Jun 28, 2024

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants