Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Allergo Installation Problems

This thread is locked; no one can reply to it. rss feed Print
Allergo Installation Problems
AdmiralStalfos19
Member #10,074
August 2008

Hey guys

I'm new to this forum, and I'm having a problem installing Allegro, and I'd appreciate any help I can get. I'm using MSVC 9.0 and the version of Allegro I'm using is 4.9.3.

Last time I tried using it, it came with this:
general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Allegro 4.9.3 is an unfinished work in progress for the up coming Allegro 5.0.

The latest release of the stable version of Allegro is 4.2.2.
From a prior thread about MSVC++ 9, Matthew posted a link to the binary distribution of Allegro 4.2.2 for MSVC++ 9. {The link on that page no longer works}

The link still isn't on the Allegro Files page, but here's a direct link to it :
http://www.allegro.cc/files/4.2.2/msvc9.zip

- Edit : The link doesn't work anymore -

AdmiralStalfos19
Member #10,074
August 2008

Edgar Reynaldo said:

Allegro 4.9.3 is an unfinished work in progress for the up coming Allegro 5.0.

Does that explain the missing files I found? (why did this have to include setup.exe? :-/ )

EDIT (now that I actually found the edit button): Oh and the link's broken. I just went into it and it came up with a 404...

Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

Does that explain the missing files I found?

It might, but Allegro 5 will be fairly different from Allegro 4, and already its API and build system are different. So if you followed the normal procedure for Allegro 4, things just won't work.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Trent Gamblin
Member #261
April 2000
avatar

If you really want to use "Allegro 5" now, it will work but you will need cmake to compile it. You should download it from svn and not use 4.9.3. There have been a lot of bugfixes and new features added since 4.9.3 was released. If you have any questions about getting it to compile with MSVC9, post them here.

AdmiralStalfos19
Member #10,074
August 2008

OK, I've downloaded the 2005 MSVC (8.0 I believe), and I also have DirectX SDK (June 2008)

Then I followed the instructions from there

The INSTRUCTIONS!! said:

Before you can use the project files, you must first double-click on the /build/msvc/pre-build-msvc.bat file. Then open the Allegro project file and select Build / Batch Build from the menu. Select the versions you want to build and then press the Build button.

They didn't tell me anything about THIS coming up after the build button:

http://i302.photobucket.com/albums/nn112/Admiral_Stalfos19/pic.jpg?t=1218742293

Then I just saved it on the Desktop just to see what happened and it came up with 217 errors :o All of them (at least I think all of them) said this:

The 217- ERRORS!! said:

fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

I found the windows.h file at C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include. Is this where I was supposed to save the file? ???

EDIT: Suppose not then... I tried putting it in there too and it didn't work. Where am I supposed to put this thing??

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Your Original Post said:

I'm using MSVC 9.0

Quote:

OK, I've downloaded the 2005 MSVC (8.0 I believe), and I also have DirectX SDK (June 2008)

Do you mean you've downloaded MSVC version 8.0 or the allegro binary package for MSVC 8.0?

AdmiralStalfos19
Member #10,074
August 2008

Both I believe, I just downloaded them

Milan Mimica
Member #3,877
September 2003
avatar

Quote:

Then I followed the instructions from there
The INSTRUCTIONS!! said:

... Wrong instructions if you're trying 4.9.3. All instructions available for 4.9 are in readme_a5.txt.

Quote:

fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

Obviously C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include is not in your include path. Add it.

AdmiralStalfos19
Member #10,074
August 2008

Quote:

Wrong instructions if you're trying 4.9.3

I'm not using that anymore, I've gone 4.2.2 as Edgar advised

Quote:

Obviously C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include is not in your include path. Add it.

How am I supposed to add it?

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Quote:

Quote:

The link still isn't on the Allegro Files page, but here's a direct link to it :

EDIT (now that I actually found the edit button): Oh and the link's broken. I just went into it and it came up with a 404...

That link worked a few days ago. I blame it on the gremlins.

Quote:

I'm not using that anymore, I've gone 4.2.2 as Edgar advised

Okay, so you're using Microsoft Visual C++ version 8.0. Have you installed Service Pack 1 for MSVC 8 yet?

Files page said:

Microsoft Visual C++ 8.0 - zip, 7z, exe (Requires VC++ SP1)

After that, if you're building allegro from source, you can follow the build instructions on this page under the heading Project file :
http://wiki.allegro.cc/Build/MSVC_8

If you're using the binaries for MSVC 8 instead, follow this part of the same page I just linked to using the contents of the allegro folder from the zip file :

Quote:

Copy the files

1. Copy the contents of C:\allegro\include to C:\Program Files\Microsoft Visual Studio 8\VC\include
2. Copy the .lib files from C:\allegro\lib\msvc to C:\Program Files\Microsoft Visual Studio 8\VC\lib
3. Copy the .dll files from C:\allegro\lib\msvc to C:\Windows\System32

AdmiralStalfos19
Member #10,074
August 2008

OK, I think I got it installed properly now:

Proof of my belief that I installed it properly said:

0 succeeded; 0 failed; 1 up-to-date; 0 skipped

Build successful

This was the program I was using to test it

1#include <allegro.h>
2 
3const int scrx = 640;
4const int scry = 480;
5 
6int main(int argc, char* argv[]) {
7 if (allegro_init()) {
8 allegro_message("Cannot initalize Allegro.\n");
9 return 1;
10 }
11 
12 //Set the window title when in a GUI environment
13 set_window_title("Hello World");
14 
15 if (install_keyboard()) {
16 allegro_message("Cannot initalize keyboard input.\n");
17 return 1;
18 }
19 
20 //set graphics mode, trying all acceptable depths
21 set_color_depth(32);
22 if (set_gfx_mode(GFX_AUTODETECT, scrx, scry, 0, 0)) {
23 set_color_depth(24);
24 if (set_gfx_mode(GFX_AUTODETECT, scrx, scry, 0, 0)) {
25 set_color_depth(16);
26 if (set_gfx_mode(GFX_AUTODETECT, scrx, scry, 0, 0)) {
27 set_color_depth(15);
28 if (set_gfx_mode(GFX_AUTODETECT, scrx, scry, 0, 0)) {
29 allegro_message("Video Error: %s.\n", allegro_error);
30 return 1;
31 }
32 }
33 }
34 }
35 
36 //set text background color to bright blue
37 text_mode(makecol(0, 0, 255));
38 
39 //prints yellow "Hello World!!!" in middle of screen
40 textout_centre(screen, font, "Hello World!!!", scrx/2,
41 scry/2, makecol(255, 255, 0));
42 
43 //Wait for a key to be pressed
44 while (!keypressed()) {}
45 
46 return 0;
47 //Allegro will automatically deinitalize itself on exit
48}
49END_OF_MAIN()

It built OK, but this came up when I tried to run it.

http://i302.photobucket.com/albums/nn112/Admiral_Stalfos19/pic2.jpg?t=1219176158

Any idea why?

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

In Allegro 4.2.2 the text_mode function and the textout_* functions have been deprecated in favor of the textout_*_ex functions. Trust the Allegro Manual over any books or tutorials.

Quote:

0 succeeded; 0 failed; 1 up-to-date; 0 skipped

I think you should rebuild your project. Since it said 1 was up-to-date, that's just saying it didn't compile or link anything.

When you put your code up on the forums, use the code tags for it. This will wrap long code into a scrollable area and format for easier reading.

<code>
Code goes here...
</code>

Quote:

It built OK, but this came up when I tried to run it.

Any idea why?

The program file doesn't exist or it's looking for it in the wrong location.

AdmiralStalfos19
Member #10,074
August 2008

Quote:

The program file doesn't exist or it's looking for it in the wrong location.

How am I supposed to create the file?

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

AdmiralStalfos19
Member #10,074
August 2008

I was meaning the .exe file, but I'll try it and see what happens

I've rebuilt the program, and now I've got this:

Quote:

------ Build started: Project: i, Configuration: Debug Win32 ------
Compiling...
i.cpp
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(34) : warning C4793: '__asm' : causes native code generation for function 'int _default_ds(void)'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(32) : see declaration of '_default_ds'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(49) : warning C4793: '__asm' : causes native code generation for function 'unsigned int bmp_write_line(BITMAP *,int)'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(47) : see declaration of 'bmp_write_line'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(66) : warning C4793: '__asm' : causes native code generation for function 'unsigned int bmp_read_line(BITMAP *,int)'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(64) : see declaration of 'bmp_read_line'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(83) : warning C4793: '__asm' : causes native code generation for function 'void bmp_unwrite_line(BITMAP *)'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(81) : see declaration of 'bmp_unwrite_line'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(115) : warning C4793: '__asm' : causes native code generation for function 'fixed fixadd(fixed,fixed)'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(113) : see declaration of 'fixadd'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(137) : warning C4793: '__asm' : causes native code generation for function 'fixed fixsub(fixed,fixed)'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(135) : see declaration of 'fixsub'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(159) : warning C4793: '__asm' : causes native code generation for function 'fixed fixmul(fixed,fixed)'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(157) : see declaration of 'fixmul'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(189) : warning C4793: '__asm' : causes native code generation for function 'fixed fixdiv(fixed,fixed)'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(187) : see declaration of 'fixdiv'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(232) : warning C4793: '__asm' : causes native code generation for function 'int fixfloor(fixed)'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(230) : see declaration of 'fixfloor'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(248) : warning C4793: '__asm' : causes native code generation for function 'int fixceil(fixed)'
c:\program files\microsoft visual studio 8\vc\include\allegro/platform/al386vc.h(246) : see declaration of 'fixceil'
Linking...
i.obj : error LNK2028: unresolved token (0A00000B) "extern "C" void __cdecl set_window_title(char const *)" (?set_window_title@@$$J0YAXPBD@Z) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2028: unresolved token (0A000028) "extern "C" void __cdecl textout_centre(struct BITMAP *,struct FONT const *,char const *,int,int,int)" (?textout_centre@@$$J0YAXPAUBITMAP@@PBUFONT@@PBDHHH@Z) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2028: unresolved token (0A00002D) "extern "C" int __cdecl _WinMain(void *,void *,void *,char *,int)" (?_WinMain@@$$J0YAHPAX00PADH@Z) referenced in function "extern "C" int __stdcall WinMain(void *,void *,char *,int)" (?WinMain@@$$J216YGHPAX0PADH@Z)
i.obj : error LNK2028: unresolved token (0A00002E) "extern "C" int __cdecl keypressed(void)" (?keypressed@@$$J0YAHXZ) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2020: unresolved token (0A00002F) __imp__font
i.obj : error LNK2028: unresolved token (0A000030) "extern "C" int __cdecl makecol(int,int,int)" (?makecol@@$$J0YAHHHH@Z) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2028: unresolved token (0A000031) "extern "C" int __cdecl text_mode(int)" (?text_mode@@$$J0YAHH@Z) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2028: unresolved token (0A000032) "extern "C" void __cdecl allegro_message(char const *,...)" (?allegro_message@@$$J0YAXPBDZZ) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2020: unresolved token (0A000033) __imp__allegro_error
i.obj : error LNK2028: unresolved token (0A000034) "extern "C" int __cdecl set_gfx_mode(int,int,int,int,int)" (?set_gfx_mode@@$$J0YAHHHHHH@Z) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2028: unresolved token (0A000035) "extern "C" void __cdecl set_color_depth(int)" (?set_color_depth@@$$J0YAXH@Z) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2028: unresolved token (0A000036) "extern "C" int __cdecl install_keyboard(void)" (?install_keyboard@@$$J0YAHXZ) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2028: unresolved token (0A000037) "extern "C" void __cdecl allegro_message(char const *,...)" (?allegro_message@@$$J0YAXPBDZZ) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2020: unresolved token (0A000073) __imp__screen
i.obj : error LNK2028: unresolved token (0A000076) "extern "C" int __cdecl _install_allegro_version_check(int,int *,int (__cdecl*)(void (__cdecl*)(void)),int)" (?_install_allegro_version_check@@$$J0YAHHPAHP6AHP6AXXZ@ZH@Z) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2019: unresolved external symbol "extern "C" int __cdecl keypressed(void)" (?keypressed@@$$J0YAHXZ) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2019: unresolved external symbol "extern "C" void __cdecl textout_centre(struct BITMAP *,struct FONT const *,char const *,int,int,int)" (?textout_centre@@$$J0YAXPAUBITMAP@@PBUFONT@@PBDHHH@Z) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2001: unresolved external symbol __imp__font
i.obj : error LNK2001: unresolved external symbol __imp__screen
i.obj : error LNK2019: unresolved external symbol "extern "C" int __cdecl text_mode(int)" (?text_mode@@$$J0YAHH@Z) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2019: unresolved external symbol "extern "C" int __cdecl makecol(int,int,int)" (?makecol@@$$J0YAHHHH@Z) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2001: unresolved external symbol __imp__allegro_error
i.obj : error LNK2019: unresolved external symbol "extern "C" int __cdecl set_gfx_mode(int,int,int,int,int)" (?set_gfx_mode@@$$J0YAHHHHHH@Z) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2019: unresolved external symbol "extern "C" void __cdecl set_color_depth(int)" (?set_color_depth@@$$J0YAXH@Z) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2019: unresolved external symbol "extern "C" int __cdecl install_keyboard(void)" (?install_keyboard@@$$J0YAHXZ) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2019: unresolved external symbol "extern "C" void __cdecl set_window_title(char const *)" (?set_window_title@@$$J0YAXPBD@Z) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2019: unresolved external symbol "extern "C" void __cdecl allegro_message(char const *,...)" (?allegro_message@@$$J0YAXPBDZZ) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2019: unresolved external symbol "extern "C" int __cdecl _install_allegro_version_check(int,int *,int (__cdecl*)(void (__cdecl*)(void)),int)" (?_install_allegro_version_check@@$$J0YAHHPAHP6AHP6AXXZ@ZH@Z) referenced in function "int __cdecl _mangled_main(int,char * * const)" (?_mangled_main@@$$FYAHHQAPAD@Z)
i.obj : error LNK2019: unresolved external symbol "extern "C" int __cdecl _WinMain(void *,void *,void *,char *,int)" (?_WinMain@@$$J0YAHPAX00PADH@Z) referenced in function "extern "C" int __stdcall WinMain(void *,void *,char *,int)" (?WinMain@@$$J216YGHPAX0PADH@Z)
C:\Documents and Settings\Ham\My Documents\Visual Studio 2005\Projects\i\Debug\i.exe : fatal error LNK1120: 29 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Ham\My Documents\Visual Studio 2005\Projects\i\i\Debug\BuildLog.htm"
i - 30 error(s), 10 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Help ???

Go to: