FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compiling ...

 
Post new topic   Reply to topic     Forum Index -> MinWin
View previous topic :: View next topic  
Author Message
stjepan



Joined: 11 Apr 2005
Posts: 22
Location: Croatia

PostPosted: Tue Apr 19, 2005 12:15 pm    Post subject: Compiling ... Reply with quote

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
View user's profile Send private message
Carlos



Joined: 19 Mar 2004
Posts: 396
Location: Canyon, TX

PostPosted: Tue Apr 19, 2005 1:05 pm    Post subject: Reply with quote

You should post more information: plaform, compiler (version), command line, and what you're getting.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
stjepan



Joined: 11 Apr 2005
Posts: 22
Location: Croatia

PostPosted: Wed Apr 20, 2005 12:03 am    Post subject: Reply with quote

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
View user's profile Send private message
stjepan



Joined: 11 Apr 2005
Posts: 22
Location: Croatia

PostPosted: Wed Apr 20, 2005 12:21 am    Post subject: Reply with quote

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
View user's profile Send private message
stjepan



Joined: 11 Apr 2005
Posts: 22
Location: Croatia

PostPosted: Wed Apr 20, 2005 1:18 am    Post subject: Reply with quote

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
View user's profile Send private message
Carlos



Joined: 19 Mar 2004
Posts: 396
Location: Canyon, TX

PostPosted: Wed Apr 20, 2005 12:46 pm    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger MSN Messenger
stjepan



Joined: 11 Apr 2005
Posts: 22
Location: Croatia

PostPosted: Wed Apr 20, 2005 12:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> MinWin All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group