Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Latest nugget packages won't run on Win32/Windows #229

Closed
sunkin351 opened this issue Jun 3, 2018 · 8 comments
Closed

Latest nugget packages won't run on Win32/Windows #229

sunkin351 opened this issue Jun 3, 2018 · 8 comments

Comments

@sunkin351
Copy link

I'm using VS2017 to develop and build an application with GTK#, it includes the package GtkSharp.Win32(All packages are the latest as of June 3, 2018), and I am receiving a PInvokeStackImbalance error through the Application.Init() function. Any help here?

@sunkin351
Copy link
Author

Is nobody maintaining this atm? Or...?

@Therzok
Copy link
Contributor

Therzok commented Jun 7, 2018

GtkSharp.Win32 is not maintained by mono/gtk-sharp, not sure why the project site for that nuget links here.

@Therzok Therzok closed this as completed Jun 7, 2018
@sunkin351
Copy link
Author

What's the problem though? Is it not up to date with the latest sources of GTK?

@Therzok
Copy link
Contributor

Therzok commented Jun 7, 2018

Yes, the package seems outdated. We've done quite a bit of work to fix proper pinvoke signatures in the 2.12 branch, but there wasn't any issue with App.Init()

Something you could try is forcing your main exe to build for the x86 platform, not any-cpu. That might do the trick and it should work.

Gtk# 2.x on windows 32bit only

@sunkin351
Copy link
Author

Well, there's my problem... I require 64-bit... :( Is there a workaround to match the 32-bit ABI?

@Therzok
Copy link
Contributor

Therzok commented Jun 7, 2018

One idea that comes to mind is to manually pinvoke whatever you need and doesn't work in your app (so binding gtk_application_init) by yourself. But that's complicated.

But you're going to set yourself on a path to fixing up everything that is a mismatched size as you go by replacing API with pinvokes.

Right now, no other workaround that I know of.

There is work being done on a new generator to help with this scenario (being able to bind any gtk based on the instrospection information the libs provide), but that's on hold for a while, as I've not had time to drive the effort. This new generator would've solved the problem you're seeing.

I might be able to resume work on it in a few months, but I can't spare time now.

@Therzok
Copy link
Contributor

Therzok commented Jun 7, 2018

Also, gtk+ 2.x on windows doesn't really work in 64bit. So I really wouldn't go there.

@sunkin351
Copy link
Author

Lovely...

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

No branches or pull requests

2 participants