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... yeschecking ddraw.h usability... yeschecking ddraw.h presence... yeschecking for ddraw.h... yeschecking dsound.h usability... nochecking dsound.h presence... yesconfigure: WARNING: dsound.h: present but cannot be compiledconfigure: WARNING: dsound.h: check for missing prerequisite headers?configure: WARNING: dsound.h: see the Autoconf documentationconfigure: WARNING: dsound.h: section "Present But Cannot Be Compiled"configure: WARNING: dsound.h: proceeding with the preprocessor's resultconfigure: WARNING: dsound.h: in the future, the compiler will take precedenceconfigure: WARNING: ## ------------------------------------------ ##configure: WARNING: ## Report this to the AC_PACKAGE_NAME lists. ##configure: WARNING: ## ------------------------------------------ ##checking for dsound.h... yeschecking dinput.h usability... nochecking dinput.h presence... yesconfigure: WARNING: dinput.h: present but cannot be compiledconfigure: WARNING: dinput.h: check for missing prerequisite headers?configure: WARNING: dinput.h: see the Autoconf documentationconfigure: WARNING: dinput.h: section "Present But Cannot Be Compiled"configure: WARNING: dinput.h: proceeding with the preprocessor's resultconfigure: WARNING: dinput.h: in the future, the compiler will take precedenceconfigure: WARNING: ## ------------------------------------------ ##configure: WARNING: ## Report this to the AC_PACKAGE_NAME lists. ##configure: WARNING: ## ------------------------------------------ ##checking for dinput.h... yeschecking for yasm... nochecking for nasm... noconfigure: creating ./config.statusconfig.status: creating Makefile
Looking inside the confg.log for more detais I see:
configure:20: checking ddraw.h usabilityconfigure: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 >&5configure:38: $? = 0configure:42: test -z|| test ! -s conftest.errconfigure:45: $? = 0configure:48: test -s conftest.oconfigure:51: $? = 0configure:61: result: yesconfigure:65: checking ddraw.h presenceconfigure:75: gcc -E -I/mingw/include/DX -Iinclude -I/home/MiniMax/src/SDL-1.2.11-src/include -D_GNU_SOURCE=1 conftest.cconfigure:81: $? = 0configure:101: result: yesconfigure:136: checking for ddraw.hconfigure:143: result: yesconfigure:162: checking dsound.h usabilityconfigure: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 >&5In 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