dxgraphics not compiling in NG

BlitzMax Forums/BlitzMax NG/dxgraphics not compiling in NG

xlsior(Posted May) [#1]
When recompiling NG, it bombs out for me at dxgraphics.mod:

[ 71%] Compiling:gadget.bmx.debug.win32.x64.c
[ 71%] Compiling:graphics.bmx.debug.win32.x64.c
[ 71%] Compiling:sdlgraphics.bmx.debug.win32.x64.c
[ 72%] Compiling:directx11.bmx.debug.win32.x64.c
[ 72%] Compiling:fonts.bmx.debug.win32.x64.c
c:/code/BlitzMaxNG510/MinGW32/bin/ar.exe: creating c:/code/BlitzMaxNG510/mod/brl.mod/timerdefault.mod/timerdefault.debug.win32.x64.a
c:/code/BlitzMaxNG510/mod/brl.mod/dxgraphics.mod/.bmx/d3d9graphics.bmx.debug.win32.x64.c: In function '_bb_brl_dxgraphics_d3d9graphics':
c:/code/BlitzMaxNG510/mod/brl.mod/dxgraphics.mod/.bmx/d3d9graphics.bmx.debug.win32.x64.c:2429:39: error: incompatible types when assigning to type 'struct pub_directx_d3d9_D3DCAPS9' from type 'int'
   brl_dxgraphics_d3d9graphics__d3dCaps=pub_directx_d3d9_D3DCAPS9_New_ObjectNew();
                                       ^


Using TDM MinGW 5.1.0, under windows.

Is this a problem with the module itself, or should I be using a different MinGW release? If so, which one is currently recommended?


Brucey(Posted May) [#2]
I was meant to sort this out at the weekend, but I was distracted.

My copy of bcc appears to generate stuff correctly... so I guess something went wrong somewhere.


xlsior(Posted May) [#3]
I just tried the following:

I recompiled the latest bcc and bmk, deleted my pub.mod and brl.mod folders, re-synched them from github and tried to recompile again -- pub.mod completed successfully, brl.mod blows up at the same d3d9graphics.bmx as above.


TomToad(Posted May) [#4]
Same problem here. Tried 2 different MinGW. gcc version 5.1.0 (tdm64-1) and tried gcc version 7.1.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project), both gave the same error.
Also, clicking on "About" in the IDE shows BMK version as blank and also FASM version as blank.


Derron(Posted May) [#5]
@ tomtoad
Bmx NG does not use fasm[.exe] .

Did one of you (windows users) try older BCCs ? Just to make things simpler for Brucey to fix.


Bye
Ron


TomToad(Posted May) [#6]
It appears v0.87 works.


Derron(Posted May) [#7]
Brucey committed something -> v0.89 should address this issue.

bye
Ron


TomToad(Posted May) [#8]
Well, now the modules will compile ok, but I get this error when compiling a program
C:/BlitzMaxNG/mod/brl.mod/dxgraphics.mod/dxgraphics.debug.win32.x86.a(d3d9graphics.bmx.debug.win32.x86.o): In function `bb_brl_dxgraphics_d3d9graphics':
C:/BlitzMaxNG/mod/brl.mod/dxgraphics.mod/.bmx/d3d9graphics.bmx.debug.win32.x86.c:2429: undefined reference to `pub_directx_d3d9_D3DCAPS9_New_ObjectNew'
Build Error: Failed to link C:/Users/James/Projects/solve it/Solve It.debug.exe
Process complete

If I change the driver to OpenGL and use framework so DX9 doesn't get included, then it works.


Derron(Posted May) [#9]
Did you recompile modules after updating bcc? As it changes struct-naming things might bork up if you skipped recompilation (not checked yet - my smartphone does not have a Windows VM on board :-)).


bye
Ron


TomToad(Posted May) [#10]
Yes, I rebuilt all the modules, both debug and release. V0.89 fixed the original problem with building the modules, but now can't compile a program with DX9.


Derron(Posted May) [#11]
There was another commit to bcc.git 2 hours ago - give it a whirl.


bye
Ron


TomToad(Posted May) [#12]
Good news is that DX9 works fine now. Bad news is that MaxGUI is broken in x86 compile.


Derron(Posted May) [#13]
MaxGUI for NG got an update by the master himself.


bye
Ron


TomToad(Posted May) [#14]
Fixed. :) everything almost works now. Still have the same problem with MaxGUI canvases that I had 5 month ago. So I guess NG is pretty much ready for anything which doesn't use them :)


xlsior(Posted May) [#15]
OK, it appears that the current version compiles, and I'm able to start an extremely basic test program using SetGraphicsDriver D3D9Max2DDriver() as well.