Tom's Hardware > Forum > Games General > Games General Discussions > [MPRDB] Compiling for Windows using MinGW

[MPRDB] Compiling for Windows using MinGW

Forum Games General : Games General Discussions - [MPRDB] Compiling for Windows using MinGW

Tom's Hardware: Over 1.4 million members in 6 different countries available to answer all your high-tech questions. Sign up now! Its free!
Word :    Username :           
 

Archived from groups: rec.games.roguelike.misc (More info?)

 

Since I saw there wasn't Windows binary I thought I would try to
building one using MinGW. heh the hardest part was installing MinGW :)

Anyway, here are the errors I get. I'm not familiar with compiling
software, but I have done it a few times in the past on Linux. I
haven't gone through this output in detail yet so I bet I'm missing a
few things as indicated on the first two lines.

Thanks for any help with the errors.

Will

=== Begin Errors ===

$ make
gcc -c -g -Wall -Wstrict-prototypes -Wwrite-strings -Wmissing-prototypes
-Werror
-Wredundant-decls -Wunreachable-code -DMAJVERS=1
-DMINVERS=4 -c -o display.o
display.c
display.c:29:21: ncurses.h: No such file or directory
display.c:31:19: panel.h: No such file or directory
display.c:35: error: syntax error before '*' token
display.c:35: warning: type defaults to `int' in declaration of
`status_window'
display.c:35: warning: data definition has no type or storage class
display.c:36: error: syntax error before '*' token
display.c:36: warning: type defaults to `int' in declaration of
`world_window'
display.c:36: warning: data definition has no type or storage class
display.c:37: error: syntax error before '*' token
display.c:37: warning: type defaults to `int' in declaration of
`message_window'
display.c:37: warning: data definition has no type or storage class
display.c:38: error: syntax error before '*' token
display.c:38: warning: type defaults to `int' in declaration of
`status_panel'
display.c:38: warning: data definition has no type or storage class
display.c:39: error: syntax error before '*' token
display.c:39: warning: type defaults to `int' in declaration of
`world_panel'
display.c:39: warning: data definition has no type or storage class
display.c:40: error: syntax error before '*' token
display.c:40: warning: type defaults to `int' in declaration of
`message_panel'
display.c:40: warning: data definition has no type or storage class
display.c:47: error: syntax error before "colour_attrs"
display.c:47: warning: type defaults to `int' in declaration of
`colour_attrs'
display.c:50: warning: implicit declaration of function `COLOR_PAIR'
display.c:50: error: `A_BOLD' undeclared here (not in a function)
display.c:50: error: initializer element is not constant
display.c:50: error: (near initialization for `colour_attrs[1]')
display.c:51: error: initializer element is not constant
display.c:51: error: (near initialization for `colour_attrs[2]')
display.c:52: error: initializer element is not constant
display.c:52: error: (near initialization for `colour_attrs[3]')
display.c:53: error: initializer element is not constant
display.c:53: error: (near initialization for `colour_attrs[4]')
display.c:54: error: initializer element is not constant
display.c:54: error: (near initialization for `colour_attrs[5]')
display.c:55: error: initializer element is not constant
display.c:55: error: (near initialization for `colour_attrs[6]')
display.c:56: error: initializer element is not constant
display.c:56: error: (near initialization for `colour_attrs[7]')
display.c:57: error: initializer element is not constant
display.c:57: error: (near initialization for `colour_attrs[8]')
display.c:58: error: initializer element is not constant
display.c:58: error: (near initialization for `colour_attrs[9]')
display.c:59: error: initializer element is not constant
display.c:59: error: (near initialization for `colour_attrs[10]')
display.c:60: error: initializer element is not constant
display.c:60: error: (near initialization for `colour_attrs[11]')
display.c:61: error: initializer element is not constant
display.c:61: error: (near initialization for `colour_attrs[12]')
display.c:62: error: initializer element is not constant
display.c:62: error: (near initialization for `colour_attrs[13]')
display.c:64: error: initializer element is not constant
display.c:64: error: (near initialization for `colour_attrs[14]')
display.c:64: warning: data definition has no type or storage class
display.c:68: error: syntax error before "monster_char"
display.c:68: warning: type defaults to `int' in declaration of
`monster_char'
display.c:68: warning: data definition has no type or storage class
display.c: In function `draw_status_line':
display.c:76: warning: implicit declaration of function `mvwprintw'
display.c: At top level:
display.c:105: error: syntax error before "monster_char"
display.c:106: warning: return type defaults to `int'
display.c: In function `draw_world':
display.c:129: warning: implicit declaration of function `mvwaddch'
display.c:129: warning: redundant redeclaration of 'mvwaddch'
display.c:129: warning: previous implicit declaration of 'mvwaddch' was here
display.c:129: warning: redundant redeclaration of 'mvwaddch'
display.c:129: warning: previous implicit declaration of 'mvwaddch' was here
display.c:129: warning: redundant redeclaration of 'mvwaddch'
display.c:129: warning: previous implicit declaration of 'mvwaddch' was here
display.c:129: warning: redundant redeclaration of 'mvwaddch'
display.c:129: warning: previous implicit declaration of 'mvwaddch' was here
display.c:129: warning: redundant redeclaration of 'mvwaddch'
display.c:129: warning: previous implicit declaration of 'mvwaddch' was here
display.c:129: warning: redundant redeclaration of 'mvwaddch'
display.c:129: warning: previous implicit declaration of 'mvwaddch' was here
display.c: In function `press_enter':
display.c:171: warning: implicit declaration of function `wgetch'
display.c: In function `display_update':
display.c:191: warning: implicit declaration of function `update_panels'
display.c:192: warning: implicit declaration of function `doupdate'
display.c: In function `display_init':
display.c:197: warning: implicit declaration of function `initscr'
display.c:198: warning: implicit declaration of function `noecho'
display.c:199: warning: implicit declaration of function `cbreak'
display.c:200: warning: implicit declaration of function `start_color'
display.c:201: warning: implicit declaration of function `init_pair'
display.c:201: error: `COLOR_YELLOW' undeclared (first use in this function)
display.c:201: error: (Each undeclared identifier is reported only once
display.c:201: error: for each function it appears in.)
display.c:201: error: `COLOR_BLACK' undeclared (first use in this function)
display.c:202: error: `COLOR_RED' undeclared (first use in this function)
display.c:203: error: `COLOR_GREEN' undeclared (first use in this function)
display.c:204: error: `COLOR_BLUE' undeclared (first use in this function)
display.c:206: error: `COLOR_MAGENTA' undeclared (first use in this
function)
display.c:207: error: `COLOR_CYAN' undeclared (first use in this function)
display.c:212: warning: implicit declaration of function `newwin'
display.c:212: warning: assignment makes pointer from integer without a cast
display.c:213: warning: implicit declaration of function `new_panel'
display.c:213: warning: assignment makes pointer from integer without a cast
display.c:214: warning: assignment makes pointer from integer without a cast
display.c:215: warning: assignment makes pointer from integer without a cast
display.c:216: warning: assignment makes pointer from integer without a cast
display.c:217: warning: assignment makes pointer from integer without a cast
display.c:218: warning: implicit declaration of function `wclear'
display.c:221: warning: implicit declaration of function `scrollok'
display.c:221: error: `FALSE' undeclared (first use in this function)
display.c:223: error: `TRUE' undeclared (first use in this function)
display.c:224: warning: implicit declaration of function `idcok'
display.c:76: warning: redundant redeclaration of 'mvwprintw'
display.c:76: warning: previous implicit declaration of 'mvwprintw' was here
display.c:230: warning: implicit declaration of function `wmove'
display.c:191: warning: redundant redeclaration of 'update_panels'
display.c:191: warning: previous implicit declaration of 'update_panels'
was her
e
display.c:192: warning: redundant redeclaration of 'doupdate'
display.c:192: warning: previous implicit declaration of 'doupdate' was here
display.c: In function `read_input':
display.c:240: warning: implicit declaration of function `echo'
display.c:243: warning: implicit declaration of function `wgetnstr'
display.c:198: warning: redundant redeclaration of 'noecho'
display.c:198: warning: previous implicit declaration of 'noecho' was here
display.c: In function `print_msg':
display.c:259: warning: implicit declaration of function `vw_printw'
display.c: In function `inv_select':
display.c:171: warning: redundant redeclaration of 'wgetch'
display.c:171: warning: previous implicit declaration of 'wgetch' was here
display.c: In function `select_dir':
display.c:171: warning: redundant redeclaration of 'wgetch'
display.c:171: warning: previous implicit declaration of 'wgetch' was here
display.c: In function `get_command':
display.c:171: warning: redundant redeclaration of 'wgetch'
display.c:171: warning: previous implicit declaration of 'wgetch' was here
display.c: In function `display_shutdown':
display.c:512: warning: implicit declaration of function `clear'
display.c:513: warning: implicit declaration of function `refresh'
display.c:514: warning: implicit declaration of function `endwin'
display.c: In function `getYN':
display.c:171: warning: redundant redeclaration of 'wgetch'
display.c:171: warning: previous implicit declaration of 'wgetch' was here
display.c: In function `getyn':
display.c:171: warning: redundant redeclaration of 'wgetch'
display.c:171: warning: previous implicit declaration of 'wgetch' was here
display.c: In function `print_help':
display.c:171: warning: redundant redeclaration of 'wgetch'
display.c:171: warning: previous implicit declaration of 'wgetch' was here
make: *** [display.o] Error 1

Sponsored Links
Register or log in to remove.

Archived from groups: rec.games.roguelike.misc (More info?)

 

In article <4322011e$0$18647$14726298@news.sunsite.dk>,
Will Shattuck <willshattuck.nospam@nospam.gmail.com> wrote:
>Since I saw there wasn't Windows binary I thought I would try to
>building one using MinGW. heh the hardest part was installing MinGW :)
>
>Anyway, here are the errors I get. I'm not familiar with compiling
>software, but I have done it a few times in the past on Linux. I
>haven't gone through this output in detail yet so I bet I'm missing a
>few things as indicated on the first two lines.
>
>Thanks for any help with the errors.
>
>Will
>
>=== Begin Errors ===
>
>$ make
>gcc -c -g -Wall -Wstrict-prototypes -Wwrite-strings -Wmissing-prototypes
>-Werror
> -Wredundant-decls -Wunreachable-code -DMAJVERS=1
>-DMINVERS=4 -c -o display.o
> display.c
>display.c:29:21: ncurses.h: No such file or directory
>display.c:31:19: panel.h: No such file or directory

It sounds like you either don't have ncurses installed, or it isn't in
your include path. Once those two header files can be found, I'll bet
the majority of the rest of the errors go away.

I don't know where one would find an ncurses library for MinGW, but that
is more likely due to my ignorance than the lack of such a thing.

-Andrew ()

Reply to Anonymous

Archived from groups: rec.games.roguelike.misc (More info?)

 

Andrew Patrick Schoonmaker wrote:
>
> It sounds like you either don't have ncurses installed, or it isn't in
> your include path. Once those two header files can be found, I'll bet
> the majority of the rest of the errors go away.
>
> I don't know where one would find an ncurses library for MinGW, but that
> is more likely due to my ignorance than the lack of such a thing.
>
> -Andrew ()

kewl. the package is called pdcurses and is on the MinGW SourceForge
site. I did have to copy curses.h to ncurses.h so the first errors are
gone. Now I'm getting these and I cannot make heads or tails out of them.

=== Begin Errors ===
$ make
gcc -c -g -Wall -Wstrict-prototypes -Wwrite-strings -Wmissing-prototypes
-Werror -Wredundant-decls -Wunreachable-code -DMAJVERS=1 -DMINVERS=4
-c -o display.o display.c
display.c: In function `draw_status_line':
display.c:76: warning: passing arg 4 of `mvwprintw' discards qualifiers
from pointer target type
display.c:77: warning: passing arg 4 of `mvwprintw' discards qualifiers
from pointer target type
display.c:78: warning: passing arg 4 of `mvwprintw' discards qualifiers
from pointer target type
display.c:79: warning: passing arg 4 of `mvwprintw' discards qualifiers
from pointer target type
display.c:80: warning: passing arg 4 of `mvwprintw' discards qualifiers
from pointer target type
display.c:81: warning: passing arg 4 of `mvwprintw' discards qualifiers
from pointer target type
display.c:82: warning: passing arg 4 of `mvwprintw' discards qualifiers
from pointer target type
display.c:83: warning: passing arg 4 of `mvwprintw' discards qualifiers
from pointer target type
display.c:84: warning: passing arg 4 of `mvwprintw' discards qualifiers
from pointer target type
display.c:85: warning: passing arg 4 of `mvwprintw' discards qualifiers
from pointer target type
display.c: In function `display_init':
display.c:227: warning: passing arg 4 of `mvwprintw' discards qualifiers
from pointer target type
display.c:228: warning: passing arg 4 of `mvwprintw' discards qualifiers
from pointer target type
display.c:229: warning: passing arg 4 of `mvwprintw' discards qualifiers
from pointer target type
display.c:224: warning: statement with no effect
display.c:225: warning: statement with no effect
display.c:226: warning: statement with no effect
display.c: In function `print_msg':
display.c:259: warning: implicit declaration of function `vw_printw'
make: *** [display.o] Error 1

Reply to Anonymous

Archived from groups: rec.games.roguelike.misc (More info?)

 

Will Shattuck <willshattuck.nospam@nospam.gmail.com> wrote:
>kewl. the package is called pdcurses and is on the MinGW SourceForge
>site. I did have to copy curses.h to ncurses.h so the first errors are
>gone. Now I'm getting these and I cannot make heads or tails out of them.

Let's see...

>=== Begin Errors ===
>$ make
>gcc -c -g -Wall -Wstrict-prototypes -Wwrite-strings -Wmissing-prototypes
>-Werror -Wredundant-decls -Wunreachable-code -DMAJVERS=1 -DMINVERS=4
>-c -o display.o display.c
>display.c: In function `draw_status_line':
>display.c:76: warning: passing arg 4 of `mvwprintw' discards qualifiers
>from pointer target type
[lots more of this warning]

Bleh. This is the same thing that caught people on OS X - a curses
implementation which doesn't make proper use of "const" in its function
prototypes, so compilers which care about potential write accesses to
string constants will bitch.

>display.c:224: warning: statement with no effect
>display.c:225: warning: statement with no effect
>display.c:226: warning: statement with no effect

.... These are curious. Again, this appears to be down to a peculiarity
of PDCurses.

My advice to you would be "Remove the -Werror flag from CFLAGS".
--
Martin Read - my opinions are my own. share them if you wish.
\_\/_/ in the metal and blood in the scent and mascara on a backcloth of
\ / lashes and scars in a flood of your tears in sackcloth and ashes
\/ -- Sisters of Mercy, "Flood I"

Reply to Anonymous

Archived from groups: rec.games.roguelike.misc (More info?)

 

On Fri, 09 Sep 2005 21:45:38 -0000, aps@turing.cs.hmc.edu (Andrew
Patrick Schoonmaker) wrote:

>>
>>=== Begin Errors ===
>>
>>$ make
>>gcc -c -g -Wall -Wstrict-prototypes -Wwrite-strings -Wmissing-prototypes
>>-Werror
>> -Wredundant-decls -Wunreachable-code -DMAJVERS=1
>>-DMINVERS=4 -c -o display.o
>> display.c
>>display.c:29:21: ncurses.h: No such file or directory
>>display.c:31:19: panel.h: No such file or directory
>
>It sounds like you either don't have ncurses installed, or it isn't in
>your include path. Once those two header files can be found, I'll bet
>the majority of the rest of the errors go away.
>
>I don't know where one would find an ncurses library for MinGW, but that
>is more likely due to my ignorance than the lack of such a thing.
>

it should be using curses.h instead of ncruses.h for portability.
when ncurses installs it creates a symlink to curses.h so curses.h
will always work regardless of ncurses, pdcurses, curses or or other
curses implementations.

-Wwrite-strings is bad too :) -Wall -Werrror -std=c99 -Wpedantic are
all that should be required..



- Stu : Email via http://public.xdi.org/=stu

Reply to Anonymous

Archived from groups: rec.games.roguelike.misc (More info?)

 

Stu George <fakeaddress@fakedomain.com> wrote:
>-Wwrite-strings is bad too :) -Wall -Werrror -std=c99 -Wpedantic are
>all that should be required..

The warnings list isn't changing; it's there to catch certain kinds of
stupidity on my part. I take the point about ncurses.h vs. curses.h,
however.
--
Martin Read - my opinions are my own. share them if you wish.
\_\/_/ in the metal and blood in the scent and mascara on a backcloth of
\ / lashes and scars in a flood of your tears in sackcloth and ashes
\/ -- Sisters of Mercy, "Flood I"

Reply to Anonymous
Tom's Hardware > Forum > Games General > Games General Discussions > [MPRDB] Compiling for Windows using MinGW
Go to:

There are 1154 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
Sponsored links
  • Ask the community now
  • Publish
Ad
They won a badge
Join us in greeting them