wxglmax2d and wxmax2d

BlitzMax Forums/Brucey's Modules/wxglmax2d and wxmax2d

VicToMeyeZR(Posted 2010) [#1]
I get this at module compile time

Compiling:wxglmax2d.bmx
Compile Error: Overriding method differs by type
[C:/BlitzMax/mod/wx.mod/wxglmax2d.mod/wxglmax2d.bmx;200;2]
Build Error: failed to compile
C:/BlitzMax/mod/wx.mod/wxglmax2d.mod/wxglmax2d.bmx



I can't seem to find any overloaded functions in the module though.

Any thought?

Is there any way to tell where in the file its referring to?

No way to put line numbers in the IDE?


plash(Posted 2010) [#2]
You need to change this line (line 200):
Method Draw( x0#,y0#,x1#,y1#,tx#,ty# )

to this:
Method Draw( x0#,y0#,x1#,y1#,tx#,ty#,sx#,sy#,sw#,sh# )

in wx.mod/wxglmax2d.mod/wxglmax2d.bmx


VicToMeyeZR(Posted 2010) [#3]
Thank you for that....

ok, that fixed that part. Now this error

Compiling:wxglmax2d.bmx
Compile Error: Unable to create new object of abstract type 'TGLMax2DDriver' due to abstract method 'SetResolution'
[C:/BlitzMax/mod/wx.mod/wxglmax2d.mod/wxglmax2d.bmx;507;2]
Build Error: failed to compile C:/BlitzMax/mod/wx.mod/wxglmax2d.mod/wxglmax2d.bmx



plash(Posted 2010) [#4]
Add this method to TGLMax2DDriver (in the same source as before):
Method SetResolution( width#,height# )
	glMatrixMode GL_PROJECTION
	glLoadIdentity
	glOrtho 0,width,height,0,-1,1
	glMatrixMode GL_MODELVIEW
End Method



VicToMeyeZR(Posted 2010) [#5]
thank you again..

I am assuming the download hasn't been fixed, but the SVN is right?
Or does the SVN need to be updated with those fixes


Brucey(Posted 2010) [#6]
SVN is up-to-date, but it is based on a different version of wxWidgets.
I should probably do a "patch" update for the current release... since it's now a bit incompatible with Max2D.


VicToMeyeZR(Posted 2010) [#7]
You just got to many modules to keep up with them all Brucey. :)

You need some help. lol


amonite(Posted 2010) [#8]
Hi,
I did the fix as suggested by Plash but i get this error :

Building Modules
Compiling:wxmax2d.bmx
Compile Error: Unable to create new object of abstract type 'TwxMax2DDriver' due to abstract method 'SetResolution'
[C:/BlitzMax/mod/wx.mod/wxmax2d.mod/wxmax2d.bmx;457;2]
Build Error: failed to compile C:/BlitzMax/mod/wx.mod/wxmax2d.mod/wxmax2d.bmx
Process complete

my version of blitzmax is 1.36


Pete Rigz(Posted 2010) [#9]
You need to add:

Method SetResolution(width:Float, height:Float)
End Method


into the TwxMax2DDriver type of wxMax2d.bmx. The method doesn't need to contain anything.


amonite(Posted 2010) [#10]
It compiles fine now.
Thank you :)


Russell(Posted 2011) [#11]
Maybe this information should be somewhere on the wxwidgets page? (As I've spent the last two days trying to track this one down...) :^P

Russell


Russell(Posted 2011) [#12]
Well, the above fixes helped a LOT (thanks guys!), but, on Rebuild All Modules (with wx.mod in the mod folder), it stops here:

Compiling:dll.cpp
In file included from C:/BlitzMax/mod/wx.mod/wxrarinputstream.mod/src/unrar/rar.hpp:5:0,
from C:/BlitzMax/mod/wx.mod/wxrarinputstream.mod/src/unrar/dll.cpp:1:
C:/BlitzMax/mod/wx.mod/wxrarinputstream.mod/src/unrar/os.hpp:65:19: fatal error: new.h: No such file or directory
compilation terminated.
Build Error: failed to compile C:/BlitzMax/mod/wx.mod/wxrarinputstream.mod/src/unrar/dll.cpp
Process complete

It seems to be looking for a header file called new.h and, sure enough, it's not in there!

Any ideas?

Thanks in advance!
Russell


Russell(Posted 2011) [#13]
Well, I temporarily removed the problematic wxrarinputstream.mod and all of the modules compile (YAY!). But, now no programs compile!

For example, the .drawtest.bmx example gives this output:


Linking:.drawtext.debug.exe
ld: cannot find crt2.o: No such file or directory
ld: cannot find crtbegin.o: No such file or directory
ld: cannot find -lshell32
ld: cannot find -lcomctl32
ld: cannot find -lcomdlg32
ld: cannot find -lglu32
ld: cannot find -lopengl32
ld: cannot find -lws2_32
ld: cannot find -lgdi32
ld: cannot find -lwsock32
ld: cannot find -lwinmm
ld: cannot find -ladvapi32
ld: cannot find -luser32
ld: cannot find -lkernel32
ld: cannot find -lstdc++
ld: cannot find -lmingw32
ld: cannot find -lgcc_s
ld: cannot find -lgcc
ld: cannot find -lmoldname
ld: cannot find -lmingwex
ld: cannot find -lmsvcrt
ld: cannot find -lgdi32
ld: cannot find -lcomdlg32
ld: cannot find -luser32
ld: cannot find -lkernel32
ld: cannot find -ladvapi32
ld: cannot find -lshell32
ld: cannot find -lmingw32
ld: cannot find -lgcc_s
ld: cannot find -lgcc
ld: cannot find -lmoldname
ld: cannot find -lmingwex
ld: cannot find -lmsvcrt
ld: cannot find crtend.o: No such file or directory
Build Error: Failed to link C:/BlitzMax/docs/html/Modules/Graphics/Max2D/.drawtext.debug.exe
Process complete



I have the GCC_EXEC_PREFIX variable set to C:\MinGW and BlitzMax "about" reports GCC version 4.5.2.

Any ideas?

Russell


Russell(Posted 2011) [#14]
Ok, update: Everything works! [I have Win 7 64bit, BMax 1.42 and gcc version 3.4.2 (installed using Mark's recommended MinGW version 5.1.3)]

I don't know what happened to mess things up in the first place, but here's how I fixed it (Some steps may not be necessary, but they are what I personally did):

- Uninstalled BMax and removed the minGW directory
- Deleted the MinGW and the GCC_EXEC_PREFIX variable from the user variable list and the C:\MinGW addition from the System Path. I did not re-add the GCC_EXEC_PREFIX, and everything works fine without it. In fact, it seems like a lot of people, including me, have had nothing but trouble with it!
- REBOOT
- Followed Mark's advise exactly from here:
http://www.blitzbasic.com/Community/posts.php?topic=72892#814825
Accept the default location for the installation.
(Luckily, I had the 5.1.3 installer somewhere on my system. note: The link in Mark's post will direct you to the latest version of MinGW - Not what you want. You can do a Google search for "mingw 5.1.3").
- REBOOT
- Re-Install BMax
- Build all modules to make sure it's working
- If, like me, you are interested in being able to compile Brucey's wxwidgets module(s), you'll need to make a few source code changes: Read Plash and Pete Rigz posts in this thread (above).

Good luck!
Russell