Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old January 20, 2008, 15:10   #41
Zero
Apprentice
 
Join Date: Jan 2008
Posts: 83
Zero is on a distinguished road
Where is make supposed to go? My system drive is E:\, not the standard C:\. Would that require some kind of change?

I couldn't find make-mingw32.exe anywhere on my hard drive.
Zero is offline   Reply With Quote
Old January 20, 2008, 15:40   #42
zaimoni
Knight
 
zaimoni's Avatar
 
Join Date: Apr 2007
Posts: 590
zaimoni is on a distinguished road
Quote:
Originally Posted by Zero View Post
Where is make supposed to go? My system drive is E:\, not the standard C:\. Would that require some kind of change?
Very minor change -- to your PATH. There should be no difference in actual command-line usage. The primary bin directory for MingW32 should be on your PATH, and should also have installed to it:
* make.exe
* the binutils toolset (for the linker ld and assembler as, etc.)

Both of these are separate downloads from the MingW32 compilers.

To check whether the main MingW32 bin directory is on your path, try to run gcc --help. If that runs, installing the above packages should work if they aren't there already.

If not, you'll have to find gcc.exe [should be two copies, you want the one with the shorter directory to it], then use the System control to put the shorter directory on your PATH. I'd do this for all users if possible.
zaimoni is offline   Reply With Quote
Old January 20, 2008, 22:16   #43
Zero
Apprentice
 
Join Date: Jan 2008
Posts: 83
Zero is on a distinguished road
> To check whether the main MingW32 bin directory is on your
> path, try to run gcc --help.

That works.

> The primary bin directory for MingW32 should be on your PATH,

It is.

> and should also have installed to it:
> * make.exe

There is a file in MinGW\bin called mingw32-make.exe. There is no file called make.exe anywhere.

> * the binutils toolset (for the linker ld and assembler as, etc.)

Also in MinGW\bin there is as.exe and ld.exe.

I still don't know what to do at this point.
Zero is offline   Reply With Quote
Old January 20, 2008, 22:22   #44
andrewdoull
Unangband maintainer
 
andrewdoull's Avatar
 
Join Date: Apr 2007
Location: Sydney, Australia
Age: 45
Posts: 872
andrewdoull is on a distinguished road
Quote:
Originally Posted by Zero View Post
> To check whether the main MingW32 bin directory is on your
> path, try to run gcc --help.

That works.

> The primary bin directory for MingW32 should be on your PATH,

It is.

> and should also have installed to it:
> * make.exe

There is a file in MinGW\bin called mingw32-make.exe. There is no file called make.exe anywhere.

> * the binutils toolset (for the linker ld and assembler as, etc.)

Also in MinGW\bin there is as.exe and ld.exe.

I still don't know what to do at this point.
Ensure that mingw\bin is in your path environmental variable.

Cd into the angband\src directory.

Use the command

mingw32-make.exe -f makefile.win

That should do it IIRC (mingw32-make.exe is the mingw equivalent of make).


Andrew
__________________
The Roflwtfzomgbbq Quylthulg summons L33t Paladins -more-
In UnAngband, the level dives you.
ASCII Dreams: http://roguelikedeveloper.blogspot.com
Unangband: http://unangband.blogspot.com
andrewdoull is offline   Reply With Quote
Old January 20, 2008, 23:08   #45
zaimoni
Knight
 
zaimoni's Avatar
 
Join Date: Apr 2007
Posts: 590
zaimoni is on a distinguished road
Quote:
Originally Posted by Zero View Post
There is a file in MinGW\bin called mingw32-make.exe. There is no file called make.exe anywhere.
That's it.

Rename or copy that file to make.exe.
zaimoni is offline   Reply With Quote
Old January 22, 2008, 00:08   #46
Zero
Apprentice
 
Join Date: Jan 2008
Posts: 83
Zero is on a distinguished road
Okay, I rechecked the path system variable, opened a DOS prompt, cd'ed to the \src directory, and pasted in Andrew's command. It generated a lot of output text to the screen, which overflowed the window's history buffer, and stopped after maybe 8 seconds. After increasing the window buffer to catch all the output, I ran the command again, which generated this, and much faster:

[EDIT] These errors look the same as the errors that eclipse generates.

[EDIT] Updated the project in eclipse, then tried to rebuild, using Andrew's instructions in the first post. Eclipse generates the same errors.

[EDIT] Removed a reference to the nightly builds. I'm not using the nightly builds, I'm trying to build the program myself.

[EDIT] After updating, I notice that the modification dates in the src directory for the source and header files are all still 1/6/08. Have there been any changes since then? Shouldn't those changes result in changed modification dates?

Code:
E:\workspace\Angband\src>mingw32-make.exe -f makefile.win
gcc -o angband.exe attack.o birth.o cave.o compress.o cmd0.o cmd1.o cmd2.o cmd3.
o cmd4.o cmd5.o cmd6.o cmd-obj.o death.o debug.o dungeon.o effects.o files.o gam
e-cmd.o game-event.o generate.o history.o init1.o init2.o load.o loadsave.o mele
e1.o melee2.o monster1.o monster2.o object1.o object2.o obj-info.o obj-make.o op
tion.o randart.o randname.o pathfind.o score.o signals.o save.o spells1.o spells
2.o squelch.o store.o tables.o trap.o ui.o ui-event.o ui-menu.o util.o variable.
o wiz-spoil.o wiz-stats.o wizard.o x-spell.o xtra1.o xtra2.o xtra3.o z-file.o z-
form.o z-msg.o z-quark.o z-rand.o z-term.o z-type.o z-util.o z-virt.o z-blockfil
e.o z-smap.o  win/angband.res main-win.o win/readdib.o -mno-cygwin -e _mainCRTSt
artup
main-win.o:main-win.c:(.text+0x304): undefined reference to `GetPaletteEntries@1
6'
main-win.o:main-win.c:(.text+0x3db): undefined reference to `CreatePalette@4'
main-win.o:main-win.c:(.text+0x418): undefined reference to `SelectPalette@12'
main-win.o:main-win.c:(.text+0x423): undefined reference to `RealizePalette@4'
main-win.o:main-win.c:(.text+0x481): undefined reference to `SelectPalette@12'
main-win.o:main-win.c:(.text+0x4f7): undefined reference to `DeleteObject@4'
main-win.o:main-win.c:(.text+0x604): undefined reference to `RemoveFontResourceA
@4'
main-win.o:main-win.c:(.text+0x73d): undefined reference to `DeleteObject@4'
main-win.o:main-win.c:(.text+0x75e): undefined reference to `AddFontResourceA@4'

main-win.o:main-win.c:(.text+0x810): undefined reference to `CreateFontA@56'
main-win.o:main-win.c:(.text+0x85c): undefined reference to `SelectObject@8'
main-win.o:main-win.c:(.text+0x873): undefined reference to `GetTextMetricsA@8'
main-win.o:main-win.c:(.text+0x882): undefined reference to `SelectObject@8'
main-win.o:main-win.c:(.text+0xf90): undefined reference to `SetBkColor@8'
main-win.o:main-win.c:(.text+0xfa5): undefined reference to `SelectObject@8'
main-win.o:main-win.c:(.text+0xfde): undefined reference to `ExtTextOutA@32'
main-win.o:main-win.c:(.text+0x1086): undefined reference to `PlaySoundA@12'
main-win.o:main-win.c:(.text+0x12ec): undefined reference to `SetBkColor@8'
main-win.o:main-win.c:(.text+0x1301): undefined reference to `SelectObject@8'
main-win.o:main-win.c:(.text+0x133a): undefined reference to `ExtTextOutA@32'
main-win.o:main-win.c:(.text+0x13d3): undefined reference to `SetBkColor@8'
main-win.o:main-win.c:(.text+0x1406): undefined reference to `SetTextColor@8'
main-win.o:main-win.c:(.text+0x141b): undefined reference to `SelectObject@8'
main-win.o:main-win.c:(.text+0x146f): undefined reference to `ExtTextOutA@32'
main-win.o:main-win.c:(.text+0x14f5): undefined reference to `ExtTextOutA@32'
main-win.o:main-win.c:(.text+0x1596): undefined reference to `ExtTextOutA@32'
main-win.o:main-win.c:(.text+0x1658): undefined reference to `CreateCompatibleDC
@4'
main-win.o:main-win.c:(.text+0x1672): undefined reference to `SelectObject@8'
main-win.o:main-win.c:(.text+0x1721): undefined reference to `BitBlt@36'
main-win.o:main-win.c:(.text+0x1766): undefined reference to `BitBlt@36'
main-win.o:main-win.c:(.text+0x17ab): undefined reference to `BitBlt@36'
main-win.o:main-win.c:(.text+0x1870): undefined reference to `SetStretchBltMode@
8'
main-win.o:main-win.c:(.text+0x18c0): undefined reference to `StretchBlt@44'
main-win.o:main-win.c:(.text+0x1928): undefined reference to `StretchBlt@44'
main-win.o:main-win.c:(.text+0x1950): undefined reference to `SetStretchBltMode@
8'
main-win.o:main-win.c:(.text+0x19a3): undefined reference to `StretchBlt@44'
main-win.o:main-win.c:(.text+0x19ee): undefined reference to `SelectObject@8'
main-win.o:main-win.c:(.text+0x19fc): undefined reference to `DeleteDC@4'
main-win.o:main-win.c:(.text+0x1a39): undefined reference to `CreateCompatibleDC
@4'
main-win.o:main-win.c:(.text+0x1a53): undefined reference to `SelectObject@8'
main-win.o:main-win.c:(.text+0x1a6d): undefined reference to `SelectObject@8'
main-win.o:main-win.c:(.text+0x1a7b): undefined reference to `DeleteDC@4'
main-win.o:main-win.c:(.text+0x2135): undefined reference to `SelectPalette@12'
main-win.o:main-win.c:(.text+0x2140): undefined reference to `RealizePalette@4'
main-win.o:main-win.c:(.text+0x2cbb): undefined reference to `GetOpenFileNameA@4
'
main-win.o:main-win.c:(.text+0x323c): undefined reference to `GetOpenFileNameA@4
'
main-win.o:main-win.c:(.text+0x33f4): undefined reference to `SelectPalette@12'
main-win.o:main-win.c:(.text+0x33ff): undefined reference to `RealizePalette@4'
main-win.o:main-win.c:(.text+0x3b73): undefined reference to `DeleteObject@4'
main-win.o:main-win.c:(.text+0x3c1e): undefined reference to `DeleteObject@4'
main-win.o:main-win.c:(.text+0x3cb7): undefined reference to `DeleteObject@4'
main-win.o:main-win.c:(.text+0x4082): undefined reference to `GetDeviceCaps@8'
main-win.o:main-win.c:(.text+0x40a0): undefined reference to `GetDeviceCaps@8'
main-win.o:main-win.c:(.text+0x48fd): undefined reference to `CreateSolidBrush@4
'
main-win.o:main-win.c:(.text+0x4aa1): undefined reference to `GetStockObject@4'
win/readdib.o:readdib.c:(.text+0x39e): undefined reference to `CreatePalette@4'
win/readdib.o:readdib.c:(.text+0x3d3): undefined reference to `SelectPalette@12'

win/readdib.o:readdib.c:(.text+0x3e6): undefined reference to `RealizePalette@4'

win/readdib.o:readdib.c:(.text+0x42a): undefined reference to `CreateDIBitmap@24
'
win/readdib.o:readdib.c:(.text+0x44e): undefined reference to `SelectPalette@12'

win/readdib.o:readdib.c:(.text+0x45f): undefined reference to `RealizePalette@4'

win/readdib.o:readdib.c:(.text+0x5a1): undefined reference to `DeleteObject@4'
win/readdib.o:readdib.c:(.text+0x5cd): undefined reference to `GetStockObject@4'

win/readdib.o:readdib.c:(.text+0x61b): undefined reference to `DeleteObject@4'
win/readdib.o:readdib.c:(.text+0x634): undefined reference to `DeleteObject@4'
collect2: ld returned 1 exit status
mingw32-make.exe: *** [angband.exe] Error 1

Last edited by Zero; January 22, 2008 at 00:31.
Zero is offline   Reply With Quote
Old January 22, 2008, 01:10   #47
zaimoni
Knight
 
zaimoni's Avatar
 
Join Date: Apr 2007
Posts: 590
zaimoni is on a distinguished road
Quote:
Originally Posted by Zero View Post
Okay, I rechecked the path system variable, opened a DOS prompt, cd'ed to the \src directory, and pasted in Andrew's command. ....

Code:
E:\workspace\Angband\src>mingw32-make.exe -f makefile.win
This is not correct usage of makefile.win for MingW32. Per the instructions in Makefile.win, try
Code:
E:\workspace\Angband\src>mingw32-make.exe -f makefile.win MINGW=yes
(This default could be forgiven if the CygWin default actually worked, but as CygWin's devteam has intentionally broken --mno-cygwin for anything using assert() I'm not certain what the point will be of retaining default CygWin for V3.1.0 . Until the Windows front end becomes legal to link with CygWin, of course.)
zaimoni is offline   Reply With Quote
Old January 22, 2008, 02:05   #48
Zero
Apprentice
 
Join Date: Jan 2008
Posts: 83
Zero is on a distinguished road
Thumbs up

Well, what do you know! It works! Thanks, zaimoni.
Zero is offline   Reply With Quote
Old January 24, 2008, 04:30   #49
jld
Rookie
 
Join Date: Jan 2008
Posts: 6
jld is on a distinguished road
Quote:
Originally Posted by takkaria View Post
*coughs* http://cygwin.com/license.html

The cygwin DLL (which gets linked into your binary if you use -mno-cygwin) is GPL with an exception for applications with OSI-free licences. Angband isn't one of those, so you have no licence to distribute a cygwin-compiled version of the game under the Angband licence...

Not that I suspect anyone will care, anyway. Licencing sucks.
Actually, I think you're backwards (and I'd hate for Cygwin to get a bad name and/or have its support revoked over a misunderstanding...) -mno-cgywin does NOT link the cygwin DLL. (Thus, the 'no cygwin' in the name). With this switch, your application does NOT require Cygwin to be installed, and it does not link against/require the cygwin DLL. The best documentation I could find is pretty out of date, but it might be useful to read

It is possible and pretty straightforward to compile Angband with Cygwin. I had to make some changes to the Makefile.win that shipped with 3.0.9 to get it to work... if there is interest, I will try to make them available.

(edit: Change line 55, which starts with LIBS = to start with LIBS +=, add a new line "CFLAGS += -mno-cygwin", and change line 60 (previously 59) to add the source files: "win/readdib.c win/readdib.h" (no quotes) and 3.0.9 should compile with cygwin as per the instructions on the official wiki)
jld is offline   Reply With Quote
Old January 24, 2008, 16:38   #50
zaimoni
Knight
 
zaimoni's Avatar
 
Join Date: Apr 2007
Posts: 590
zaimoni is on a distinguished road
Quote:
Originally Posted by jld View Post
Actually, I think you're backwards (and I'd hate for Cygwin to get a bad name and/or have its support revoked over a misunderstanding...) -mno-cygwin does NOT link the cygwin DLL.
The current Windows front-end still loses, as the CygWin license explicitly has the OSI requirement for libcygwin.a as well (which is statically linked in when libcygwin1.dll is not dynamically linked in).

I think the long-term plan is to get main-win.c compatible, however. The GPL poisoning for non-OSI code takes effect only on distribution.
Quote:
Originally Posted by jld View Post
It is possible and pretty straightforward to compile Angband with Cygwin. I had to make some changes to the Makefile.win that shipped with 3.0.9 to get it to work... if there is interest, I will try to make them available.

(edit: Change line 55, which starts with LIBS = to start with LIBS +=, add a new line "CFLAGS += -mno-cygwin", and change line 60 (previously 59) to add the source files: "win/readdib.c win/readdib.h" (no quotes) and 3.0.9 should compile with cygwin as per the instructions on the official wiki)
Line 60 change is already in SVN, fine.

Line 55 change exactly reverts the effective LIBS to Zaiband's Makefile.cyg; it should be safe.

I think the CFLAGS change is the critical one, but can't test it. My other native MingW32 projects also apply -mno-cygwin when compiling *.o files, so it may be the breaking change.
zaimoni is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:33.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.