.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Programming (http://forums.bots-united.com/forumdisplay.php?f=25)
-   -   How to use MinGW? (http://forums.bots-united.com/showthread.php?t=4499)

The Storm 18-09-2005 22:30

How to use MinGW?
 
Today I get the MinGW full pack. I now know how to compile a single .cpp source but when I try to use makefiles and type the command "make" it return the massege:
Code:

'make' is not recognized as an
operable program or batch file.

The question is how to use MinGW with make files?

sfx1999 19-09-2005 02:26

Re: How to use MinGW?
 
Install MSYS and use it with MinGW. It has make in it.

Whistler 21-09-2005 11:17

Re: How to use MinGW?
 
Quote:

Originally Posted by THE_STORM
Today I get the MinGW full pack. I now know how to compile a single .cpp source but when I try to use makefiles and type the command "make" it return the massege:
Code:

'make' is not recognized as an
operable program or batch file.

The question is how to use MinGW with make files?

the command in current version of MinGW is "mingw32-make"

The Storm 21-09-2005 22:18

Re: How to use MinGW?
 
Yea but I have downloaded the full pack ~50mb for Windows. And in this pack there is not any kind of make.exe file even mingw32-make.exe was not there. Rick had gived to me a link to download mingw32-make.exe but I wonder why this has not be included in ot the this "Full Pack"?

sfx1999 21-09-2005 22:25

Re: How to use MinGW?
 
Use MSYS. Trust me.

Whistler 22-09-2005 04:52

Re: How to use MinGW?
 
I'd recommend this one for HL stuff:

http://prdownloads.sourceforge.net/m...1.exe?download

and using MSYS is also a good idea, but you will need to know some UNIX basics.

sfx1999 23-09-2005 02:35

Re: How to use MinGW?
 
I have heard MinGW's stock make sucks. MSYS has a better one built in.

The Storm 08-10-2005 22:47

Re: How to use MinGW?
 
OK now I have anoder problem...
All it compile OK but when I try the EPB in game it just crash but if I use it as metamod plugin it work OK. I think that there is some problem with the .def file.
Here the makefile:
Quote:

#
# E[POD]bot makefile for MingW32
#

CPP = g++

CPPFLAGS = -march=pentium4 -O2 -w -I./hlsdk -I./metamod

OBJ=bot.o bot_ai.o bot_chat.o bot_client.o bot_combat.o bot_globals.o bot_navigate.o bot_sounds.o compress.o dll.o engine.o log.o linkfunc.o meta_api.o namefunc.o util.o waypoint.o

EPB.dll: ${OBJ}
dllwrap -s --add-stdcall-alias --def epb.def --driver-name g++ -o EPB.dll ${OBJ}

clean:
-del *.o
-del *.dll

%.o: %.cpp
${CPP} ${CPPFLAGS} -c $< -o $@

%.o: %.c
${CPP} ${CPPFLAGS} -c $< -o $@

Here the .def file:
Quote:

LIBRARY EPB
EXPORTS
GiveFnptrsToDll @1
SECTIONS
.data READ WRITE
When linking it come the error:
Quote:

dlltool: Syntax error in def file epb.def:4
Warning: resolving _GiveFnptrsToDll by linking to _GiveFnptrsToDll@8
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups
dlltool: Syntax error in def file epb.def:4
Warning: resolving _GiveFnptrsToDll by linking to _GiveFnptrsToDll@8
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups
What I must do?

Whistler 09-10-2005 13:19

Re: How to use MinGW?
 
You'll need this version for non-Metamod HL stuff:
http://prdownloads.sourceforge.net/m...1.exe?download

or, use the method which the Metamod-p is using. But this will make your DLL file much bigger.

The Storm 09-10-2005 13:24

Re: How to use MinGW?
 
Thanks but I wonder why with version 4.1 it crash?

Whistler 09-10-2005 13:33

Re: How to use MinGW?
 
From the i386pe.merge file of Metamod-p:

/* Special ld script needed, because HL engine does some PE section checking on loaded gamedlls. */
/* These checks fail and segfault HL process if default ld script is used! */

mirv 11-10-2005 09:49

Re: How to use MinGW?
 
I've finally decided to give mingw32 a go after a long break from it (cygwin's just bugging me right now, so much won't work nicely with it). Will see if I run into any problems.

markus_heiden 26-10-2005 21:39

Re: How to use MinGW?
 
What problems do you have with cygwin that won't arise with mingw?

I've modified the makefile of epb to compile under cygwin with no special tricks, just a few flags have to be added.

Markus

mirv 27-10-2005 05:07

Re: How to use MinGW?
 
There are various libraries that compile with -mno-cygwin, and others that don't, and mixing the two can cause problems, especially when something uses iostream it seems. I just got annoyed at sifting through makefiles for ages, modifying bits of source code, changing #ifdef's to account for cygwin, etc etc, so I've swapped to mingw for now.


All times are GMT +2. The time now is 14:14.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.