Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


allegro causing undefined symbol _main link error

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

ive had this before but i dont know what i did to fix it anyone have any ideas ?

int main(void)
	allegro_init();             /* initialise the Allegro library */
	install_timer(); // timer init

	install_keyboard(); // keyboard init

	install_mouse(); // mouse init

	install_sound(DIGI_AUTODETECT,MIDI_AUTODETECT,""); // sound init

	set_color_depth(16);                  // sets color depth  

	EDITOR window;
	window.buffer = create_bitmap(640,480);
	window.AppWindow->headerText = "Dialog header";
	window.AppWindow->myCoords.TL.x = 100;
	window.AppWindow->myCoords.TL.y = 100;
	window.AppWindow->myCoords.BR.x = 200;
	window.AppWindow->myCoords.BR.y = 200;
	UTIMER = 0;
	install_int (Tick,1);
		if(key[KEY_ESC]) break;
		if(UTIMER % 5000 == 0)
	return 0;

Share this post

Link to post
Share on other sites
1. #include <allegro.h>
2. put END_OF_MAIN() after main (this is required on some platforms (including win32) for allegro to correctly wrap main up)
3. Ensure that it''s correctly linked against Allegro for your platform (read docs)


Share this post

Link to post
Share on other sites
well ok allegro.h is included in the GUI and COMPONENTS files and also i just forgot to c/p the end_of_main as the last line of the file i posted it IS there in my code. Finally im using msvc++ 6.0 and have alleg.lib included in the link section of project settings.

now can you see why im so confused ?
any other ideas?

(ps sorry for messing up my original post ala missing information)

Share this post

Link to post
Share on other sites
note to MODERATOR:close this thread

ok im a moron :-\ i made a win console app project instead of a win32 app....i altered my project settings and vola instant linkage.

note to other people who have this same problem:::
read the other posts on allegro on these forums its where i found the anwser to my question.

[edited by - vaneger on April 11, 2004 11:00:53 AM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!