I encountered a few hiccups while installing Allegro on Windows Vista.
Everything compiled fine for both dynamically and statically linked versions of Allegro for the debug , optimised , and profiling versions of the Allegro Library.
I did have a few problems with the installation though , nothing too serious.
When I was installing Allegro , make install failed to copy the allegro libraries to the Windows\System32 folder while installing on Vista for the dynamically linked debug , optimized , and profiling versions of Allegro. Apparently in Vista they've made some sort of provision about copying things to the Windows\System32 folder so it denied access to copy into those folders.
Here's an annotated version of the cmd console output while building Allegro :
Allegro compile\install log on Windows Vista
1 | c:\mingw\allegro>fix.bat mingw |
2 | Configuring Allegro for Windows/MinGW... |
3 | Done! |
4 | c:\mingw\allegro>mingw32-make DEBUGMODE=1 |
5 | Compiling Allegro for MinGW32, debugging. Please wait... |
6 | |
7 | ...compiled ok |
8 | |
9 | The debugging MinGW32 library has been compiled. |
10 | Run "make install" with the options you passed to "make" |
11 | in order to complete the installation. |
12 | |
13 | c:\mingw\allegro>mingw32-make install DEBUGMODE=1 |
14 | misc\mdhelper.bat C:\mingw\lib |
15 | misc\mdhelper.bat C:\mingw\include |
16 | misc\mdhelper.bat C:\mingw\include\allegro |
17 | misc\mdhelper.bat C:\mingw\include\allegro\platform |
18 | misc\mdhelper.bat C:\mingw\include\allegro\internal |
19 | misc\mdhelper.bat C:\mingw\include\allegro\inline |
20 | copy lib\mingw32\liballd.a C:\mingw\lib |
21 | 1 file(s) copied. |
22 | copy lib\mingw32\alld42.dll C:\Windows\system32 |
23 | Access is denied. |
24 | 0 file(s) copied. |
25 | mingw32-make: *** [C:/Windows/system32/alld42.dll] Error 1 |
26 | |
27 | c:\mingw\allegro>mingw32-make |
28 | Compiling Allegro for MinGW32, optimised. Please wait... |
29 | |
30 | ... compiled ok |
31 | |
32 | The optimised MinGW32 library has been compiled. |
33 | Run "make install" with the options you passed to "make" |
34 | in order to complete the installation. |
35 | |
36 | c:\mingw\allegro>mingw32-make install |
37 | misc\mdhelper.bat C:\mingw\lib |
38 | misc\mdhelper.bat C:\mingw\include |
39 | misc\mdhelper.bat C:\mingw\include\allegro |
40 | misc\mdhelper.bat C:\mingw\include\allegro\platform |
41 | misc\mdhelper.bat C:\mingw\include\allegro\internal |
42 | misc\mdhelper.bat C:\mingw\include\allegro\inline |
43 | copy lib\mingw32\liballeg.a C:\mingw\lib |
44 | 1 file(s) copied. |
45 | copy lib\mingw32\alleg42.dll C:\Windows\system32 |
46 | Access is denied. |
47 | 0 file(s) copied. |
48 | mingw32-make: *** [C:/Windows/system32/alleg42.dll] Error 1 |
49 | |
50 | c:\mingw\allegro>mingw32-make PROFILEMODE=1 |
51 | Compiling Allegro for MinGW32, profiling. Please wait... |
52 | |
53 | ... compiled ok |
54 | |
55 | The profiling MinGW32 library has been compiled. |
56 | Run "make install" with the options you passed to "make" |
57 | in order to complete the installation. |
58 | |
59 | c:\mingw\allegro>mingw32-make install PROFILEMODE=1 |
60 | misc\mdhelper.bat C:\mingw\lib |
61 | misc\mdhelper.bat C:\mingw\include |
62 | misc\mdhelper.bat C:\mingw\include\allegro |
63 | misc\mdhelper.bat C:\mingw\include\allegro\platform |
64 | misc\mdhelper.bat C:\mingw\include\allegro\internal |
65 | misc\mdhelper.bat C:\mingw\include\allegro\inline |
66 | copy lib\mingw32\liballp.a C:\mingw\lib |
67 | 1 file(s) copied. |
68 | copy lib\mingw32\allp42.dll C:\Windows\system32 |
69 | Access is denied. |
70 | 0 file(s) copied. |
71 | mingw32-make: *** [C:/Windows/system32/allp42.dll] Error 1 |
72 | |
73 | c:\mingw\allegro>notepad .\allegro_dynamic_compile_log.txt |
74 | |
75 | c:\mingw\allegro> |
--------------------------------------------
I thought that maybe mingw32-make wouldn't have permission by itself , so I tried again by entering the copy command myself , but it still failed.
c:\mingw\allegro\lib\mingw32>copy .*.dll c:\Windows\System32 .\alld42.dll Access is denied. .\alleg42.dll Access is denied. .\allp42.dll Access is denied. 0 file(s) copied. c:\mingw\allegro\lib\mingw32>
----------------------------------------------
I had to use explorer to copy the three dll's over to the Windows\System32 folder.
Even then , I had to give administrator permission before it would copy them and then I had to say it was okay to continue again. Vista is a little paranoid , I think.
[Separate side topic]
While I was getting MinGW ready to compile on Vista , I couldn't get things to compile right away. I decompressed all the .tar.gz files into C:\mingw , set my path using "path c:\mingw\bin;%PATH%" and tried to compile some simple c and cpp files. It kept telling me that there was a mingw installation error and it couldn't find cc1.exe or cc1plus.exe. I had to alter the path again so it could find those files and then it compiled plain c and cpp source files okay after that.
So I used this to fix the PATH variable instead :
"path c:\mingw\libexec\gcc\mingw32\3.4.5;c:\mingw\bin;%PATH%"
(That's a line I use in a batch file that runs when I open a specialized cmd interpreter)
(cc1.exe and cc1plus.exe were in the 3.4.5 folder)
Just a note in case anyone else encounters that at some point.
Even then , I had to give administrator permission before it would copy them and then I had to say it was okay to continue again. Vista is a little paranoid , I think.
It's what all other systems do for ages.
Isn't there something like "su" on unix, to run a program from a cdm line as another user? "runas"?
I would disable UAC if I were you. It will just annoy you to no end.
Just a note in case anyone else encounters that at some point.
It's well known that MinGW is broken under Vista. Adjusting the path fixes most things, but you still cannot do things such as compile files on secondary drives.
I'm curious to know what changed in the way Vista worked to how XP worked that would cause such seemingly random breakage in MinGW while other programs keep working.
That aside though,
Adjusting the path fixes most things, but you still cannot do things such as compile files on secondary drives.
I did a quick google, and according to this forum post linked from this wiki article it does work, at least from Code::Blocks. Is their setup different or is this one of those cases where things randomly work for some people but not for others?
Trent also has been using mingw for developing Allegro 5 for months, so it can't be totally broken.
I'm curious to know what changed in the way Vista worked to how XP worked that would cause such seemingly random breakage in MinGW while other programs keep working.
IIRC, they were relying on something with undefined outcome. MS fixed a bug or something, and it broke MinGW.
I didn't say it was totally broken. The path system is broken due to a horrible design by the MinGW people.
The first problem I encountered was that the built-in paths within the mingw environment were no longer working. This is an actual mingw bug that has been tracked down to a change in the way the Microsoft standard C libraries handle invalid parameters. Older versions of the DLL would not check invalid parameters and go down potentially untested code paths with them. The versions in Vista do stricter parameter checking. Some calls made by the mingw tools pass invalid parameters to one of the functions and fail, causing the internal paths to quit working.
It's possible to work around it by adding extra files to the paths, by copying MinGW libraries all over the place, and other annoyances. Some of these things you may get for free from an IDE (or they might even be updated to work around the MinGW bug), so you might not notice all the problems.
Installing Allegro On Vista ..
It can't be done! There is no way!
*queue heroic music*
Isn't there something like "su" on unix, to run a program from a cdm line as another user? "runas"?
The cmd line interpreter I was installing Allegro from was started from an Administrator account , apparently it doesn't have the same permissions as explorer.
I would disable UAC if I were you. It will just annoy you to no end.
What does UAC stand for? Is there a control panel setting for it somewhere?
Vista asks whether I want to give permission for more than a few different kind of tasks.
The problem here actually is, that MinGW is unable to find its helper executeables, in this case cc1plus.exe. To fix this go to your "Settings" -> "Compiler and Debugger" -> "Toolchain executeables" -> "Additional paths" and add there the Directory "C:\MinGW\libexec\gcc\mingw32\MinGW-Version" where MinGW-Version is the Version of MinGW you are using
When I got Code::Blocks installed and tried to compile a simple c or c++ source file this is the same error and same solution that I used to fix it.
Thanks for the informative link , it'll be useful.
UAC? I always thought that was the Union Aerospace Corporation.
UAC? I always thought that was the Union Aerospace Corporation.
M$ bought them out and rebadged it trying to hide the fact that they didn't develop the gateways to hell themselves.