What Environment Variables have to be set?
What Environment Variables have to be set?
Hi,
I'm new here and also new to Irrlicht.
I downloaded the Irrlicht SDK 1.7.1 but what Environment Variables do I have to set? (I'm using Windows XP)
The WIKI says: "Please note that an IDE is not required. You can just use a compiler/linker, such as GCC"
But it says nowhere how to set up Irrlich for MinGW (without any IDE).
Can you help me?
By the way: I'm German, so you can also respond in German. If you want in French, too
greets
I'm new here and also new to Irrlicht.
I downloaded the Irrlicht SDK 1.7.1 but what Environment Variables do I have to set? (I'm using Windows XP)
The WIKI says: "Please note that an IDE is not required. You can just use a compiler/linker, such as GCC"
But it says nowhere how to set up Irrlich for MinGW (without any IDE).
Can you help me?
By the way: I'm German, so you can also respond in German. If you want in French, too
greets
Try using "make win32" in the source-folder. I'm not on Windows right now, so I can't test, but that should usually already work.
I am not sure about the examples, it looks to me like no-one adapted those makefiles to win32 so far (sorry, most people just go with either the Code::Blocks or the VisualStudio IDE). So I suppose you would have some work ahead there.
So - no IDE is needed - but it will make your life a lot easier on Windows (on Linux it's fine).
I am not sure about the examples, it looks to me like no-one adapted those makefiles to win32 so far (sorry, most people just go with either the Code::Blocks or the VisualStudio IDE). So I suppose you would have some work ahead there.
So - no IDE is needed - but it will make your life a lot easier on Windows (on Linux it's fine).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
You mean I schould write "make win32" (mingw32-make) into my command line?
In the Soucre-Folder of a example is already an existing Makefile, so I type 'mingw32-make' and I get the following error:
In one line it says: "cannot find -lIrrlicht"
So apparently MinGW doesn't know where the libraries are located.
In the Soucre-Folder of a example is already an existing Makefile, so I type 'mingw32-make' and I get the following error:
Code: Select all
makefile:47: Building...
g++ -I../../include -I/usr/X11R6/include -O3 -ffast-math main.cpp -o ../../bin/
Linux/01.HelloWorld -L../../lib/Linux -lIrrlicht -L/usr/X11R6/lib -lGL -lXxf86vm
-lXext -lX11
e:/programme/tdm-gcc/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe
: cannot find -lIrrlicht
collect2: ld returned 1 exit status
mingw32-make: *** [all_linux] Error 1
So apparently MinGW doesn't know where the libraries are located.
well, you have different choices...
1st - use an IDE like Code::Blocks and it's all pretty easy...
2nd - copy all needed files into the same (working) directory (very bad)...
3rd - add all needed directories to the system path (but probably you'll have to do 4th too)...
4th - edit the makefile, everything was defined there !!!
I prefere 1st, but if I didn't want to use an IDE I would use 4th !!!
if you open the makefile you'll find all definitions there and they are well commented, so it should be no problem to enter the right pathes...
1st - use an IDE like Code::Blocks and it's all pretty easy...
2nd - copy all needed files into the same (working) directory (very bad)...
3rd - add all needed directories to the system path (but probably you'll have to do 4th too)...
4th - edit the makefile, everything was defined there !!!
I prefere 1st, but if I didn't want to use an IDE I would use 4th !!!
if you open the makefile you'll find all definitions there and they are well commented, so it should be no problem to enter the right pathes...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
OK, I'll choose 4th
But be sure, I'll have surely some questions.
So, IrrlichtHome := ../.. means go two directories back and you are in Irrlicht's Home directory?
In the Makefile it says:
# linker flags such as additional libraries and link paths
USERLDFLAGS =
Should I add there the library path? (IrrlichtHome/lib/$(SYSTEM))
But some lines lower it says:
all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
So the lib-path is already set?
But be sure, I'll have surely some questions.
So, IrrlichtHome := ../.. means go two directories back and you are in Irrlicht's Home directory?
In the Makefile it says:
# linker flags such as additional libraries and link paths
USERLDFLAGS =
Should I add there the library path? (IrrlichtHome/lib/$(SYSTEM))
But some lines lower it says:
all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
So the lib-path is already set?
it's you choice...RungAaz wrote:OK, I'll choose 4th
there are also many tutorials on the net:RungAaz wrote:But be sure, I'll have surely some questions.
http://www.opussoftware.com/tutorial/TutMakefile.htm
http://www.ijon.de/comp/tutorials/makefile.html
right !!!RungAaz wrote:So, IrrlichtHome := ../.. means go two directories back and you are in Irrlicht's Home directory?
yes, it's already set, but to the directory previously was defined...RungAaz wrote:In the Makefile it says:
# linker flags such as additional libraries and link paths
USERLDFLAGS =
Should I add there the library path? (IrrlichtHome/lib/$(SYSTEM))
But some lines lower it says:
all_linux all_win32 static_win32: LDFLAGS += -L$(IrrlichtHome)/lib/$(SYSTEM) -lIrrlicht
So the lib-path is already set?
in detail:
-L means "now comes a linker directory"
$(IrrlichtHome) was defined as "2 dirs up (../..)"
then comes "/lib/"
and $(SYSTEM) wasn't defined so its empty...
now you have the complete lib path: "../../lib/"
in this line you can also enter the complete lib path of your system, e.g. "-LC:/Irrlicht/lib"
the second part in this line defines the library file(s):
-l (lower case L) stands for "now comes a Lib-File"
and Irrlicht will the interpreted as "libIrrlicht.a" for MinGW...
in another line you'll also find the include path definition, it starts with -I that stands for "now comes an includes path"...
there you can also enter the complete path of your system, e.g. "-IC:/Irrlicht/include"
but remember: if you don't use the placeholders/variables, e.g. $(IrrlichtHome), you'll have to change all lines where this placeholder was used, too !!!
so it's better to use placeholders/variables...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Yes, that is what should work for compling the engine itself.RungAaz wrote:You mean I schould write "make win32" (mingw32-make) into my command line?
That makesfile already has a win32 build-target.
The example Makefiles are not prepared for Win32, so basically you will have to write those targets. In that case I would recommend search for some Makefile tutorial. Sooner or later every good programmer has to fight his way through Makefiles ;-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
np, yw !!!RungAaz wrote:Thank you so much for this explanation and for the two Makefale-Tutorials (especially for the German ones).
btw. I'm german, too...
great, but remember this was only the very basic usage !!!RungAaz wrote: AWESOME! It works!
Thanks for your help!
there are also options for (e.g.) compiler flags for optimising, preprocessoring and such...
for example somewhere probably is a line with -Wall...
that means show all warnings (-W = warnings, all = all)...
but to explain this all here is a bit too hard...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Ah, OK Danke!
The only things I don't understand are these 'all_linux', 'all_win32', ... things.
I deleted lines like these two:
(mit '#' auskommentiert)
And added these lines:
And it works fine.
I guess 'SUF' means suffix, hence '.exe'
[EDIT]
What would be the difference between
VARIABLE := foo
and
VARIABLE = foo
If I only use a colon instead of ':=' or '=' I would say make on which files the target depends on - right?
The only things I don't understand are these 'all_linux', 'all_win32', ... things.
I deleted lines like these two:
Code: Select all
all_win32 clean_win32 static_win32: SYSTEM=Win32-gcc
all_win32 clean_win32 static_win32: SUF=.exe
And added these lines:
Code: Select all
SYSTEM = Win32-gcc
SUF = .exe
I guess 'SUF' means suffix, hence '.exe'
[EDIT]
What would be the difference between
VARIABLE := foo
and
VARIABLE = foo
If I only use a colon instead of ':=' or '=' I would say make on which files the target depends on - right?
to set a variable write a line starting with the variable name followed by `=' or `:='.
whatever follows the `=' or `:=' on the line becomes the value.
to learn mor about the differences between them have a look here...
a simple colon ':' means a list is following (e.g. the cpp files to be compiled, seperated by a space)...
the "all_win32 clean_win32 static_win32:" lines are defining different targets, so you can make one makefile for different uses, just by defining what target should be used for compiling...
whatever follows the `=' or `:=' on the line becomes the value.
to learn mor about the differences between them have a look here...
a simple colon ':' means a list is following (e.g. the cpp files to be compiled, seperated by a space)...
the "all_win32 clean_win32 static_win32:" lines are defining different targets, so you can make one makefile for different uses, just by defining what target should be used for compiling...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
yes, for example...RungAaz wrote:So, you are using this to make it platform independent?
or for debug and release builds, or public and private releases, or whatever releases...
of course you could make a new makefile for each release, too...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java