Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » compilation error while cross-compiling a5

This thread is locked; no one can reply to it. rss feed Print
compilation error while cross-compiling a5
amarillion
Member #940
January 2001
avatar

I'm having another attempt at allegro cross-compilation with mingw on linux, with Allegro 5.0.10 this time.

Here is what I did first:

sudo apt-get install mingw32
wget http://alleg.sourceforge.net/files/dx70_mgw.zip
sudo unzip -a -d /usr/i586-mingw32msvc dx70_mgw.zip  

cd ~/prg/alleg/allegro-5.0.10/
mkdir Build/Mingw
cd Build/Mingw
cmake -DCMAKE_TOOLCHAIN_FILE=../../cmake/Toolchain-mingw.cmake ../..
make

Everything goes fine until...

#SelectExpand
1[ 14%] Building C object CMakeFiles/allegro.dir/src/win/wjoydxnu.c.obj 2/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c: In function joystick_dinput_acquire: 3/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:424: warning: implicit declaration of function IDirectInputDevice8_Acquire 4/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c: In function _al_win_joystick_dinput_unacquire: 5/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:446: warning: implicit declaration of function IDirectInputDevice8_Unacquire 6/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c: In function _al_win_joystick_dinput_grab: 7/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:478: warning: implicit declaration of function IDirectInputDevice8_SetCooperativeLevel 8/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c: In function joystick_enum_callback: 9/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:816: warning: implicit declaration of function IDirectInput8_CreateDevice 10/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:821: warning: implicit declaration of function IDirectInputDevice8_QueryInterface 11/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:822: warning: implicit declaration of function IDirectInputDevice8_Release 12/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:830: warning: implicit declaration of function IDirectInputDevice8_EnumObjects 13/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:836: warning: implicit declaration of function IDirectInputDevice8_SetDataFormat 14/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:841: warning: implicit declaration of function IDirectInputDevice8_SetProperty 15/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:878: warning: implicit declaration of function IDirectInputDevice8_SetEventNotification 16/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c: In function joydx_scan: 17/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:981: warning: implicit declaration of function IDirectInput8_EnumDevices 18/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:981: error: DI8DEVCLASS_GAMECTRL undeclared (first use in this function) 19/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:981: error: (Each undeclared identifier is reported only once 20/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:981: error: for each function it appears in.) 21/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:985: warning: implicit declaration of function IDirectInput8_Release 22/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c: In function update_joystick: 23/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:1366: warning: implicit declaration of function IDirectInputDevice8_Poll 24/home/martijn/prg/alleg/allegro-5.0.10/src/win/wjoydxnu.c:1369: warning: implicit declaration of function IDirectInputDevice8_GetDeviceData 25make[2]: *** [CMakeFiles/allegro.dir/src/win/wjoydxnu.c.obj] Error 1 26make[1]: *** [CMakeFiles/allegro.dir/all] Error 2

Any ideas?

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

amarillion
Member #940
January 2001
avatar

Thanks for the tip. I'll try again with DX9
Looks like I was looking at the old documentation, that's where I got DX7 from.

Elias
Member #358
May 2000

I just cross-compiled my speedhack entry with mingw64, it only needs the DirectX already included with mingw64, neither DX7.zip nor DX9.zip is necessary. So if you're using some old mingw32 just update to the newest mingw64 :)

--
"Either help out or stop whining" - Evert

Thomas Fjellstrom
Member #476
June 2000
avatar

Or msys2!

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

Polybios
Member #12,293
October 2010

For the record: Msys2 comes with a package manager and lets you install various packages of open source projects for Windows via basically typing one line. Up-to-date mingw64, most (all?) of Allegro's dependencies, Qt, and Allegro 5.0 among them.

amarillion
Member #940
January 2001
avatar

So how do I install msys2 on linux? :P I think this thread has derailed somewhere...

Thomas Fjellstrom
Member #476
June 2000
avatar

Oh, good luck with that. ;D. Cross compiling deps are probably pretty manual. Theoretically the mingw package for your distro should include dx. but who knows if its up to date or includes everything you need.

Also, sorry for derailing your thread. I misread :(

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

Elias
Member #358
May 2000

As I said, in Debian it's a matter of:

apt-get install mingw-w64

--
"Either help out or stop whining" - Evert

Go to: