View previous topic :: View next topic |
Author |
Message |
stjepan
Joined: 11 Apr 2005 Posts: 22 Location: Croatia
|
Posted: Tue Apr 19, 2005 12:15 pm Post subject: Compiling ... |
|
|
I get a lot of linker errors when compiling. Can you give me some compile instructions, please? _________________ I speak a little English. I am beginner in programming. I know C++, C# and D. |
|
Back to top |
|
|
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Tue Apr 19, 2005 1:05 pm Post subject: |
|
|
You should post more information: plaform, compiler (version), command line, and what you're getting. |
|
Back to top |
|
|
stjepan
Joined: 11 Apr 2005 Posts: 22 Location: Croatia
|
Posted: Wed Apr 20, 2005 12:03 am Post subject: |
|
|
Windows XP
DMD v0.121
Output: Code: | E:\D\gui\minwin\myminwin>E:\D\dmd\bin\dmd.exe E:\D\gui\minwin\myminwin\obj\mymin
win.obj -ofmyminwin.exe lib\minwin.lib comdlg32.lib gdi32.lib E:\D\gui\minwin\my
minwin\obj\myminwin.obj
E:\D\dmd\bin\..\..\dm\bin\link.exe E:\D\gui\minwin\myminwin\obj\myminwin+E:\D\gu
i\minwin\myminwin\obj\myminwin,myminwin.exe,,lib\minwin.lib+comdlg32.lib+gdi32.l
ib+user32+kernel32/noi;
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
E:\D\gui\minwin\myminwin\obj\myminwin.obj(myminwin)
Error 42: Symbol Undefined _D6minwin4font4Font5_ctorFAaiE6minwin4font10FontWeig
htZC6minwin4font4Font
--- errorlevel 1
E:\D\gui\minwin\myminwin> |
_________________ I speak a little English. I am beginner in programming. I know C++, C# and D. |
|
Back to top |
|
|
stjepan
Joined: 11 Apr 2005 Posts: 22 Location: Croatia
|
Posted: Wed Apr 20, 2005 12:21 am Post subject: |
|
|
Now it works. Thanks for help, Carlos. _________________ I speak a little English. I am beginner in programming. I know C++, C# and D. |
|
Back to top |
|
|
stjepan
Joined: 11 Apr 2005 Posts: 22 Location: Croatia
|
Posted: Wed Apr 20, 2005 1:18 am Post subject: |
|
|
Code: | import minwin.all;
extern (C)
int MinWinMain(Application* app) {
Window win = new Window("Bug");
win.quitOnDestroy = true;
//auto Font font;
win.visible = true;
return app.enterEventLoop();
} | Output: Code: | E:\D\gui\minwin\myminwin>E:\D\dmd\bin\dmd.exe E:\D\gui\minwin\myminwin\obj\mymin
win.obj -ofmyminwin.exe lib\minwin.lib comdlg32.lib gdi32.lib -LL/exet:nt/su:win
dows:4.0 E:\D\gui\minwin\myminwin\obj\myminwin.obj
E:\D\dmd\bin\..\..\dm\bin\link.exe E:\D\gui\minwin\myminwin\obj\myminwin+E:\D\gu
i\minwin\myminwin\obj\myminwin,myminwin.exe,,lib\minwin.lib+comdlg32.lib+gdi32.l
ib+user32+kernel32/noiL/exet:nt/su:windows:4.0;
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
OPTLINK : Warning 9: Unknown Option : NOIL
E:\D\gui\minwin\myminwin\obj\myminwin.obj(myminwin)
Error 42: Symbol Undefined __nullext
E:\D\gui\minwin\myminwin\obj\myminwin.obj(myminwin)
Error 42: Symbol Undefined __ModuleInfo_6minwin3all
OPTLINK : Warning 134: No Start Address
--- errorlevel 2
E:\D\gui\minwin\myminwin> |
But if I delete '//' before 'auto Font...' : Code: | import minwin.all;
extern (C)
int MinWinMain(Application* app) {
Window win = new Window("Bug");
win.quitOnDestroy = true;
auto Font font;
win.visible = true;
return app.enterEventLoop();
} | It works well: Code: | E:\D\gui\minwin\myminwin>E:\D\dmd\bin\dmd.exe E:\D\gui\minwin\myminwin\obj\mymin
win.obj -ofmyminwin.exe lib\minwin.lib comdlg32.lib gdi32.lib -LL/exet:nt/su:win
dows:4.0 E:\D\gui\minwin\myminwin\obj\myminwin.obj
E:\D\dmd\bin\..\..\dm\bin\link.exe E:\D\gui\minwin\myminwin\obj\myminwin+E:\D\gu
i\minwin\myminwin\obj\myminwin,myminwin.exe,,lib\minwin.lib+comdlg32.lib+gdi32.l
ib+user32+kernel32/noiL/exet:nt/su:windows:4.0;
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
OPTLINK : Warning 9: Unknown Option : NOIL
E:\D\gui\minwin\myminwin> |
Every MinWin program needs Font declaration! Is it bug or something else? _________________ I speak a little English. I am beginner in programming. I know C++, C# and D. |
|
Back to top |
|
|
Carlos
Joined: 19 Mar 2004 Posts: 396 Location: Canyon, TX
|
Posted: Wed Apr 20, 2005 12:46 pm Post subject: |
|
|
stjepan wrote: | Output: Code: | E:\D\gui\minwin\myminwin>E:\D\dmd\bin\dmd.exe E:\D\gui\minwin\myminwin\obj\mymin
win.obj -ofmyminwin.exe lib\minwin.lib comdlg32.lib gdi32.lib -LL/exet:nt/su:win
dows:4.0 E:\D\gui\minwin\myminwin\obj\myminwin.obj
E:\D\dmd\bin\..\..\dm\bin\link.exe E:\D\gui\minwin\myminwin\obj\myminwin+E:\D\gu
i\minwin\myminwin\obj\myminwin,myminwin.exe,,lib\minwin.lib+comdlg32.lib+gdi32.l
ib+user32+kernel32/noiL/exet:nt/su:windows:4.0;
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
OPTLINK : Warning 9: Unknown Option : NOIL
E:\D\gui\minwin\myminwin\obj\myminwin.obj(myminwin)
Error 42: Symbol Undefined __nullext
E:\D\gui\minwin\myminwin\obj\myminwin.obj(myminwin)
Error 42: Symbol Undefined __ModuleInfo_6minwin3all
OPTLINK : Warning 134: No Start Address
--- errorlevel 2
|
|
There're two problems there: "-LL/exet:nt/su:windows:4.0" should only be "-L/exet:nt/su:windows:4.0". Also, for those two linking errors, you need to link app.obj.
Last edited by Carlos on Wed Apr 20, 2005 1:30 pm; edited 1 time in total |
|
Back to top |
|
|
stjepan
Joined: 11 Apr 2005 Posts: 22 Location: Croatia
|
Posted: Wed Apr 20, 2005 12:55 pm Post subject: |
|
|
Now it is fine: Code: | import minwin.all;
extern(C)
int MinWinMain(Application* app) {
(new Window("")).visible = true;
return app.enterEventLoop();
} | Thank you very, very, very much Carlos. _________________ I speak a little English. I am beginner in programming. I know C++, C# and D. |
|
Back to top |
|
|
|