Archived

This topic is now archived and is closed to further replies.

ATronic

Compiling a project in DevC++ using DirectInput

Recommended Posts

Hi all, When trying to compile a project in DevC++ using DirectInput I get 66 errors. The majority of them are the following: "411 C:\Dev-Cpp\include\objidl.h `com_interface'' only supported with -fvtable-thunks" Any help is greatly appreciated. The project compiled error-free before introducing the directx code, which was provided by Dave Astle with the book "OpenGL Game Programming". Thanks ahead of time. Alex Broadwin A-Tronic Software & Design ----- "if you fail in life, you were destined to fail. If you suceed in life, call me." "The answer is out there." "Please help, I''m using Windows!"

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Go to the compile options and add that line "-fvtable-thunks" .. you need it to compile with the com interface that directx uses... "Extra libs and compiler options" or what it reads over the input box

Share this post


Link to post
Share on other sites
Ah, thanks! That solved many of the errors. It still, however, won''t compile. The majority of remaining errors are: "syntax error before..." or "parse error before..." generally refering to "LPDIRECTINPUT8" or "LPDIRECTINPUTDEVICE8". The code itself is error-free, so what could be causing these errors? I believe that I am linking to all of the needed libs. Thanks ahead of time for any help.

Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I think you need a package to run dx with devcpp...

http://www.gamap.cz/tutors/directx/download/dx4devc.zip

Try that one ... i think the errors should disapear or something.. have never tried it but im gona

Share this post


Link to post
Share on other sites
I have the latest directx package installed for DevC++. Thankyou, though. Hmmm, still wonder what the problems is.

Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You need the package that i wrote... directx seems to not be supported under dev-cpp .. you can use it with the package i wrote... i have tried it and it works.. you just extract the files into your lib/include and so on .. and place d3dx8d.dll into your project dir and it runs

and be sure to read the readme file

Share this post


Link to post
Share on other sites
No link. No profile. And directx IS supported by devc++ (I got the package with it''s update program). So, no, that isn''t the problem.

Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Ohh you maybe had the package.. well i have been sick the last days.. everything is kinda blurry ) Hmm... if you have the dx4devc package i duno realy what can be wrong (

Share this post


Link to post
Share on other sites
Building Makefile: "C:\Projects\bwMax\Makefile.win"
Executing make...
make.exe -f "C:\Projects\bwMax\Makefile.win" all
gcc -c main.cpp -o main.o -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/include/g++-3" -I"C:/Dev-Cpp/include" -fvtable-thunks -fexceptions -pg -g3 -O1 -mwindows

In file included from C:/Dev-Cpp/include/dmusicc.h:17,
from AudioSystem.h:20,
from main.cpp:10:
C:/Dev-Cpp/include/mmsystem.h:24: warning: `MAKEFOURCC'' redefined
C:/Dev-Cpp/include/ddraw.h:62: warning: this is the location of the previous definition
In file included from C:/Dev-Cpp/include/dmusicc.h:21,
from AudioSystem.h:20,
from main.cpp:10:
C:/Dev-Cpp/include/dmdls.h:25: warning: `MAKEFOURCC'' redefined
C:/Dev-Cpp/include/mmsystem.h:24: warning: this is the location of the previous definition

In file included from main.cpp:9:
InputSystem.h:26: parse error before `pDI''
InputSystem.h:40: syntax error before `;''
InputSystem.h:49: parse error before `pDI''
InputSystem.h:63: syntax error before `;''
InputSystem.h:94: syntax error before `;''
In file included from AudioSystem.h:18,
from main.cpp:10:
C:/Dev-Cpp/include/dsound.h:61: syntax error before `*''
C:/Dev-Cpp/include/dsound.h:128: syntax error before `;''
C:/Dev-Cpp/include/dsound.h:142: syntax error before `;''
C:/Dev-Cpp/include/dsound.h:193: syntax error before `;''

C:/Dev-Cpp/include/dsound.h:337: `LPWAVEFORMATEX'' was not declared in this scope
C:/Dev-Cpp/include/dsound.h:337: parse error before `,''
C:/Dev-Cpp/include/dsound.h:337: virtual outside class declaration
C:/Dev-Cpp/include/dsound.h:337: warning: `__stdcall__'' attribute directive ignored
C:/Dev-Cpp/include/dsound.h:337: initializer list being treated as compound expression
C:/Dev-Cpp/include/dsound.h:346: `LPCWAVEFORMATEX'' was not declared in this scope
C:/Dev-Cpp/include/dsound.h:346: virtual outside class declaration
C:/Dev-Cpp/include/dsound.h:346: warning: `__stdcall__'' attribute directive ignored
C:/Dev-Cpp/include/dsound.h:607: `LPWAVEFORMATEX'' was not declared in this scope
C:/Dev-Cpp/include/dsound.h:607: parse error before `,''
C:/Dev-Cpp/include/dsound.h:607: virtual outside class declaration
C:/Dev-Cpp/include/dsound.h:607: warning: `__stdcall__'' attribute directive ignored
C:/Dev-Cpp/include/dsound.h:607: redefinition of `long int GetFormat''
C:/Dev-Cpp/include/dsound.h:337: `long int GetFormat'' previously defined here
C:/Dev-Cpp/include/dsound.h:607: initializer list being treated as compound expression
In file included from C:/Dev-Cpp/include/dmusicc.h:21,
from AudioSystem.h:20,
from main.cpp:10:
C:/Dev-Cpp/include/dmdls.h:75: declaration of `struct _rloop _DMUS_REGION::WLOOP[1]''
C:/Dev-Cpp/include/dls1.h:264: changes meaning of `WLOOP'' from `typedef struct _rloop WLOOP''
In file included from main.cpp:10:
AudioSystem.h:31: syntax error before `*''
AudioSystem.h:58: `IDirectMusicSegment8'' was not declared in this scope
AudioSystem.h:58: `seg'' was not declared in this scope
AudioSystem.h:58: variable or field `SetSegment'' declared void
AudioSystem.h:58: syntax error before `{''
AudioSystem.h: In method `CAudio::CAudio()'':
AudioSystem.h:42: `dmusicSegment'' undeclared (first use this function)
AudioSystem.h:42: (Each undeclared identifier is reported only once
AudioSystem.h:42: for each function it appears in.)
AudioSystem.h: At top level:
AudioSystem.h:59: syntax error at null character
AudioSystem.h: In function `struct IDirectSound3DBuffer * Get3DBuffer()'':
AudioSystem.h:62: `ds3DBuffer'' undeclared (first use this function)
AudioSystem.h: In function `bool Is3DSound()'':
AudioSystem.h:64: `is3DSound'' undeclared (first use this function)
AudioSystem.h: At top level:

AudioSystem.h:69: parse error before `}''
AudioSystem.h:77: syntax error before `*''
AudioSystem.h:78: syntax error before `*''

AudioSystem.h:79: syntax error before `*''
AudioSystem.h:80: syntax error before `*''
AudioSystem.h:89: syntax error before `*''
AudioSystem.h:91: syntax error before `*''
AudioSystem.h:96: `IDirectMusicSegment8'' was not declared in this scope
AudioSystem.h:96: `dmSeg'' was not declared in this scope
AudioSystem.h:96: parse error before `,''
AudioSystem.h:97: `IDirectMusicSegment8'' was not declared in this scope
AudioSystem.h:97: `dmSeg'' was not declared in this scope
AudioSystem.h:97: variable or field `StopSegment'' declared void
AudioSystem.h:108: syntax error before `*''
AudioSystem.h: In method `void CAudioSystem::SetListenerOrientation(float, float, float, float, float, float)'':
AudioSystem.h:105: `ds3DListener'' undeclared (first use this function)
AudioSystem.h: At top level:

AudioSystem.h:109: parse error at null character
main.cpp: In function `int WinMain(HINSTANCE__ *, HINSTANCE__ *, CHAR *, int)'':
main.cpp:201: warning: converting NULL to non-pointer type
main.cpp:216: warning: converting NULL to non-pointer type
main.cpp:216: warning: converting NULL to non-pointer type

make.exe: *** [main.o] Error 1

Execution terminated

Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I''m using Windows!"

Share this post


Link to post
Share on other sites