[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[bos-dev] Can't compile pre-2.4



Hi there,

I have trouble compiling boswars. The first thing was that your SConstruct was not fit for my distribution(Archlinux). I have lua-5.1 installed. To get the check for library stuff done I had to change the lua recognition a bit. I added a patch.

In engine/stratagus/util.cpp was a function defined that was already defined in util.h. Added a patch for this too.

There are a lot of warnings about deprecated conversions too. I attached a build.log too(It's a actually of makepkg  compiling the package). I'm building with gcc-4.2.0.

Btw: The change in economy is really cool.

Stefan Lohmaier

--- ../boswars-pre2.4-src-old/engine/stratagus/util.cpp	2007-07-05 15:37:15.000000000 +0200
+++ engine/stratagus/util.cpp	2007-07-05 15:39:26.000000000 +0200
@@ -146,21 +146,6 @@
 	return 0;
 }
 
-#ifndef HAVE_STRNLEN
-size_t strnlen(const char *str, size_t strsize)
-{
-	size_t len = 0;
-	while (len < strsize) {
-		if (*str == '\0') {
-			break;
-		}
-		++str;
-		++len;
-	}
-	return len;
-}
-#endif
-
 unsigned int strncpy_s(char *dst, size_t dstsize, const char *src, size_t count)
 {
 	if (dst == NULL || src == NULL || dstsize == 0) {
--- SConstruct	2007-07-05 15:22:05.000000000 +0200
+++ SConstruct	2007-07-03 23:57:49.000000000 +0200
@@ -107,7 +107,7 @@
     if env.WhereIs('lua-config'):
        env.ParseConfig('lua-config --include --libs')
     elif env.WhereIs('pkg-config'):
-       env.ParseConfig('pkg-config --cflags --libs lua5.1')
+       env.ParseConfig('pkg-config --cflags --libs lua')
   found = 0
   if conf.CheckLibWithHeader('lua', 'lua.h', 'c'):
     found = 1
@@ -122,7 +122,7 @@
   if not found:
     return 0
 
-  if conf.CheckLibWithHeader('lualib', 'lualib.h', 'c'):
+  if conf.CheckLibWithHeader('lua', 'lua.h', 'c'):
      return 1
   if conf.CheckLibWithHeader('lualib50', 'lualib.h', 'c'):
      return 1