Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Dev-Cpp setup

This thread is locked; no one can reply to it. rss feed Print
Dev-Cpp setup
Paul79
Member #5,159
October 2004

Sorry about this but I'm having trouble following the directions on this page: http://www.allegro.cc/files/install-devcpp.html

where it says:

At the DOS prompt you were in from step 5, type fix mingw32, then type make and watch Allegro compile. This may take a few minutes. Once Allegro is compiled, you'll need to install it.

I have no FIX... whats fix meant to be? A batch file?

Cancel that, I figured it out. I used the package manager to download allegro for Dev-Cpp, which skips the source of allegro...

Ok I couldnt get make install to work...

Does anyone know of a how-to install Dev-Cpp for Allegro that is slightly newer than 2001?

Here is a quote from the install how-to:

Dev-C++ is based off the Mingw32 compiler, so to get Allegro working, you'll need to update a few packages of Dev-C++. Following this procedure will update the whole compiler to the latest version of gcc (as of this writting). Download the following packages:
http://prdownloads.sourceforge.net/mingw/MinGW-1.1.tar.gz (10.1MB)
ftp://ftp.franken.de/pub/win32/develop/gnuwin32/mingw32/porters/Mikey/fileutils316-ming.tar.bz2 (448KB)
http://alleg.sourceforge.net/files/dx70_mgw.zip (241KB)

The problem with this is that it was written in 2001 and the files are totally different now. Which exact components of MinGW32 do I need? There's heaps of files?!!? One guy says get dev-cpp and mingw32 seperately, another guy says get the all in one package.

Hello World.exe has encountered a problem and needs to close. We are sorry for the inconvenience.

ReyBrujo
Moderator
January 2001
avatar

Don't panic!

First download Dev-C++ from here. That is about 8mb. Then download from here MinGW. That is like 15mb.

Install Dev-C++ (don't use + in the path name, or it will trigger a lot of errors later! Use Dev-Cpp, DevCpp or something like that instead) and, once installed, install MinGW on top of it. In example, install Dev-C++ at C:/DevCpp, and then install MinGW at C:/DevCpp. That is the way it is explained However, if you later want to delete Dev-C++ but keep the compiler, you will need to install MinGW again after uninstalling Dev-C++. To prevent this, I installed MinGW at D:/Compiler/MinGW, and Dev-C++ at D:/Compiler/GUI/Dev-Cpp. But then you need to configure the paths in Dev-C++ manually. In any case, then download from here the Direct X 8.0 headers. Unzip it on top of your MinGW installation (in example, again C:/DevCpp). It will ask to overwrite a couple of files, do it.

Then download Allegro latest WIP or latest stable (the latest stable is over 1 year old, and many of its bugs were fixed in the latest WIP). Unzip either of them in a directory, in example, C:/Allegro. It will create a bunch of directories inside it. Go inside C:/Allegro using a command prompt, and type fix mingw32 --quick (I cannot remember now if it was fix mingw32 --quick or fix mingw --quick). Then adjust your MINGDIR variable to point to where MinGW is installed. For W9x computers, just type at the command prompt SET MINGDIR=C:/DevCpp or whatever directory you installed MinGW. Under Windows 2000, XP or 2003, you will have to go to My PC/Properties/Advanced/Environment Variables or something like that, and add a variable (in either the current user or system variables). The variable name is MINGDIR, and points to where you installed
MinGW. You will have to close the command prompt and open a new one if you are using W2K, WXP or W2K3. Once it is set, just type make and see if any error pops up. If none, type make install. This will install Allegro to where the variable MINGDIR is pointing to.

If you found the MINGDIR stuff complex, there is a little trick that works for any Windows: after typing fix mingw32 --quick (or whatever), type make MINGDIR=C:/DevCpp or whatever directory name is. Remember two things: Don't put spaces in the directory name, please! And use / instead of \ as path separator.

Geez, that is all. If you are still troubled, maybe you should just download the binaries.

Sorry if this post is messed up, or if some link is broken. It was written with Lynx (64mb RAM are not enough to bring Mozilla up :P), and I don't have the gpm server to copy/past them.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Paul79
Member #5,159
October 2004

kthx for all the writing.

when I installed the dx8 files over the top, it wants to overwrite a file dated 2004 with a file dated 2000... um are you sure? I'll do it anyway.

And oh dont worry I have tried to just download the binaries. I have been at this for days. In fact this is what has prevented me from learning C all my life, not being able to get something to compile because of all the files I have to download and install in an exact sequence.

EDIT:

Ok that has worked better. I was able to do a make install without errors this time. But now I still cant compile programs that use allegro.

For example I try and compile demo.c in C:\allegro\demo and the first error it gives:

[Linker error] undefined reference to `_imp__key'

etc etc etc heaps more of these.

Hello World.exe has encountered a problem and needs to close. We are sorry for the inconvenience.

Sledge
Member #3,422
April 2003

You can get up and running with Dev-C++ pretty fast by downloading devcpp4990setup.exe from Bloodshed then popping over to http://devpaks.org/list.php?category=Allegro and getting hold of the devpacks (ignore the GCC ones). These will set things up automatically for you and give you both dynamic and static Allegro templates to choose from when you create a new project.

Do make sure you set MINGDIR as ReyBrujo suggests still - but you don't have to worry about building anything* via this installation method. Which is always good.

*EDIT: Actually that's a bit of a big fat lie... I still had to build DUMB even though there's a devpak for it in the audio section (though it's new on me so I could have been doing something daft to start with). But the core Allegro stuff just works like magic.

Paul79
Member #5,159
October 2004

Been there done all that. Always get the same link errors.

I've tried just about every possibility there is for downloading packages and installing.

I've done autoupdates, I've tried manual compiling, I've tried the binaries.

My env. variable is MINGDIR=C:\DEV-CPP as per my installation
my path is C:\DEV-CPP\BIN

I know I've got that right because I can make install I can even make all from the command prompt. The only thing I cant do is ctrl+F9 (compile) from Dev-Cpp. I must be using it wrong... is there some settings I have to set in dev-cpp?

Hello World.exe has encountered a problem and needs to close. We are sorry for the inconvenience.

SonShadowCat
Member #1,548
September 2001
avatar

I don't think you're allowed to have a '-' in the dir name when trying to install allegro. Try re-naming the dir and changing the path and env. variable.

gnolam
Member #2,030
March 2002
avatar

Quote:

For example I try and compile demo.c in C:\allegro\demo and the first error it gives:

[Linker error] undefined reference to `_imp__key'

You must link with allegro. Compile with -lalleg.

Quote:

I don't think you're allowed to have a '-' in the dir name when trying to install allegro. Try re-naming the dir and changing the path and env. variable.

Minus signs are OK AFAIK, just not plus signs...

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

23yrold3yrold
Member #1,134
March 2001
avatar

Yeah; Dev-C++ is bad, Dev-Cpp might be okay, DevCpp is a sure thing.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

ReyBrujo
Moderator
January 2001
avatar

Well, you are getting linking errors, that is a good thing. The compile step is over.

As suggested, you are missing the linking library. Somewhere in the project options there is a Linker tab where you can specify extra linker switches. Try looking around. Once you find it, write -lalleg and try compiling again. Try to look for that option, I don't remember where they are. Once you find it, it is done.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Richard Phipps
Member #1,632
November 2001
avatar

Tools->Compiler Options->The second editable text box down.

:)

Paul79
Member #5,159
October 2004

Things work so much better when the instructions are complete ;)

Thanks for that it now compiles.

FYI I did a search in Google for "-lalleg" and guess what:

Your search - -lalleg - did not match any documents.

Hmm.. seems a search for "lalleg" brings up the results.. Google ignores the dash.

I found this on a page I thought I read completely:

"Click Tools -> Compiler Options and being in the Compiler tab check the checkbox that says Add these commands to the linker command line, then write in the multiline textbox -lalleg. Click OK."

I guess it just throws you when you read through installations and it says the setup is complete, but then when you try and compile things it wont.

I just realised it was probably a compiler setup problem last night.

Hello World.exe has encountered a problem and needs to close. We are sorry for the inconvenience.

gnolam
Member #2,030
March 2002
avatar

It says quite clearly to link against liballeg.a in both the build docs and the Allegro.cc tutorial...

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

Paul79
Member #5,159
October 2004

ya my mistake

Hello World.exe has encountered a problem and needs to close. We are sorry for the inconvenience.

ReyBrujo
Moderator
January 2001
avatar

The problem, as my boss says, that people usually take for granted a few things. In example, most a.cc members read "Add Allegro library to your linker options" and understand, but unluckily people who is asking here is exactly because they are novices and hardly know about its meaning. The MS generation, as I call it, the one that relies on GUIs, intellisense, and does not know what a CLI is, is the one who really need our help, giving detailed instructions other than RTFM.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Paul79
Member #5,159
October 2004

I am not really from the GUI generation...I was born in 1979 and first started programming on a Trash-80 when I was 6 years old... I'm quite good with DOS and all the antique stuff, it's the GUI stuff I'm not as good as I'd like to be.

I'm currently RTFMing as thats what I enjoy doing, however sometimes there are things which are documented (like link switches) that you will see but not read... maybe if you put in bold letters "IF YOU DONT DO THIS IT WONT COMPILE" ;)

Hello World.exe has encountered a problem and needs to close. We are sorry for the inconvenience.

Go to: