-
Notifications
You must be signed in to change notification settings - Fork 71
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
Windows and DUB #133
Comments
|
I don't have any issues with dub. For the crash with the 64 bit executable, i have the same issue with the 3.8 runtime installed, some access violation in libgobject-2, but the problem go's away after installing the 3.10 runtime. The 3.10 runtime can be found here: http://sourceforge.net/projects/gtkd-packages/files/gtk3-runtime/ although there are some other issues with it, #101 |
|
I've also uploaded a GTK 3.18 installer, that can successfully run the 64 bit application. |
|
I have exactly the similar thing on windows. The linker hangs instead of crashing though. Warning 178: .LIB pagesize exceeds 512 |
|
I just try with the updated GTK 3.18 binaries . on 32 bits, I keep with the same issue with optlink. On 64 bits : |
|
There are two different problems here it seems, (1) is optlink hanging/crashing The other problem might be in the application you are building, have you tried with a simple gtk application you can post the code for? |
|
Yep, I try the simple "hello world" and I check that my app works on Linux using dub and on Windows if I build it running dmd by hand with "-L+gtkd.lib" |
|
Do the same errors occur when invoking dub with: --build-mode=allAtOnce You might run out of memory tough. Dub builds the modules one at a time by default, and because there are some modules that have the same name but are in a different package. You end up with multiple objects with the same name in the library. |
|
I end doing an workaround : https://github.com/Zardoz89/DEDCPU-16/blob/master/dub.sdl I would try your solution tomorrow (on the computer where i installed the latest gtk binaries), but I don't think that I run out RAM when I have 8GiB of RAM on both computers. Also, building with "--arch=x86_64" generates a .exe file that simply crashes when I try to run it. I can't build it on 32 bit without doing these workaround. |
|
The errors seem to be caused by the debug information, dub includes debug symbols by default. building without debugging symbols ( |
|
I can confirm that --build=plain makes the link work. Has anybody filed a bug report on optlink? |
It does work. Working exampledub run --single --arch=x86 --build=plain hello.d hello.d |
|
On Windows you have to tell the linker that you don't want the command prompt. For optlink this whould be For dub you probably have to add it to your dub.json file. |
Yep, I red about it on this thread: https://forum.dlang.org/post/ihsgepcxnwzoobzmgzva@forum.dlang.org I had tried many times and somehow it still didn't work out for me using dub, maybe I'm having syntax misunderstandings of dflags option, unsure. Seems to not produce any errors. https://dub.pm/package-format-sdl#build-settings |
|
I think you need to put the flag in the It might also be |
|
@MikeWey you are right, I somehow figured it out just right before your comment. The final working exampleIn this example there is no Command Prompt window when launching the executable. HelloWorld.dCommand Line Input and ResultsScreenshot showing that example works well with
|
|
This didn't work for me anymore... The correct line should be However, I got the error which means one also needs to specify Tested on dmd 2.097, dub 1.26.1 |



I'm really having annoying problems with GtkD on Windows.
With a basic hello world (the same that is on the wiki ), I try this :
dmd source/app.d-L+gtkd.lib -> This works, and I can see the hello world windowdmd source/app.d-m64 -Lgtkd.lib -> It crash when i try to execute the .exe file on my machine.dmd version : 2.069.1
dub version: 0.9.24
gtk binaries version 3.8.1-2 , both 32 and 64 bits
vstudio 2015 community with latest windows sdk
OS: Windows 8.1 64bit
Optlink crash :

sc.ini :
The text was updated successfully, but these errors were encountered: