So, changes for the pycompat branch of libfxcg... Changes for stddef.h:
Code: --- libfxcg/include/stddef.h 2012-07-31 14:10:28.185099838 -0500
+++ include/stddef.h 2012-07-31 14:19:16.692329788 -0500
@@ -7,12 +7,12 @@
#define NULL 0
#else
#define NULL ((void*)0)
+// We don't do unicode of any sort.
+typedef unsigned char wchar_t;
#endif
#define offsetof(type, member) __builtin_offsetof(type, member)
-// We don't do unicode of any sort.
-typedef unsigned char wchar_t;
#ifndef size_t
typedef unsigned size_t;
In Bfile_SeekFile_OS, change line 3 to Code: SYSCALL(_Bfile_SeekFile_OS, 0x1DA9)
Make a new file Bfile_TellFile_OS and put inCode: #include <asm.h>
SYSCALL(_Bfile_TellFile_OS, 0x1DAB)
Here's the patch for the headers:Code: --- libfxcg/include/fxcg_syscalls.h 2012-07-31 14:10:28.184099862 -0500
+++ include/fxcg_syscalls.h 2012-07-31 14:45:41.740004665 -0500
@@ -1,3 +1,6 @@
+#ifdef __cplusplus
+extern "C" {
+#endif
int ItoA_10digit( int, void* );
void ByteToHex( unsigned char value, unsigned char*result );
void HexToByte( unsigned char*value, unsigned char*result );
@@ -57,6 +60,7 @@
int Bfile_OpenFile_OS( const unsigned short*filename, int mode );
int Bfile_ReadFile_OS( int HANDLE, void *buf, int size, int readpos );
int Bfile_SeekFile_OS( int handle, int pos );
+int Bfile_TellFile_OS( int handle );
int Bfile_WriteFile_OS( int HANDLE, const void *buf, int size );
void Bfile_NameToStr_ncpy( unsigned char*source, const unsigned short*dest, int n );
void Bfile_StrToName_ncpy( unsigned short*dest, const unsigned char*source, int n );
@@ -174,3 +178,7 @@
int Serial_Close( int mode );
int Serial_DirectTransmitOneByte( unsigned char byte_to_transmit );
int Serial_Open( unsigned char *mode );
+
+#ifdef __cplusplus
+}
+#endif
-------
For anyone not looking at github, I created a cmake build system that can make addins in a simpler way:Code: SET(CMAKE_TOOLCHAIN_FILE ../toolchain/Prizm.cmake)
project(example1)
file(GLOB EXAMPLE1_SRC "src/example1/*.c*")
add_executable(example1 ${EXAMPLE1_SRC})
makeg3a(example1 "example" "unselected.bmp" "selected.bmp")
That will compile all source files and produce a .g3a. I can post the Platform files once issues are resolved (when to projects are specified at once).