test.obj : error LNK2001: unresolved external symbol __imp__cpu_vendor
Araanor

I just made Allegro work with my MVC (thanks to this board), confirmed by a simple black/red Hello World!
As I am learning to use it I started reading the "Vivace" tutorial (found on this site). Things went wrong with the test-program included...
#include <stdio.h>
#include <allegro.h>
int main (void)
{
allegro_init();
check_cpu();
printf("\nAllegro reports OK!\n");
printf("\nThis test was compiled with %s\n",allegro_id);
printf("Your CPU Vendor : %s\n",cpu_vendor);
return 0;
}
END_OF_MAIN()
This gives me:
-------------------Configuration: test - Win32 Debug-------------------
Linking...
test.obj : error LNK2001: unresolved external symbol __imp__cpu_vendor
test.obj : error LNK2001: unresolved external symbol __imp__allegro_id
test.obj : error LNK2001: unresolved external symbol __imp__check_cpu
test.obj : error LNK2001: unresolved external symbol __imp__install_allegro
test.obj : error LNK2001: unresolved external symbol __imp___WinMain
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/test.exe : fatal error LNK1120: 6 unresolved externals
Error executing link.exe.
test.exe - 7 error(s), 0 warning(s)
What's gone wrong?

Tigge

Looks like you not have included the allegro lib when you compiled this.. in Rhide go to
options - libraries - and type in alleg and check the box.. then test to compile it again!

Jeremias Raziel

Seems like he's not using rhide - search for project options and add -lalleg or c:\...\allegro\lib\msvc\liballeg.a (dont know if its msvc - im using mingw32), i also would say that it is not bad if you include winalleg.h...
Ls

Araanor

That's right! I forgot the libs (banging head into screen).

0 error(s)

Though MVC couldn't execute it... Gotta do with the project settings.

Thread #152572. Printed from Allegro.cc