Author Topic: Problem with DirectX 9 in Code::Blocks  (Read 5301 times)

Offline savail

  • Single posting newcomer
  • *
  • Posts: 3
Problem with DirectX 9 in Code::Blocks
« on: April 09, 2011, 11:26:07 am »
Hello I have been successfully learning DirectX 9 until I ran function: D3DXCreateSprite... The program doesn't even compile. I use Code::Blocks and GNU Gcc Compiler and I've got hundreds of errors and warnings after using the function above like:
Code
D:\DirectX\include\d3d9types.h|25|warning: ignoring #pragma warning |
D:\DirectX\include\d3d9types.h|1850|warning: ignoring #pragma warning |
D:\DirectX\include\d3dx9math.h|19|warning: ignoring #pragma warning |
D:\DirectX\include\d3dx9math.h|1761|warning: ignoring #pragma warning |
D:\DirectX\include\d3dx9core.h|644|warning: multi-line comment|
D:\DirectX\include\d3dx9math.inl||In constructor 'D3DXVECTOR2_16F::D3DXVECTOR2_16F(const D3DXFLOAT16*)':|
D:\DirectX\include\d3dx9math.inl|228|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl||In member function 'BOOL D3DXVECTOR2_16F::operator==(const D3DXVECTOR2_16F&) const':|
D:\DirectX\include\d3dx9math.inl|257|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|257|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl||In member function 'BOOL D3DXVECTOR2_16F::operator!=(const D3DXVECTOR2_16F&) const':|
D:\DirectX\include\d3dx9math.inl|263|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|263|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl||In constructor 'D3DXVECTOR3_16F::D3DXVECTOR3_16F(const D3DXFLOAT16*)':|
D:\DirectX\include\d3dx9math.inl|457|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl||In member function 'BOOL D3DXVECTOR3_16F::operator==(const D3DXVECTOR3_16F&) const':|
D:\DirectX\include\d3dx9math.inl|488|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|488|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl||In member function 'BOOL D3DXVECTOR3_16F::operator!=(const D3DXVECTOR3_16F&) const':|
D:\DirectX\include\d3dx9math.inl|495|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|495|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl||In constructor 'D3DXVECTOR4_16F::D3DXVECTOR4_16F(const D3DXFLOAT16*)':|
D:\DirectX\include\d3dx9math.inl|688|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|689|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl||In member function 'BOOL D3DXVECTOR4_16F::operator==(const D3DXVECTOR4_16F&) const':|
D:\DirectX\include\d3dx9math.inl|729|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|729|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|730|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|730|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl||In member function 'BOOL D3DXVECTOR4_16F::operator!=(const D3DXVECTOR4_16F&) const':|
D:\DirectX\include\d3dx9math.inl|736|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|736|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|737|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|737|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3d9types.h|25|warning: ignoring #pragma warning |
D:\DirectX\include\d3d9types.h|1850|warning: ignoring #pragma warning |
D:\DirectX\include\d3dx9math.h|19|warning: ignoring #pragma warning |
D:\DirectX\include\d3dx9math.h|1761|warning: ignoring #pragma warning |
D:\DirectX\include\d3dx9core.h|644|warning: multi-line comment|
D:\DirectX\include\d3dx9math.inl||In constructor 'D3DXVECTOR2_16F::D3DXVECTOR2_16F(const D3DXFLOAT16*)':|
D:\DirectX\include\d3dx9math.inl|228|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl||In member function 'BOOL D3DXVECTOR2_16F::operator==(const D3DXVECTOR2_16F&) const':|
D:\DirectX\include\d3dx9math.inl|257|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|257|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl||In member function 'BOOL D3DXVECTOR2_16F::operator!=(const D3DXVECTOR2_16F&) const':|
D:\DirectX\include\d3dx9math.inl|263|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|263|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl||In constructor 'D3DXVECTOR3_16F::D3DXVECTOR3_16F(const D3DXFLOAT16*)':|
D:\DirectX\include\d3dx9math.inl|457|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl||In member function 'BOOL D3DXVECTOR3_16F::operator==(const D3DXVECTOR3_16F&) const':|
D:\DirectX\include\d3dx9math.inl|488|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|488|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl||In member function 'BOOL D3DXVECTOR3_16F::operator!=(const D3DXVECTOR3_16F&) const':|
D:\DirectX\include\d3dx9math.inl|495|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|495|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl||In constructor 'D3DXVECTOR4_16F::D3DXVECTOR4_16F(const D3DXFLOAT16*)':|
D:\DirectX\include\d3dx9math.inl|688|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|689|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl||In member function 'BOOL D3DXVECTOR4_16F::operator==(const D3DXVECTOR4_16F&) const':|
D:\DirectX\include\d3dx9math.inl|729|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|729|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|730|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|730|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl||In member function 'BOOL D3DXVECTOR4_16F::operator!=(const D3DXVECTOR4_16F&) const':|
D:\DirectX\include\d3dx9math.inl|736|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|736|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|737|warning: dereferencing type-punned pointer will break strict-aliasing rules|
D:\DirectX\include\d3dx9math.inl|737|warning: dereferencing type-punned pointer will break strict-aliasing rules|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
||Warning: .drectve `/DEFAULTLIB:"uuid.lib" /DEFAULTLIB:"uuid.lib" ' unrecognized|
Z]+0x15)||undefined reference to `??3@YAXPAX@Z'|
Z]+0x15)||undefined reference to `??3@YAXPAX@Z'|
12]+0x1b)||undefined reference to `??2@YAPAXI@Z'|
Z]+0x15)||undefined reference to `??3@YAXPAX@Z'|
Z]+0x15)||undefined reference to `??3@YAXPAX@Z'|
Z]+0x15)||undefined reference to `??3@YAXPAX@Z'|
8]+0x28)||undefined reference to `??2@YAPAXI@Z'|
12]+0x1b)||undefined reference to `??2@YAPAXI@Z'|
28]+0x25)||undefined reference to `??2@YAPAXI@Z'|
28]+0x28)||undefined reference to `??2@YAPAXI@Z'|
8]+0x25)||undefined reference to `??2@YAPAXI@Z'|
Z]+0x1f)||undefined reference to `IID_IUnknown'|
Z]+0xd)||undefined reference to `??2@YAPAXI@Z'|
Z]+0x14)||undefined reference to `??3@YAXPAX@Z'|
XZ]+0xdd)||undefined reference to `??3@YAXPAX@Z'|
XZ]+0xe9)||undefined reference to `??3@YAXPAX@Z'|
XZ]+0xf4)||undefined reference to `??3@YAXPAX@Z'|
XZ]+0xff)||undefined reference to `??3@YAXPAX@Z'|
Z]+0xf7)||undefined reference to `??2@YAPAXI@Z'|
Z]+0x59)||undefined reference to `??2@YAPAXI@Z'|
Z]+0x77)||undefined reference to `??3@YAXPAX@Z'|
Z]+0x81)||undefined reference to `??2@YAPAXI@Z'|
Z]+0xb4)||undefined reference to `??3@YAXPAX@Z'|
Z]+0xc9)||undefined reference to `??2@YAPAXI@Z'|
Z]+0xdf)||undefined reference to `??3@YAXPAX@Z'|
Z]+0xf0)||undefined reference to `??2@YAPAXI@Z'|
Z]+0x145)||undefined reference to `??3@YAXPAX@Z'|
Z]+0x1f)||undefined reference to `IID_IUnknown'|
Z]+0x1e)||undefined reference to `??2@YAPAXI@Z'|
Z]+0x78)||undefined reference to `??3@YAXPAX@Z'|
XZ]+0x3)||undefined reference to `??3@YAXPAX@Z'|
Z]+0x32)||undefined reference to `??2@YAPAXI@Z'|
Z]+0x68)||undefined reference to `??3@YAXPAX@Z'|
XZ]+0x3)||undefined reference to `??3@YAXPAX@Z'|
Z]+0x32)||undefined reference to `??2@YAPAXI@Z'|
Z]+0x68)||undefined reference to `??3@YAXPAX@Z'|
XZ]+0x3)||undefined reference to `??3@YAXPAX@Z'|
Z]+0x32)||undefined reference to `??2@YAPAXI@Z'|
Z]+0x68)||undefined reference to `??3@YAXPAX@Z'|
XZ]+0x3)||undefined reference to `??3@YAXPAX@Z'|
Z]+0x43)||undefined reference to `??2@YAPAXI@Z'|
Z]+0x7d)||undefined reference to `??3@YAXPAX@Z'|
Z]+0x15)||undefined reference to `??3@YAXPAX@Z'|
XZ]+0x3)||undefined reference to `??3@YAXPAX@Z'|
Z]+0x32)||undefined reference to `??2@YAPAXI@Z'|
Z]+0x65)||undefined reference to `??3@YAXPAX@Z'|
XZ]+0x3)||undefined reference to `??3@YAXPAX@Z'|
Z]+0x29)||undefined reference to `??2@YAPAXI@Z'|
Z]+0x67)||undefined reference to `??3@YAXPAX@Z'|
XZ]+0x3)||undefined reference to `??3@YAXPAX@Z'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 116 warnings ===|

Has anyone ever met with such a problem? I hardly find any information about this. I will be very very grateful for help!
« Last Edit: April 09, 2011, 11:27:43 am by savail »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7789
    • My Best Post
Re: Problem with DirectX 9 in Code::Blocks
« Reply #1 on: April 09, 2011, 01:28:02 pm »
1. Turn on Full Compiler logging.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

2. Find an website that supports DirectX 9 compiling or your compiler.

3. Find the right directions to compile DirectX 9 or DirectX 9 Apps using the Compiler you are using likely MinGW GCC.

4. Ask your programing questions on the site you find that supports DirectX 9 or DirectX 9 Apps compiling or your compiler.

Code::Blocks questions like where is the place to add this compiler/linker option inside Code::Blocks are the type of questions that are valid for this site.

Note: You could change compilers to match your directions.
Edit: Some of your warnings match what would happen if you use Microsoft Visual C/C++ directions/options to build using MinGW GCC.

Tim S
« Last Edit: April 09, 2011, 03:56:19 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org