"Error 43: Not a Valid Library File" problem
ZHANITEST opened this issue ยท 3 comments
ZHANITEST commented
Hello ๐
I need some help about Error 43: Not a Valid Library File
error.
Enviroment
- OS : Windows 10 x64
- Compiler : DMD32 D Compiler v2.090.0-dirty
- GtkD version : 3.9.0
What I did ...
First, I get some binary lib files.
> cd GtkD-3.9.0
> rdmd Build.d --Done.
> copy *.lib C:\D\dmd2\windows\lib
gtkd.lib -- copied
gtkdsv.lib -- copied
And change sc.ini(C:\D\dmd2\windows\bin
) like this:
[Version]
version=7.51 Build 020
; environment for both 32/64 bit
[Environment]
DFLAGS="-I%@P%\..\..\src\phobos" "-I%@P%\..\..\src\druntime\import" "-I%@P%\..\..\src\gtkd"
... (skip) ...
Test code is here(hello.d):
import gtk.MainWindow;
import gtk.Label;
import gtk.Main;
void main(string[] args){
Main.init(args);
MainWindow win = new MainWindow("Hello World");
win.setDefaultSize(200, 100);
win.add(new Label("Hello World"));
win.showAll();
Main.run();
}
Finally, I got this error when I tried to compile it:
> dmd hello.d -L+gtkd.lib
OPTLINK (R) for Win32 Release 8.00.17
Copyright (C) Digital Mars 1989-2013 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
C:\D\dmd2\windows\bin\..\lib\gtkd.lib
Error 43: Not a Valid Library File
Error: linker exited with status 1
Please give me some advise.
Thanks.
MikeWey commented
I don't know what rdmd default to, but could you try to explicitly tell is to build the 32 bit version of gtkd:
rdmd -m32 Build.d
ZHANITEST commented
@MikeWey , Thank you for reply. I'll doing it after get off work.
Here are binarys: github:gtkd-windows-binary
ZHANITEST commented
I solved it. I'm doing this... :
rdmd -m32 Build.d
- Re-install runtimes for 32 bit : https://gtkd.org/download.html
This guide will be better If metion more detail for windows 64bit.
Thanks!