Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » What is still to be done?

This thread is locked; no one can reply to it. rss feed Print
What is still to be done?
SNES4EVER
Member #7,564
July 2006

Well, I think I've done everything as said in the document how to build up allegro using
MinGW.
I got the latest MinGW(3.0) and dx_80ming.zip and the latest allegrozipfile.
I have installed MinGW3.0, extracted the allegrozip before and extracted the dx_80mingw.zip to the directory of MinGW.
Laste but not least I have edited MINGDIR and set it to the MInGW directory.
Have I to extract the allergo.zip into the MinGW directory?
How can I start or where can I find allergo to start it?

regards,
SNES4EVER

miran
Member #2,407
June 2002

There is no allegro.zip. There is an allegro-4.2.0.zip though. You extract it wherever you want. Then you go to allegro/docs/build and read mingw32.txt.

--
sig used to be here

SNES4EVER
Member #7,564
July 2006

Well, you're right, but I just didn't remember how the zip-folder of allegro was called.
BUT: I have extracted Allegro and did everything as I was told in the readme.
Is there still to do more to make allegro work?
I can't start allegro, cause I don't know where the exe-file is.
So where's allegro or how can I start it?

regards,
SNES4EVER

miran
Member #2,407
June 2002

You don't start Allegro. Allegro is not a program. Allegro is a programming library intended for making games and other multimedia applications. You link it with programs you write and compile:

1. Include <allegro.h> in your code.
2. Use functions that Allegro provides in your code.
3. Compile your code.
4. Link your compiled code with liballeg.a to produce an executable of your program.

--
sig used to be here

SNES4EVER
Member #7,564
July 2006

Well, I just started with this book about allegro.
There was an example, but nothing about where to write the program.
So I thought I would have to open allergo.
Can you please tell me where I can write the program?
I got Turbopascal, but I guess it will not work(or?)

regards,
SNES4EVER

miran
Member #2,407
June 2002

You write code in a text editor (for example Notepad). There are many text editors that are better than Notepad though, because they are specialized for writing code. They print parts of the code in different colours, they format the code, they show you function parameters and auto-complete function names as you type them, and so on. Personally I use a program called SciTE for this, but there are many more.

To compile the code and create an exe you need a compiler. Because Allegro is a C library, you need to write the code in the language of C (or C++). To compile C code you need a C compiler and to compile C++ code you need a C++ compiler. Turbopascal is a Pascal compiler, so it won't do. A popular compiler for C and C++ in Windows is called MinGW. You need to get it! Once you have it installed on your system, you compile the code by runnin the "gcc" or "g++" program from the command line and give it all the right parameters (i.e. names of the source files, flags, name of the exe file, etc). You can also write a makefile that automates this process so you don't type the same command every time you need to compile.

There are also programs which combine a text editor and compiler (and other tools) in one complete package. Such a package is called "Integrated Development Environment" or IDE for short. One popular IDE for Windows is Dev-C++. Another popular, but a commercial one you need to pay money for, is called MS Visual Studio. So get one of those if you don't want to use a simple text editor and command line interface.

--
sig used to be here

Arthur Kalliokoski
Second in Command
February 2005
avatar

You can still get Visual C for free until end of November (you have to download the SDK as well). I got it a few months ago and it works, although I prefer MingW.

http://msdn.microsoft.com/vstudio/express/visualC/default.aspx

“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”

― Robert A. Heinlein

Dennis
Member #1,090
July 2003
avatar

Quote:

You can still get Visual C for free until end of November

Not just until the end of November: http://msdn.microsoft.com/vstudio/express/support/faq/#pricing (it's been made price-free permanently)

SNES4EVER
Member #7,564
July 2006

Thanks to miran.
I already got MinGW 3.0, but this book didn't tell anything anout writing programes in the texteditor.

reagrds,
SNES4EVER

HoHo
Member #4,534
April 2004
avatar

I'm sorry if this sounds rude but did you actually read the book? I know no other way to use Allegro than to write some code in text editor and compile it to executeable.

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

GullRaDriel
Member #3,861
September 2003
avatar

Hey, HoHo, you were not aware that allegro has a built-in neuronal game developping plugging ?
It just scans your brain to see what game you mean, after what it just starts writting code and building itself !!

That is the new Allegro Brain Utility System Evolution !

On Toppic, I just think the OP needs to read more about programming, compiling, linking, after what, with a few 'hello world' and other basis he will understand what you guys are trying to teach.

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

SNES4EVER
Member #7,564
July 2006

Well still got a little problem with compiling(and no, I haven't read the book till the end cause there is a step-by step how to do).
There is an example,this program should show some easy message:
#include <stdio.h>
int main(int argc, char* argv[]) {
print("Hallo Welt.\n");
}

The book told to save it as hallo.c and compile it with "gcc hallo.c -o hallo.exe".
I opende the commando line, typed the place where MinGW and gcc was saved.
But the answer was: NO INPUT FILES or that the path was wrong.
I tried it some more times, but it didn't work.
How can I compile this program?(it's saved in Own Data).
My commandoline looked like this

D:\Programme\MinGW\bin\gcc hallo.c -o hallo.exe
(I'm german, so don't wonder about Programme)

How do I attach the place where I saved the text?

LennyLen
Member #5,313
December 2004
avatar

Quote:

D:\Programme\MinGW\bin\gcc hallo.c -o hallo.exe

You need to call gcc from the directory that hallo.c is in.

Quote:

How do I attach the place where I saved the text?

At the bottom of the text-window where you write your post is an "attachments" tab.

Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

You need to call gcc from the directory that hallo.c is in.

He did, he just used the full path to gcc, making me think its not installed properly.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Go to: