Skip to content

A few module errors I'm running into... #107

@DruggedBunny

Description

@DruggedBunny

Hi Brucey & co, hope you're well.

I'm messing about with OpenGL and was talking to AI about getting a GLFW-init'd GL ES 2.0 context to use the Angle DLLs (trying to replicate what Mark had done with Monkey2), more out of interest than anything. (Revisiting my attempts at a simple 3D engine.)

It told me to build GLFW with EGL instead of WGL, and I tracked down mod\glfw.mod\glfw.mod\source.bmx, which I've hacked like so in the vague hope it'll be that simple (or just require a few tweaks):

'Import "glfw/src/wgl_context.c"
Import "glfw/src/egl_context.c"

But this caused quite a few build errors on using MaxIDE's Build Modules, eg.

mod\b3d.mod\assimp.mod\assimp.bmx:

Import Openb3dlibs.Assimplib

Seems this should be:

Import b3d.Assimplib

(There is no Openb3dlibs as far as I can see.)

And similar in mod\b3d.mod\newtondynamics.mod\newtondynamics.bmx

(There might have been 1 or 2 more.)

I've also run into mod\bah.mod\sstream.mod\sstream.bmx giving a stat_ () error, where I had to change from:

	Local Mode:Int,mtime:Int,ctime:Int
        
	If stat_( path,Mode,size,mtime,ctime )=0

... to:

	Local Mode:Int,mtime:Int,ctime:Int,atime:Int
	
	If stat_( path,Mode,size,mtime,ctime,atime )=0

(Missing 'atime' in both lines. Interestingly, FileSize in FileSystem uses a full atime call.)

My current build error is this in mod\bah.mod\dboracle.mod\dboracle.bmx:

		Local strings:Byte Ptr[]
		Local blobs:Byte Ptr[]
		Local dates:Byte Ptr[]

		If values Then
			Local paramCount:Int = bindCount

			params = New Byte Ptr[paramCount]
			strings = New Short Ptr[paramCount]

Notice strings is defined as Byte Ptr[] but is being assigned a short pointer. Not sure if that should work, but I get 'Unable to convert from Short Ptr Array to Byte Ptr Array' (bcc says it's 0.136.)

Converting the assignment to Byte Ptr seems to get past that, but gives, later in same file:

Unable to find overload for freemem2(Byte Ptr Array). Argument #1 is "Byte Ptr Array" but declaration is "Short Ptr Array".

Changing the definition to Short Ptr instead seems to work, but now getting 'Can't find interface for module 'pub.libpng'' in:

mod\bah.mod\magick.mod\source.bmx

Just documenting these while I can! Suspect I'm in a bit of a rabbit hole but pushing onwards!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions