Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Problem with Installing Allegro 5 with MSYS2

Credits go to Edgar Reynaldo and Thomas Fjellstrom for helping out!
This thread is locked; no one can reply to it. rss feed Print
Problem with Installing Allegro 5 with MSYS2
Martin Mikaelsson
Member #5,325
December 2004

Hi there.
I have stucked totally on installing Allegro 5.1 with MSYS2.
First of all; I followed the instruction on this site:
Allegro with MSYS2
I downloaded all the libraries and Everything was fine down to cmake part. The only thing it didn't find was OpenSL but I supposed its not a critical part to Allegro. However if you have any tip on installing OpenSL you are welcome to tell me.
Ok, to the problem. When I'm starting to make it I get several errors that looks like this

#SelectExpand
1C:/devel/DXSDK/Include/xinput.h:xxx:x: error: unknown type name '__in' 2C:/devel/DXSDK/Include/xinput.h:xxx:X: error: unknown type name '__out' 3C:/devel/DXSDK/Include/xinput.h:xxx:X: error: unknown type name '__reserved'

There are many lines with this error and only in xinput.h file. How do I solve this? Do I have to modify the file to make it work?
I'm using ming64 to do all of this in Windows 8.1.
/Martin

Thomas Fjellstrom
Member #476
June 2000
avatar

the mingw in msys2 includes the dx headers. You probably shouldn't use the DXSDK headers.

--
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

Martin Mikaelsson
Member #5,325
December 2004

Ok, thanks. I have now installed the Allegro 5.1 with this guide. I have now these files in the bin folder

#SelectExpand
1C:\MinGW\msys\1.0\home\build_allegro_monolith\lib\allegro_monolith-5.1.dll 2C:\MinGW\msys\1.0\home\build_allegro_monolith\lib\liballegro_monolith.dll.a

. All the include files is in allegro path. But when I try to build a Project with Allegro I get some undefined errors in the linkers. I'm still Little tired after spending few hours to solve this. WHere shall I put the "-lallegro_monolith" flag in Code::Blocks?

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Martin Mikaelsson
Member #5,325
December 2004

I have tried that but I don't Think thats the problem. After I build allegro copies (Monolith both debug and Release) and even static release and debug I moved all new files in a new directory (c:\allegro5.1) because Everything where in c:\ming64\ming64 directory. It seems that all builded files goes there. Even If I do all in exactly order in the website it still give me undefined error.
I looked around and Code::Blocks using right now the gcc compiler in c:\mingGW\bin and when I type "gcc -v" it says v 4.8.1 (gcc). But when I'm going to the c:\ming64\ming64\bin and type "gcc -v" there i get version 4.9.2 (rev5, Buildt by MSYS2 Project).
Can that be the problem that it want to link right?
I'm going to do more tries after I get something to eat :P

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

it still give me undefined error.

Then you're not linking to the library, or you're linking to the wrong version of the library that doesn't have that function in it.

You have to build your program with the same compiler you built allegro with.

Martin Mikaelsson
Member #5,325
December 2004

Crap! Then I have to start over again.
ok, thank you for all the answers. I will do a new try tomorrow.

Go to: