-
Notifications
You must be signed in to change notification settings - Fork 49
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
Possibility to use as nuget package #24
Comments
I am very likely going to target .NET Core with the next release to take advantage of dynamically finding the library, which uses different naming conventions on different operating systems. .NET Standard is rather lacking in this regard, and all solutions to it are rather hacky, so I have been avoiding adding to the library. There is an open discussion about it in #21 that gives some more detail on the reasoning behind it. The inconvenience renaming the library aside, a |
At the moment it's simply a structured as a single directory, I have included the library directly inside a lib folder, although I've also tried moving the 3 library files to the root itself, which did not work. That aside, im not actually sure why it's 3, 2 of which are simply '.a' files, of which i have no clue what its purpose is. All in all, currently, with (and im aware this is incorrect, not sure what is correct though) :
|
The .a files are static libraries versions glfw, typically for embedding into a C application, you do not need those, only the shared (.dll) one. Assuming that you have those set to copy to the build directory, where you have your main application, and a For example, if your final compiled product looks like this, where
Here it should be I could probably supply a separate NuGet package that contained the native binaries for Windows users that would place them in a predictable location on the system, which could make it more convenient and eliminate the need for renaming manually. |
I got it to work by using:
Not very beautifyl, additionally I did rename glfw3.dll. Not sure how it would work using different targets, though It should work pretty well now :), though of course, it does mean using possibly outdated versions. 😅 Thanks for your reaction, I totally forgot about copying the dll file over to the output. 🤦♀ |
Do I place the dll in a lib folder in the GLFW.Net project root or the BasicExample root? |
You can place it in any place you like, if i am correct. |
In the meantime, might it be possible to make a 3.3.2 release? |
I think I can get an updated release pushed out within the next few days, I have admittedly been a little complacent with this project lately working on a small game-engine myself. Luckily, doing so has brought to my attention a few other minor issues that could be improved upon with this library, so I will use the opportunity to improve those aspects as well. I will be dropping the .NET Standard targeting and just going full-on .NET Core to finally fix the library loading once and for all. There is very little reason not to be using .NET Core at this point on any desktop platform, and it is causing more problems than it fixes sticking with .NET Standard. |
I would also like to see this library as a nuget package, for .NET Core, with streamlined library loading. I did manage to get it to run with a little bit of hassle, but making the experience smoother would further increase the relevance of this library. I would also like to commend having SkiaSharp example out of the box. |
i installed glfw-net and glfw 3.3.1 in nuget but im getting the same unable to load dll issue. Im doing something wrong. If i installed through nuget i dont need to go download the actual dlls right? |
Is it possible to make use the nuget package given by using
add package glfw-net
,instead of using the source code directly, even as submodule?
Whenever I try, I receive a
System.DllNotFoundException
even when renaming the dll files from glfw3 to glfw. Neither does changing the location from a lib folder to the root seem to work. Though this method seems greatly more preferable to cloning the source.The text was updated successfully, but these errors were encountered: