Allegro.cc - Online Community

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

Credits go to LennyLen for helping out!
This thread is locked; no one can reply to it. rss feed Print
Dev-C++ with Allegro
Aaron Whipple
Member #4,001
November 2003
avatar

Hey, I'm trying to get allegro working in dev-c++. I installed dev-c++, went to tools/check for updates, then installed allegro. this is my program.

#include <allegro.h>

int main() {
    allegro_init();

    allegro_exit();
    return 0;
}
END_OF_MAIN();

I get the compile error:

[Linker error] undefined reference to '_install_allegro_version_check'
[Linker error] undefined reference to 'allegro_exit
[Linker error] undefined reference to '_WinMain'
Id returned 1 exit status

From a few of the instructions I've read, I preformed all the steps correctly

LennyLen
Member #5,313
December 2004
avatar

Did you remember to link to the library?

Aaron Whipple
Member #4,001
November 2003
avatar

you cant "remember" something you didn't know in the first place :-/ I always had a package with a bat file to do all of the environment stuff for you. How do I go about linking the library?

LennyLen
Member #5,313
December 2004
avatar

In the Project menu, go to Project Options, then select the parameters tab. from there, click the "add library or object" button, then navigate to the Allegro library (most probably liballeg.a).

Rampage
Member #3,035
December 2002
avatar

gcc myprogram.c -o myprogram.exe -lalleg

-R

LennyLen
Member #5,313
December 2004
avatar

Quote:

gcc myprogram.c -o myprogram.exe -lalleg

Which kinda defeats the purpose of using an IDE really, doesn't it. :P

Aaron Whipple
Member #4,001
November 2003
avatar

The Project Menu is Grayed out (unclickable)

Rampage
Member #3,035
December 2002
avatar

It's right, nevertheless. :P

-R

LennyLen
Member #5,313
December 2004
avatar

Quote:

The Project Menu is Grayed out (unclickable)

Well, you do actually have to create a project first.

Aaron Whipple
Member #4,001
November 2003
avatar

I'm a bit confused about the whole project thing, but it worked... Thank you for your help. I appreciate it.

Go to: