JPNotADragon wrote:Working on cannibalizing VC4.pas for my first test program... found a problem at line 595: the comment is not being closed.
Thanks for that, fix will be in the next commit.
JPNotADragon wrote:I found the datatype cunsigned int the bcm_host section of VC4.pas. That type appears to be specific to your fork of the compiler, correct ? I have replaced it with NativeUInt for now.
The cunsigned type comes from the Ctypes unit which is part of the FPC RTL, NativeUInt will be okay as long as you never try to use it on a 64 bit build because it will be the wrong size then, Longword would be the correct translation.
JPNotADragon wrote:I have experimentally reduced VC4.pas to a form that compiles, but I'm getting linker errors. It should be easy to remove those, and I'll try that tomorrow, but could you tell me a little about what they are, and why my linker can't find them ?
That list just happens to line up with the list of libraries that Raspberry Pi don't include in their build of the VC4 userland, you can see the libraries that are provided by Raspbian here.
You should simply remove the LINKLIB directive for each of those and the problem will go away, in fact you don't need most of those LINKLIB directives and you can probably leave out all of them except bcm_host and maybe one or two others (like GLESv2 and EGL).
There is another source you can look at which might be helpful, the Asphyre/PXL library supports OpenGL ES on Raspbian and the PXL.Boards.PI.BCM.pas unit includes all of the definitions from bcm_host and dispmanx that are required, that link is from the Ultibo port but that file has not changed much from the original.