|
Problem installing allegro in VC++url2005 |
superstar4410
Member #926
January 2001
|
I'm trying to install allegro on VC++ using these instructions http://wiki.allegro.cc/Visual_C%2B%2B_Express_2005 This is the error I'm getting.
I searched the forums and found someone that had the exact same problem in 2005 but it didn't look like the answer was given to the problem. My code is #include <allegro.h> int main(void) { allegro_init(); allegro_message("Hello World!"); return 0; } END_OF_MAIN(); Thanks. Don't take yourself too seriously, but do take your responsibilities very seriously. |
ReyBrujo
Moderator
January 2001
|
If you ask me, you would need to configure the VC project to be a 32-bit code instead of 64. However, I don't use VC++ 2005, so it is just a supposition based on a previous comment I recall. -- |
Matthew Leverton
Supreme Loser
January 1999
|
Make sure you are using the Windows Subsystem (linker settings). |
superstar4410
Member #926
January 2001
|
Thanks, errors are getting less it changed from what I have above to 1>------ Build started: Project: ohhh, Configuration: Debug Win32 ------ 1>Linking... 1>code.obj : error LNK2019: unresolved external symbol __imp__allegro_message referenced in function "int __cdecl _mangled_main(void)" (?_mangled_main@@YAHXZ) 1>code.obj : error LNK2019: unresolved external symbol __imp___install_allegro_version_check referenced in function "int __cdecl _mangled_main(void)" (?_mangled_main@@YAHXZ) 1>code.obj : error LNK2019: unresolved external symbol __imp___WinMain referenced in function _WinMain@16 1>C:\Users\Wala-Neh\Documents\Visual Studio 2005\Projects\ohhh\Debug\ohhh.exe : fatal error LNK1120: 3 unresolved externals Which was at the bottom of the first error. Any ideas, thanks. Don't take yourself too seriously, but do take your responsibilities very seriously. |
ReyBrujo
Moderator
January 2001
|
My guess is that you did not add Allegro to the list of libraries to link against. -- |
superstar4410
Member #926
January 2001
|
Thanks verrrry much. Under Configuration Properties / Linker / Input, add alld.lib to Additional Dependencies. That took away the winmain error. I'm still getting the warnings concerning 1>c:\program files\microsoft visual studio 8\vc\include\allegro\internal\alconfig.h(395) : warning C4312: 'type cast' : conversion from 'unsigned int' to 'unsigned char *' of greater size 1>c:\program files\microsoft visual studio 8\vc\include\allegro\internal\alconfig.h(402) : warning C4312: 'type cast' : conversion from 'unsigned int' to 'unsigned char *' of greater size 1>c:\program files\microsoft visual studio 8\vc\include\allegro\inline\draw.inl(421) : warning C4312: 'type cast' : conversion from 'unsigned int' to 'unsigned char *' of greater size 1>c:\program files\microsoft visual studio 8\vc\include\allegro\inline\draw.inl(435) : warning C4312: 'type cast' : conversion from 'unsigned int' to 'unsigned char *' of greater size 1>c:\program files\microsoft visual studio 8\vc\include\allegro\inline\draw.inl(446) : warning C4312: 'type cast' : conversion from 'unsigned int' to 'unsigned short *' of greater size 1>c:\program files\microsoft visual studio 8\vc\include\allegro\inline\draw.inl(460) : warning C4312: 'type cast' : conversion from 'unsigned int' to 'unsigned short *' of greater size 1>c:\program files\microsoft visual studio 8\vc\include\allegro\inline\draw.inl(471) : warning C4312: 'type cast' : conversion from 'unsigned int' to 'unsigned short *' of greater size 1>c:\program files\microsoft visual studio 8\vc\include\allegro\inline\draw.inl(485) : warning C4312: 'type cast' : conversion from 'unsigned int' to 'unsigned short *' of greater size 1>c:\program files\microsoft visual studio 8\vc\include\allegro\inline\draw.inl(521) : warning C4312: 'type cast' : conversion from 'unsigned int' to 'unsigned int *' of greater size 1>c:\program files\microsoft visual studio 8\vc\include\allegro\inline\draw.inl(535) : warning C4312: But I'm not going to worry about it because it allowed my program to compile and I was able to execute my code. Hopefully those warnings don't come back to haunt me. I hope not, anyways thanks alot, yea I can successfully compile code and run it, I thought I was stuck on Vista without allegro. I'm soo excited I can now resume my programming, yess. Don't take yourself too seriously, but do take your responsibilities very seriously. |
Matthew Leverton
Supreme Loser
January 1999
|
Setting "C/C++ / Detect 64-bit Portability Issues" to "No" might help. |
superstar4410
Member #926
January 2001
|
Wow you are good, that was it. Don't take yourself too seriously, but do take your responsibilities very seriously. |
ReyBrujo
Moderator
January 2001
|
Hah, I was close -- |
|