Duplicate Basic Types

SharkBeardSharkBeard Fabric for Houdini, Fabric for MotionBuilder Posts: 2

Hi all!

As a way to test Kludge, I'm attempting to do a quick wrap of FreeImage (with minor editing of their header), and while certain things like function pointers are not supported, everything's been rather smooth to get all the way to a new KL extension. However trying to load the extension is giving me some issues with predefined types that already exist in Kludge.kl but are being added by kludge generate into FreeImage.kl

Am I missing something crucial that I need to specify in the Kludge.py file or remove from the original headers?

These are the errors I'm getting

[FABRIC:MT] FreeImage.kl:1359:1: error: type 'CxxSInt64ConstPtr' already defined [FABRIC:MT] FreeImage.kl:1371:1: error: type 'CxxSInt64Ptr' already defined [FABRIC:MT] FreeImage.kl:1382:1: error: type 'CxxSInt64ConstRef' already defined [FABRIC:MT] FreeImage.kl:1395:1: error: type 'CxxSInt64Ref' already defined [FABRIC:MT] FreeImage.kl:1564:1: error: type 'CxxUInt64ConstPtr' already defined [FABRIC:MT] FreeImage.kl:1576:1: error: type 'CxxUInt64Ptr' already defined [FABRIC:MT] FreeImage.kl:1587:1: error: type 'CxxUInt64ConstRef' already defined [FABRIC:MT] FreeImage.kl:1600:1: error: type 'CxxUInt64Ref' already defined [FABRIC:MT] FreeImage.kl:3801:1: error: type 'CxxUInt8PtrConstPtr' already defined [FABRIC:MT] FreeImage.kl:3813:1: error: type 'CxxUInt8PtrPtr' already defined [FABRIC:MT] FreeImage.kl:3824:1: error: type 'CxxUInt8PtrConstRef' already defined [FABRIC:MT] FreeImage.kl:3837:1: error: type 'CxxUInt8PtrRef' already defined [FABRIC:MT] FreeImage.kl:4584:1: error: type 'Make_CxxSInt64ConstPtr' already defined [FABRIC:MT] FreeImage.kl:4628:1: error: type 'Make_CxxSInt64Ptr' already defined [FABRIC:MT] FreeImage.kl:4672:1: error: type 'Make_CxxSInt64ConstRef' already defined [FABRIC:MT] FreeImage.kl:4716:1: error: type 'Make_CxxSInt64Ref' already defined [FABRIC:MT] FreeImage.kl:4928:1: error: type 'Make_CxxUInt64ConstPtr' already defined [FABRIC:MT] FreeImage.kl:4972:1: error: type 'Make_CxxUInt64Ptr' already defined [FABRIC:MT] FreeImage.kl:5016:1: error: type 'Make_CxxUInt64ConstRef' already defined [FABRIC:MT] FreeImage.kl:5060:1: error: type 'Make_CxxUInt64Ref' already defined [FABRIC:MT] FreeImage.kl:19891:1: error: type 'Make_CxxUInt8PtrConstPtr' already defined [FABRIC:MT] FreeImage.kl:19935:1: error: type 'Make_CxxUInt8PtrPtr' already defined [FABRIC:MT] FreeImage.kl:19979:1: error: type 'Make_CxxUInt8PtrConstRef' already defined [FABRIC:MT] FreeImage.kl:20023:1: error: type 'Make_CxxUInt8PtrRef' already defined

The only thing I can think of that may be causing something like this are some typedefs in the original header.
typedef long BOOL; typedef unsigned char BYTE; typedef unsigned short WORD; typedef unsigned long DWORD; typedef long LONG;

And the resulting alias definitions in FreeImage.decls.kludge.py
ext.add_alias('BOOL', 'long') ext.add_alias('BYTE', 'unsigned char') ext.add_alias('WORD', 'unsigned short') ext.add_alias('DWORD', 'unsigned long') ext.add_alias('LONG', 'long')

Is there a flag of sorts I would need to set in FreeImage.kludge.py in order to tell kludge it shouldn't generate KL bindings to those default types but keep the aliases? I couldn't immediately find something in the docs.
I am using Fabric 2.6.0

Thanks!

Comments

Sign In or Register to comment.