Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Installing Allegro with Dev-C++

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Installing Allegro with Dev-C++
Fred Flagg
Member #6,993
March 2006

I have Dev-C++ 4.9.9.2 up and running. Now I want to compile/install Allegro to work with it. I have Allegro stored off in C:\Allegro.

The link I found in this forum giving directions to do that is broken. Any ideas where I can go next to find out how to get Allegro and Dev-C to work together?

Bob Keane
Member #7,342
June 2006

If you click on the tools icon, you should see a check for updates option. Selecting that will bring another screen, its been a while since I tried it, but the screen should be intuitive. You may have to change the website it searches. Once you make the connection, select the latest version of Allegro and download it. Then click on tools again, the last option should be the one you want (install devpaks?). You will see the Allegro devpak in the list. Select it and click the install button.

By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul.
If we get apple juice from squeezing apples, and we get prunes from drying out plums, where does prune juice come from?
Hi Randall Monroe.

gnolam
Member #2,030
March 2002
avatar

Quote:

The link I found in this forum giving directions to do that is broken. Any ideas where I can go next to find out how to get Allegro and Dev-C to work together?

Allegro\docs\build\mingw32.txt

It contains all the info you need. I'd advise against devpaks.

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

Bob Keane
Member #7,342
June 2006

Come to think of it, the web update feature may install the package automatically. Good luck.

By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul.
If we get apple juice from squeezing apples, and we get prunes from drying out plums, where does prune juice come from?
Hi Randall Monroe.

Bruce Fox
Member #7,301
May 2006

Select "devpaks.org" from the drop down list of the MENU>Tools>Check for Updates/Pacages.

Then click Check For Updates.

=========================
Bruce Fox

Lucid Nightmare
Member #5,982
July 2005
avatar

Click Here For My Website

Two Golden Rules of life- Firstly, I'm always right and secondly, if you think otherwise, slap your face and read rule number one again!

Bob Keane
Member #7,342
June 2006

After wasting an entire day, I found the solution. Quite simple, really.:-[

By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul.
If we get apple juice from squeezing apples, and we get prunes from drying out plums, where does prune juice come from?
Hi Randall Monroe.

Dustin Dettmer
Member #3,935
October 2003
avatar

gnolam said:

Allegro\docs\build\mingw32.txt

It contains all the info you need. I'd advise against devpaks.

I'd advise against compiling from source. The dev-cpp package updater contains everything you'd need to get allegro working.

Lucid Nightmare said:

I'd also like to reccomend you don't check out that link. Use the dev-cpp package updater.

HoHo
Member #4,534
April 2004
avatar

I'd advise to first install Allegro via the dev-cpp package updater.
Later when you find that you need a bit more speed you might want to consider building Allegro yourself and disabling ASM routines. That can give >50% speed increase in many functions.

__________
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

gnolam
Member #2,030
March 2002
avatar

Do you even get the examples with devpaks?

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

miran
Member #2,407
June 2002

Quote:

Do you even get the examples with devpaks?

Yes.

...but it's a separate devpak. I think...

--
sig used to be here

Dark Logan
Member #7,313
June 2006

Quote:

...but it's a separate devpak. I think...

Yes, it's the Allegro Supplement Package

Thomas Fjellstrom
Member #476
June 2000
avatar

Cause as we all know, Supplement == Examples ~~~`````1~~~~!!!!!!!

--
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

Vinny_CGR
Member #7,403
June 2006

I've used the package updater and it seem that the library isn't still working properly.
I was trying to make some simple things using Allegro and after typing this:
#include <allegro.h>
allegro_init();
And sending this to the compiler it returned this answer:
expected constructor, destructor, or type conversion before '(' token.
What is wrong?

Milan Mimica
Member #3,877
September 2003
avatar

int main() ?

Lucid Nightmare
Member #5,982
July 2005
avatar

Has someone even asked Fredd whether is he still stuck up with the installation problem or not... He just disappeared after starting the thread...

Click Here For My Website

Two Golden Rules of life- Firstly, I'm always right and secondly, if you think otherwise, slap your face and read rule number one again!

David_at_wedu
Member #7,407
June 2006

Hi all,

I too just started working with Dev-C++, and was in the process of making Allegro work with the IDE with little to no avail. While the library itself works -- my test "allegro_message()" call works, whenever I try to use any of the system variables like "extern int os_type," it keeps giving me the following compile error:

Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\Makefile.win" all
gcc.exe -c GetInfomain.c -o GetInfomain.o -I"C:/Dev-Cpp/include"
gcc.exe GetInfomain.o -o "GetInfo.exe" -L"C:/Dev-Cpp/lib" -lalleg
Execution terminated
Compilation successful

Here is the code in my script:

#include <allegro.h>
int main()
{
allegro_init();
extern int os_type;
printf("OS Version = %s\n", os_type);
allegro_exit();
}
END_OF_MAIN();

At this point, I am at a loss for words. If it helps, I'm working on Windows XP Professional. I'm totally flustered and you guys are pretty much my last hope. :-[

Milan Mimica
Member #3,877
September 2003
avatar

Quote:

Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\Makefile.win" all
gcc.exe -c GetInfomain.c -o GetInfomain.o -I"C:/Dev-Cpp/include"
gcc.exe GetInfomain.o -o "GetInfo.exe" -L"C:/Dev-Cpp/lib" -lalleg
Execution terminated
Compilation successful

???
Where is the error? It says "Compilation successful"!

edit:
BTW, you program does nothing. It initializes, prints a message and exits. It takes few nanoseconds to do that on modern computers.

Kitty Cat
Member #2,815
October 2002
avatar

Quote:

Compilation successful

What's the error?

And you don't need to declare os_type, since allegro.h already does. And you may want to turn on warnings (you're trying to use %s (a string) with an int; that will more than likely crash, and definitely not do what you expect).

--
"Do not meddle in the affairs of cats, for they are subtle and will pee on your computer." -- Bruce Graham

David_at_wedu
Member #7,407
June 2006

D'oh... Stupid text didn't copy. Didn't realize... Here's the correct compile log text:

Compiler: Default compiler
Building Makefile: "C:\Dev-Cpp\Makefile.win"
Executing make...
make.exe -f "C:\Dev-Cpp\Makefile.win" all
gcc.exe -c GetInfomain.c -o GetInfomain.o -I"C:/Dev-Cpp/include"
gcc.exe GetInfomain.o -o "GetInfo.exe" -L"C:/Dev-Cpp/lib" -lalleg
Info: resolving _os_type by linking to __imp__os_type (auto-import)
fu000001.o(.idata$3+0xc): undefined reference to `lib_mingw32_liballeg_a_iname'
nmth000000.o(.idata$4+0x0): undefined reference to `_nm__os_type'
collect2: ld returned 1 exit status
make.exe: *** [GetInfo.exe] Error 1
Execution terminated

Quote:

And you don't need to declare os_type, since allegro.h already does. And you may want to turn on warnings (you're trying to use %s (a string) with an int; that will more than likely crash, and definitely not do what you expect).

The only reason I was declaring os_type was because it said to in the book I'm reading for using Allegro. However, if this is true, what would be the proper printf() call to output the value?

(As if you can't tell, I'm still a C newbie)

LennyLen
Member #5,313
December 2004
avatar

Quote:

However, if this is true, what would be the proper printf() call to output the value?

printf("OS Version = %d\n", os_type);

David_at_wedu
Member #7,407
June 2006

Quote:

printf("OS Version = %d\n", os_type);

Thanks!

I guess maybe I'll have to look a bit closer at what the book I'm reading says, because I was totally lost as to why I kept getting the compile errors (since the book told me to define extern int os_type).

Being a newbie sucks. ???

miran
Member #2,407
June 2002

Quote:

since the book told me to define extern int os_type

What's the title of the book?

--
sig used to be here

HoHo
Member #4,534
April 2004
avatar

Quote:

What's the title of the book?

Wanna bet it's called "Game programming all in one"?
:P

__________
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

miran
Member #2,407
June 2002

It was a rhetorical question.

--
sig used to be here

 1   2 


Go to: