Reply 40 of 49, by MiniMax
- Rank
- Moderator
wrote:You need directx headers for directx to be compiled. Check the configure...you should see some lines - checking for ddraw.h...
I have downloaded and extracted the latest DirectX SDK (dxsdk_feb2007.exe). I am a little unsure where to put them in my /mingw tree.
From various comments I found, it seems like I am supposed to copy the header files directly into /mingw/include, overwriting the following files:
-rw-r--r-- 1 MiniMax 100838 Jan 8 15:30 ./d3d9.h
-rw-r--r-- 1 MiniMax 22164 Jan 8 15:30 ./d3d9caps.h
-rw-r--r-- 1 MiniMax 72337 Jan 8 15:30 ./d3d9types.h
-rw-r--r-- 1 MiniMax 2919 Jan 12 19:18 ./dxerr8.h
-rw-r--r-- 1 MiniMax 2968 Jan 12 19:18 ./dxerr9.h
But for the moment, I have installed the header files from the DXSDK in a sub-directory, in /mingw/include/DX, and have defined CPPFLAGS=-I/mingw/include/DX before running configure. This seems to work - somewhat 😒
ddraw.h is found and appears to be okay. But dsound.h and dinput.h throws warnings:
checking Win32 compiler... yes
checking ddraw.h usability... yes
checking ddraw.h presence... yes
checking for ddraw.h... yes
checking dsound.h usability... no
checking dsound.h presence... yes
configure: WARNING: dsound.h: present but cannot be compiled
configure: WARNING: dsound.h: check for missing prerequisite headers?
configure: WARNING: dsound.h: see the Autoconf documentation
configure: WARNING: dsound.h: section "Present But Cannot Be Compiled"
configure: WARNING: dsound.h: proceeding with the preprocessor's result
configure: WARNING: dsound.h: in the future, the compiler will take precedence
configure: WARNING: ## ------------------------------------------ ##
configure: WARNING: ## Report this to the AC_PACKAGE_NAME lists. ##
configure: WARNING: ## ------------------------------------------ ##
checking for dsound.h... yes
checking dinput.h usability... no
checking dinput.h presence... yes
configure: WARNING: dinput.h: present but cannot be compiled
configure: WARNING: dinput.h: check for missing prerequisite headers?
configure: WARNING: dinput.h: see the Autoconf documentation
configure: WARNING: dinput.h: section "Present But Cannot Be Compiled"
configure: WARNING: dinput.h: proceeding with the preprocessor's result
configure: WARNING: dinput.h: in the future, the compiler will take precedence
configure: WARNING: ## ------------------------------------------ ##
configure: WARNING: ## Report this to the AC_PACKAGE_NAME lists. ##
configure: WARNING: ## ------------------------------------------ ##
checking for dinput.h... yes
checking for yasm... no
checking for nasm... no
configure: creating ./config.status
config.status: creating Makefile
Looking inside the confg.log for more detais I see:
configure:20: checking ddraw.h usability
configure:32: gcc -c -O3 -s -mms-bitfields -march=i686 -Iinclude -I/home/MiniMax/src/SDL-1.2.11-src/include -D_GNU_SOURCE=1 -I/mingw/include/DX -Iinclude -I/home/MiniMax/src/SDL-1.2.11-src/include -D_GNU_SOURCE=1 conftest.c >&5
configure:38: $? = 0
configure:42: test -z
|| test ! -s conftest.err
configure:45: $? = 0
configure:48: test -s conftest.o
configure:51: $? = 0
configure:61: result: yes
configure:65: checking ddraw.h presence
configure:75: gcc -E -I/mingw/include/DX -Iinclude -I/home/MiniMax/src/SDL-1.2.11-src/include -D_GNU_SOURCE=1 conftest.c
configure:81: $? = 0
configure:101: result: yes
configure:136: checking for ddraw.h
configure:143: result: yes
configure:162: checking dsound.h usability
configure:174: gcc -c -O3 -s -mms-bitfields -march=i686 -Iinclude -I/home/MiniMax/src/SDL-1.2.11-src/include -D_GNU_SOURCE=1 -I/mingw/include/DX -Iinclude -I/home/MiniMax/src/SDL-1.2.11-src/include -D_GNU_SOURCE=1 conftest.c >&5
In file included from conftest.c:124:
C:/Spool/dxsdk_feb2007/Include/dsound.h:1899: error: redefinition of typedef 'LPDIRECTSOUNDFULLDUPLEX'
C:/Spool/dxsdk_feb2007/Include/dsound.h:175: error: previous declaration of 'LPDIRECTSOUNDFULLDUPLEX' was here
( /mingw/include/DX is mounted from C:\Spool\dxsdk_feb2007/Include)
Checking dsound.h shows that configure (gcc) is correct:
$ nl dsound.h | egrep '175 typedef|1899 typedef'
175 typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX;
1899 typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX;
Any ideas why this is happening? Is it simply a case of bad coding by Microsoft, defining the same typedef twice (even if it is an identical definition)?
DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32