This topic is 2739 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Iam using code:blocks, as well as the Allegro library, everything is fully installed with the mingw compiler. Iam attempting to learn the library and have been trying to get this simple program to run for days.

I finally thought i had fixed it when now iam recieving two errors that make no sense to me. Iam positive however that my code is correct, since it works on another machine.

these are the errors=

obj\Debug\Untitled2.o|| In function mangled_main':|
C:\Users\Mike\Desktop\TICC\Untitled2.c|6 |undefined reference to _install_allegro_version_check|

||=== Build finished: 1 errors, 0 warnings ===|

iam clueless to what this means. any help is greatly appreciated.

##### Share on other sites
That error usually means that you didn't link against liballeg.a

##### Share on other sites
im pretty sure i have in project options include liballeg.a in my parameters. could it mean anything else?

##### Share on other sites
No END_OF_MAIN() being used?
Or perhaps you linked the library in the wrong order. I don't know if this can be a problem but try switching the allegro.lib file and the mingw.lib file or whatever like "allegro.lib mingw.lib" instead of "mingw.lib allegro.lib". Perhaps I've had too much wine already but if I remember correctly this could be a problem in some cases.

##### Share on other sites
Quote:
 Original post by fender0613im pretty sure i have in project options include liballeg.a in my parameters. could it mean anything else?

As a test, I just wrote a program that simply included allegro.h and called allegro_init(). If I built it without linking to liballeg.a (or one of the other versions of the Allegro library), I received the same error as you. The moment I linked to the library, it went away.

Quote:

That results in a different error - undefined reference to `WinMain@16'

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 14
• 12
• 9
• 12
• 37
• ### Forum Statistics

• Total Topics
631424
• Total Posts
3000010
×