Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
November 22, 2007 Phobos problem - compilation | ||||
---|---|---|---|---|
| ||||
Hello, I copy one of the examples from GtkD project site: import gtk.MainWindow; import gtk.Label; import gtk.GtkD; void main(char[][] args) { GtkD.init(args); MainWindow win = new MainWindow("Hello World"); win.setDefaultSize(200, 100); win.add(new Label("Hello World")); win.showAll(); GtkD.main(); } I use CodeBlock to compile it but I have an error. This is log from compilation: -------------- Build: Debug in asd --------------- Compiling: hello.d Linking console executable: bin\Debug\asd.exe D:\D\dmd\bin\..\..\dm\bin\link.exe obj\Debug\hello,bin\Debug\asd.exe,,D:\D\dmd\lib\phobos.lib+D:\D\dsss-0.73-dmd-win\lib\DD-atk.lib+D:\D\dsss-0.73-dmd-win\lib\DD-cairoLib.lib+D:\D\dsss-0.73-dmd-win\lib\DD-gdk.lib+D:\D\dsss-0.73-dmd-win\lib\DD-gdkpixbuf.lib+D:\D\dsss-0.73-dmd-win\lib\DD-glade.lib+D:\D\dsss-0.73-dmd-win\lib\DD-glib.lib+D:\D\dsss-0.73-dmd-win\lib\DD-gobject.lib+D:\D\dsss-0.73-dmd-win\lib\DD-gthread.lib+D:\D\dsss-0.73-dmd-win\lib\DD-gtk.lib+D:\D\dsss-0.73-dmd-win\lib\DD-gtkc.lib+D:\D\dsss-0.73-dmd-win\lib\DD-pango.lib+user32+kernel32/noi; OPTLINK (R) for Win32 Release 8.00.1 Copyright (C) Digital Mars 1989-2004 All rights reserved. D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegQueryValueExA@24 D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegCloseKey@4 D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegQueryInfoKeyA@48 D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegCreateKeyExA@36 D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegOpenKeyExA@20 D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegOpenKeyA@12 D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegDeleteKeyA@8 D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegSetValueExA@24 D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegDeleteValueA@8 D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegFlushKey@4 D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegEnumKeyExA@32 D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegEnumValueA@32 --- errorlevel 12 Process terminated with status 12 (0 minutes, 0 seconds) 12 errors, 0 warnings This is my sc.ini file: [Version] version=7.51 Build 020 [Environment] LIB=D:\d\dm\lib;D:\d\dmd\lib DFLAGS="-I%@P%\..\src\phobos" -Id:\d\dmd\import -Id:\D\dsss-0.73-dmd-win\include\d LINKCMD=%@P%\..\..\dm\bin\link.exe I already added in CodeBlock GtkD librarys and phobos library but this code doesn't work. Can someone help me ? |
November 22, 2007 Re: Phobos problem - compilation | ||||
---|---|---|---|---|
| ||||
Posted in reply to AnIHiL | AnIHiL wrote:
> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegQueryValueExA@24
> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegCloseKey@4
> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegQueryInfoKeyA@48
> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegCreateKeyExA@36
> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegOpenKeyExA@20
> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegOpenKeyA@12
> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegDeleteKeyA@8
> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegSetValueExA@24
> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegDeleteValueA@8
> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegFlushKey@4
> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegEnumKeyExA@32
> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegEnumValueA@32
These functions are in the Windows API, not part of phobos. I guess you need to link with some import libraries for user32.dll and/or kernel32.dll.
Thanks,
Nathan Reed
|
November 22, 2007 Re: Phobos problem - compilation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nathan Reed | Nathan Reed wrote:
> AnIHiL wrote:
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegQueryValueExA@24
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegCloseKey@4
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegQueryInfoKeyA@48
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegCreateKeyExA@36
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegOpenKeyExA@20
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegOpenKeyA@12
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegDeleteKeyA@8
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegSetValueExA@24
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegDeleteValueA@8
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegFlushKey@4
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegEnumKeyExA@32
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegEnumValueA@32
>
> These functions are in the Windows API, not part of phobos. I guess you need to link with some import libraries for user32.dll and/or kernel32.dll.
>
> Thanks,
> Nathan Reed
Isn't that what snn.lib is?
|
November 22, 2007 Re: Phobos problem - compilation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert Fraser | "Robert Fraser" <fraserofthenight@gmail.com> wrote in message news:fi4nbg$28s3$2@digitalmars.com... > Isn't that what snn.lib is? That's Digital Mars libc. |
November 22, 2007 Re: Phobos problem - compilation | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nathan Reed | Nathan Reed wrote:
> AnIHiL wrote:
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegQueryValueExA@24
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegCloseKey@4
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegQueryInfoKeyA@48
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegCreateKeyExA@36
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegOpenKeyExA@20
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegOpenKeyA@12
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegDeleteKeyA@8
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegSetValueExA@24
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegDeleteValueA@8
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegFlushKey@4
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegEnumKeyExA@32
>> D:\D\dmd\lib\phobos.lib(registry) Error 42: Symbol Undefined _RegEnumValueA@32
>
> These functions are in the Windows API, not part of phobos. I guess you need to link with some import libraries for user32.dll and/or kernel32.dll.
Oh and another thing, it looks like the functions are being name mangled, but the Windows API has a C interface, so the names shouldn't be mangled. I guess the declarations of these functions also need to be wrapped in extern(C). Maybe you are already linking with the right thing but it's not finding the functions due to the mangling issue.
Thanks,
Nathan Reed
|
November 23, 2007 Re: Phobos problem - compilation | ||||
---|---|---|---|---|
| ||||
Posted in reply to AnIHiL | Ok at last I figure it out :-) If someone have problem with > OPTLINK (R) for Win32 Release 8.00.1 > Copyright (C) Digital Mars 1989-2004 All rights reserved. > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegQueryValueExA@24 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegCloseKey@4 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegQueryInfoKeyA@48 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegCreateKeyExA@36 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegOpenKeyExA@20 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegOpenKeyA@12 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegDeleteKeyA@8 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegSetValueExA@24 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegDeleteValueA@8 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegFlushKey@4 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegEnumKeyExA@32 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegEnumValueA@32 > --- errorlevel 12 than include library advapi32.lib from: ..\dm\lib\advapi32.lib AnIHiL Wrote: > Hello, > > I copy one of the examples from GtkD project site: > > import gtk.MainWindow; > import gtk.Label; > import gtk.GtkD; > > void main(char[][] args) > { > GtkD.init(args); > MainWindow win = new MainWindow("Hello World"); > win.setDefaultSize(200, 100); > win.add(new Label("Hello World")); > win.showAll(); > > GtkD.main(); > } > > I use CodeBlock to compile it but I have an error. This is log from compilation: > > -------------- Build: Debug in asd --------------- > > Compiling: hello.d > Linking console executable: bin\Debug\asd.exe > D:\D\dmd\bin\..\..\dm\bin\link.exe obj\Debug\hello,bin\Debug\asd.exe,,D:\D\dmd\lib\phobos.lib+D:\D\dsss-0.73-dmd-win\lib\DD-atk.lib+D:\D\dsss-0.73-dmd-win\lib\DD-cairoLib.lib+D:\D\dsss-0.73-dmd-win\lib\DD-gdk.lib+D:\D\dsss-0.73-dmd-win\lib\DD-gdkpixbuf.lib+D:\D\dsss-0.73-dmd-win\lib\DD-glade.lib+D:\D\dsss-0.73-dmd-win\lib\DD-glib.lib+D:\D\dsss-0.73-dmd-win\lib\DD-gobject.lib+D:\D\dsss-0.73-dmd-win\lib\DD-gthread.lib+D:\D\dsss-0.73-dmd-win\lib\DD-gtk.lib+D:\D\dsss-0.73-dmd-win\lib\DD-gtkc.lib+D:\D\dsss-0.73-dmd-win\lib\DD-pango.lib+user32+kernel32/noi; > OPTLINK (R) for Win32 Release 8.00.1 > Copyright (C) Digital Mars 1989-2004 All rights reserved. > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegQueryValueExA@24 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegCloseKey@4 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegQueryInfoKeyA@48 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegCreateKeyExA@36 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegOpenKeyExA@20 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegOpenKeyA@12 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegDeleteKeyA@8 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegSetValueExA@24 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegDeleteValueA@8 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegFlushKey@4 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegEnumKeyExA@32 > D:\D\dmd\lib\phobos.lib(registry) > Error 42: Symbol Undefined _RegEnumValueA@32 > --- errorlevel 12 > Process terminated with status 12 (0 minutes, 0 seconds) > 12 errors, 0 warnings > > This is my sc.ini file: > [Version] > version=7.51 Build 020 > > [Environment] > LIB=D:\d\dm\lib;D:\d\dmd\lib > DFLAGS="-I%@P%\..\src\phobos" -Id:\d\dmd\import -Id:\D\dsss-0.73-dmd-win\include\d > LINKCMD=%@P%\..\..\dm\bin\link.exe > > I already added in CodeBlock GtkD librarys and phobos library but this code doesn't work. > > Can someone help me ? > |
Copyright © 1999-2021 by the D Language Foundation