On Sat, 28 Jul 2007 16:10:52 +0200
Daniel Fischer <[EMAIL PROTECTED]> wrote:
> mingw32-gcc -shared -o bin/Windows/cptr.ndll src/cptr.c
> -I/opt/mingw/include/neko -L/opt/mingw/lib -lneko
> Cannot export neko_NULL_THUNK_DATA: symbol not found
> /tmp/ccseSOuc.o:cptr.c:(.text+0x42d): undefined reference to
> `_val_null'
the attached patch gets rid of the errors by using different values
for VEXTERN and EXPORT. It is unverified as yet if the produced NDLL
actually works, though. (And there *might* be sideeffects for
windows-based (non-cross) mingw builds.)
-dan
--- /usr/include/neko/neko.h 2007-07-29 10:35:17.000000000 +0200
+++ neko.h 2007-07-29 11:21:00.000000000 +0200
@@ -198,7 +198,7 @@
#undef EXTERN
#undef EXPORT
#undef IMPORT
-#ifdef NEKO_VCC
+#if defined(NEKO_VCC) || defined(NEKO_MINGW)
# define INLINE __inline
# define EXPORT __declspec( dllexport )
# define IMPORT __declspec( dllimport )
@@ -220,7 +220,11 @@
# define EXTERN IMPORT
#endif
-#define VEXTERN extern EXTERN
+#ifdef NEKO_MINGW
+# define VEXTERN
+#else
+# define VEXTERN extern EXTERN
+#endif
#ifdef __cplusplus
# define C_FUNCTION_BEGIN extern "C" {
--
Neko : One VM to run them all
(http://nekovm.org)