![]() |
|
Linking against an older Allegro version |
Specter Phoenix
Member #1,425
July 2001
![]() |
I just installed A 5.1.4 but found that the keyboard issue caused problems with me, but I still have 5.1.3 installed on the computer. How do I link to the older version for building my programs until the issue is fixed in allegro?
|
LennyLen
Member #5,313
December 2004
![]() |
The same way you link any library. Just make sure you're pointing the linker at the correct directory.
|
Specter Phoenix
Member #1,425
July 2001
![]() |
Well I have two versions of allegro 5.1.3 and 5.1.4, but when I compile it links against 5.1.4 which appears to have keyboard retard-ism on my laptop and desktop. My program will compile fine if I don't bother using the keyboard I suppose. Just I didn't know how to tell it to link against 5.1.3 instead.
|
Kris Asick
Member #1,424
July 2001
|
I still have almost every previous stable release of A5 on my system. Each one is stored in its own folder/directory, so all I need to do is set up my MSVC10 project settings to point towards the appropriate folder for the version I want to use. (Though typically, I have no reason to link to older stable versions, still nice to have the option.) Failing that, try moving your 5.1.4 folder to somewhere completely inaccessible by your compiler and linker and see what happens. --- Kris Asick (Gemini) |
Specter Phoenix
Member #1,425
July 2001
![]() |
I just tried doing a simpler program. I did: 1#include <allegro5/allegro.h>
2#include <iostream>
3
4int main()
5{
6 uint32_t version = al_get_allegro_version();
7 int major = version >> 24;
8 int minor = (version >> 16) & 255;
9 int revision = (version >> 8) & 255;
10 int release = version & 255;
11
12 std::cout << "Compiled with Allegro version " << major << "." << minor << "." << revision << "[" << release << "]" << '\n';
13
14
15 if(!al_init())
16 {
17 std::cout << "Allegro failed to initialize...\n";
18 }
19
20 if(!al_install_keyboard())
21 {
22 std::cout << "Failed to install keyboard...\n";
23 }
24
25 return 0;
26}
It compiles and runs fine, which tells me my other game was broke in 5.1.3 but didn't show til updating to 5.1.4 and recompiling. Debugging don't help though as it just points to the install keyboard line.
|
|