Problems compiling luacheia with Mingw

Serge Semashko <ss-gPCzTB4c/[email protected]> Wed, 24 Mar 2004 16:56:08 +0200
Newsgroups gmane.comp.lang.lua.luacheia
Message-ID <[email protected]>
Hello All,

I have some problems when compiling luacheia (CVS version) with 
MinGW-3.1.0-1 and MSYS-1.0.10

# ./configure
# make
...
  gcc -DHAVE_CONFIG_H -I. -I. -I../../.. 
-I/home/serge/luacheia/lua-5.0.1/include -g -O2 -MT gusu.lo -MD -MP -MF 
.deps/gusu.Tpo -c gusu.c  -DDLL_EXPORT -DPIC -o .libs/gusu.o
gusu.c: In function `gusu_opendir':
gusu.c:81: parse error before '-' token

The following change helps to workaround this:

-------------------------------------------------------------------------------------
diff -u -r1.2 gusu.c
--- gusu.c	31 Dec 2003 21:10:11 -0000	1.2
+++ gusu.c	24 Mar 2004 13:36:31 -0000
@@ -78,7 +78,7 @@
    DWORD attr;

    attr = GetFileAttributes(dirname);
-  if (attr == INVALID_FILE_ATTRIBUTES
+  if (attr == 0xFFFFFFFF
  	  || (attr & FILE_ATTRIBUTE_DIRECTORY) == 0)
    {
      /* not a dir */
-------------------------------------------------------------------------------------

After this fix, compilation process goes along but still stops here:

In file included from luabeans.cpp:25:
tLuaCOMException.h:73: parse error before string constant
luabeans.cpp:59:21: warning: pasting "::" and "INTERNAL_ERROR" does not 
give a valid preprocessing token
luabeans.cpp: In static member function `static int 
LuaBeans::gc(lua_State*)':
luabeans.cpp:59: parse error before `)' token
luabeans.cpp:85: invalid use of member `LuaBeans::module_name' in static 
member
    function
luabeans.cpp:105: invalid use of member `LuaBeans::module_name' in static
    member function
luabeans.cpp:111: `name' undeclared (first use this function)
luabeans.cpp:111: (Each undeclared identifier is reported only once for 
each
    function it appears in.)
luabeans.cpp:115: invalid use of member `LuaBeans::module_name' in static
    member function

Can anybody help me? What compiler configuration is used to build 
official luacheia win32 binaries by developers?

PS. Just did fresh reinstall of Mingw and MSYS to be sure they are not 
broken, the same problems are still here.




-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click