2 Replies - 2474 Views - Last Post: 28 August 2008 - 11:19 PM Rate Topic: -----

#1 sjf123abc   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 36
  • Joined: 23-July 08

Allegro Error

Posted 28 August 2008 - 08:33 PM

#include <allegro.h>
int main(int argc, char *argv[])
{
	allegro_init(); 
	install_keyboard();

	set_gfx_mode(GFX_AUTODETECT, 640,480,0,0);

	readkey();

	return 0;
}
END_OF_MAIN();	 


Here are the errors
______________________________________________________________

Cpp1.obj : error LNK2001: unresolved external symbol __imp__readkey

Cpp1.obj : error LNK2001: unresolved external symbol __imp__set_gfx_mode

Cpp1.obj : error LNK2001: unresolved external symbol __imp__install_keyboard

Cpp1.obj : error LNK2001: unresolved external symbol __imp___install_allegro_version_check

Cpp1.obj : error LNK2001: unresolved external symbol __imp___WinMain

LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main

Debug/Cpp1.exe : fatal error LNK1120: 6 unresolved externals

Error executing link.exe.

Is This A Good Question/Topic? 0
  • +

Replies To: Allegro Error

#2 KYA   User is offline

  • Wubba lubba dub dub!
  • member icon

Reputation: 3209
  • View blog
  • Posts: 19,240
  • Joined: 14-September 07

Re: Allegro Error

Posted 28 August 2008 - 09:43 PM

Did you install allegro correctly? Linker errors suggest that it cannot find allegro.h
Was This Post Helpful? 0
  • +
  • -

#3 sjf123abc   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 36
  • Joined: 23-July 08

Re: Allegro Error

Posted 28 August 2008 - 11:19 PM

Well I opened up the allegro folder that I downloaded and put files from the include subfolder into the C++ folder under include and same thing with the libs.
Then I put some files into the win32 folder. There are still some files in the Allegro folder but I didnt put all of them into the VC folder. :blink: I went after a website that said all you needed was to put in the files that I put in the correct spots.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1