Residual/Grime/GRIM FANDANGO

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
Toto3310
Posts: 17
Joined: Fri Dec 30, 2005 2:22 pm

Post by Toto3310 »

In the makefile comment the line

Code: Select all

LIBS += -lGL -lGLU
User avatar
Jimbob
Posts: 307
Joined: Mon Oct 31, 2005 4:36 pm
Location: Somewhere in the UK

Post by Jimbob »

I finally got it to compile correctly ... the zlib on my 10.3.9 was out of date. All I need to do now is find a cheap copy of Grim Fandango.

Jimbob
Soul Monkey
Posts: 8
Joined: Fri Mar 03, 2006 5:30 pm

Post by Soul Monkey »

Hello, I searched around the forum and internet, but I cannot seem to find a tutorial for compiling Residual on Mac OS X.

I know that the application is not official and the game cannot be completed but I'd like to play around with the game a little bit.

Does anyone know a tutorial for compiling Residual on Mac OS 10.4, step by step (if possible) would be great as I don't have programming skills.

Or if writing a straight tutorial could someone with a compiled version that runs under Mac OS 10.4 send me a copy?

Thank you very much.
User avatar
Jimbob
Posts: 307
Joined: Mon Oct 31, 2005 4:36 pm
Location: Somewhere in the UK

Post by Jimbob »

I think all you need to do is to check the Residual source code out using svn and then cd into the source code directory (using Terminal) and type make.

I do have a Mac OS X build but I don't know if it works because I don't own a copy of Grim Fandango, pm me if you want to try it out. It was compiled under 10.3.9 but should run under 10.4.
Soul Monkey
Posts: 8
Joined: Fri Mar 03, 2006 5:30 pm

Post by Soul Monkey »

What do you mean with "check the Residual source code using svn"? I have the CVS build and also the Apple developer tools and Fink 0.8.0 installed. Also the line in the makefile is comment out and I made the .residualrc file in my home directory.

When I enter "make" in the terminal in the residual folder I get the following error message:

Code: Select all

g++ -g -W -Wall -Ilua `sdl-config --cflags` -I. -DUNIX -Wno-multichar  -Wp,-MMD,"lua/lapi.d",-MQ,"lua/lapi.o",-MP -c lua/lapi.cpp -o lua/lapi.o
/bin/sh: line 1: g++: command not found
make: *** [lua/lapi.o] Error 127
As I read g++ should be installed with the developer tools but I also can't find it via the FinkCommander. Any ideas?

I will also send you a PM to try out your compiled version. Thanks.
Ender
Retired
Posts: 106
Joined: Wed Sep 21, 2005 5:06 am
Location: Perth, Western Australia

Post by Ender »

Are you sure the Apple Developer Tools are in-path?

You could also try installing the fink version of gcc (package gcc4), although you may have to change the Makefiles CXX and CC with "gcc-4" and "g++-4" respectively.

As far as SVN goes, development is no longer conducted in CVS. So if you checked out the CVS tree, you probably want to install subversion and regrab the tree. See the latest post on our news page.
User avatar
Jimbob
Posts: 307
Joined: Mon Oct 31, 2005 4:36 pm
Location: Somewhere in the UK

Post by Jimbob »

I would say the Apple Developers Tools aren't installed correctly. Usually the gcc and g++ stuff is installed in directories that are always in the path (/usr/bin for my installation).

Anyway, I think I've sent a copy of my compiled version to try. It would be nice to hear whether it works or not :)
Soul Monkey
Posts: 8
Joined: Fri Mar 03, 2006 5:30 pm

Post by Soul Monkey »

Thanks for sending me the file, but it's not working. I always get the error

Code: Select all

ERROR: Cannot find DataDir registry entry - check configuration file
I copied the files that you send me (residual, residual.rc and readme) into the same folder where all the game files are and in /Users/my user/.residualrc I set the path to my game folder. I also copied the .residualrc file to my game folder. I tried changing the name of the game folder from Grim Fandango to GrimFandango (without a space), but it's the same.

The DeveloperTools are installed in the root directory /Developer/ in usr/bin there where two alias for g++ and gcc but the original was not found. I copied the g++ from /sw/var/lib/fink/path-prefix-g++-3.3 to usr/bin/ and /bin/

now I get the following error in the terminal

Code: Select all

/bin/g++: line 5: exec: g++-3.3: not found
When I change gcc to gcc-4 and g++ to g++-4 in the makefile I get lots of errors.

Code: Select all

g++-4 -g -W -Wall -Ilua `sdl-config --cflags` -I. -DUNIX -Wno-multichar  -Wp,-MMD,"lua/lapi.d",-MQ,"lua/lapi.o",-MP -c lua/lapi.cpp -o lua/lapi.o
lua/lapi.cpp:8:20: error: stdlib.h: No such file or directory
lua/lapi.cpp:9:20: error: string.h: No such file or directory
In file included from ./bits.h:21,
                 from ./debug.h:18,
                 from ./savegame.h:21,
                 from lua/lua.h:31,
                 from lua/lapi.h:11,
                 from lua/lapi.cpp:11:
./stdafx.h:25:20: error: unistd.h: No such file or directory
./stdafx.h:99:23: error: sys/types.h: No such file or directory
./stdafx.h:101:21: error: sys/uio.h: No such file or directory
./stdafx.h:110:19: error: stdio.h: No such file or directory
./stdafx.h:111:19: error: fcntl.h: No such file or directory
./stdafx.h:115:20: error: assert.h: No such file or directory
./stdafx.h:116:19: error: ctype.h: No such file or directory
./stdafx.h:120:20: error: dirent.h: No such file or directory
In file included from lua/lua.h:31,
                 from lua/lapi.h:11,
                 from lua/lapi.cpp:11:
./savegame.h:22:18: error: zlib.h: No such file or directory
In file included from lua/ldo.h:12,
                 from lua/lapi.cpp:13:
lua/lstate.h:10:20: error: setjmp.h: No such file or directory
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:99: error: '::acos' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:116: error: '::asin' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:131: error: '::atan' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:146: error: '::atan2' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:162: error: '::ceil' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:177: error: '::cos' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:192: error: '::cosh' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:207: error: '::exp' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:222: error: '::fabs' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:237: error: '::floor' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:252: error: '::fmod' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:262: error: '::frexp' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:277: error: '::ldexp' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:292: error: '::log' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:307: error: '::log10' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:322: error: '::modf' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:341: error: '::pow' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:363: error: '::sin' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:378: error: '::sinh' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:393: error: '::sqrt' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:408: error: '::tan' has not been declared
/sw/lib/gcc4/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../../include/c++/4.0.0/cmath:423: error: '::tanh' has not been declared
./savegame.h:36: error: 'gzFile' does not name a type
lua/lstate.h:66: error: ISO C++ forbids declaration of 'jmp_buf' with no type
lua/lstate.h:66: error: expected ';' before '*' token
lua/lstate.h:86: error: ISO C++ forbids declaration of 'jmp_buf' with no type
lua/lstate.h:86: error: expected ';' before '*' token
lua/lapi.cpp: In function 'int luaA_passresults()':
lua/lapi.cpp:78: error: 'memcpy' was not declared in this scope
lua/lapi.cpp: In function 'void lua_pushstring(char*)':
lua/lapi.cpp:345: error: 'strlen' was not declared in this scope
make: *** [lua/lapi.o] Error 1
Thanks for helping me.
User avatar
Jimbob
Posts: 307
Joined: Mon Oct 31, 2005 4:36 pm
Location: Somewhere in the UK

Post by Jimbob »

Try installing the Developer tools again because it looks like gcc is broken, it can't find the include files that are installed by default. Installing the fink version works but it doesn't have any of the changes made by Apple and I think you may need a base install of Developer Tools to make it work correctly.

I'll also send you a copy of my Makefile because there are a couple of things you need to change (I think).

Edit: This may not work but I'm trying to get the Grim Fandango demo working with my residual build. Also, the residual.rc file I sent you is rubbish (well, not needed) ... delete it.
Soul Monkey
Posts: 8
Joined: Fri Mar 03, 2006 5:30 pm

Post by Soul Monkey »

Ok I completly reinstalled the whole Xcode Tools, but sadly it still don't work.

Just to make some things clear.

There needs to be a file named .residualrc in /Users/My User/ and the content of the file is

Code: Select all

DataDir=[/Users/Markus/Spiele/Grim Fandango]
       good_times=TRUE
In the Grim Fandango folder are all the .LAB files and the GRIM.TAB file. Also the compiled residual executable unix file goes there.

When I execute the file (double click) the terminal pops up and I get the following error message

Code: Select all

/Users/Markus/Spiele/Grim\ Fandango/residual; exit
ERROR: Cannot find DataDir registry entry - check configuration file
logout
The content of my makefile

Code: Select all

CXX = g++
CC = gcc
AR = ar rcu
CXXFLAGS = -g -W -Wall -Ilua `sdl-config --cflags` -I. -DUNIX -Wno-multichar # -O2
LDFLAGS = -g -W -Wall # -O2
LIBS = `sdl-config --libs` -lz 

# Comment this out for Mac OS X ...
# LIBS += -lGL -lGLU

include Makefile.common
Now in the terminal when I navigate to the residual source folder and enter make I get a long error message:

Code: Select all

g++ -g -W -Wall -Ilua `sdl-config --cflags` -I. -DUNIX -Wno-multichar  -Wp,-MMD,"lua/lapi.d",-MQ,"lua/lapi.o",-MP -c lua/lapi.cpp -o lua/lapi.o
lua/lapi.cpp:8:20: warning: stdlib.h: No such file or directory
lua/lapi.cpp:9:20: warning: string.h: No such file or directory
In file included from bits.h:21,
                 from debug.h:18,
                 from savegame.h:21,
                 from lua/lua.h:31,
                 from lua/lapi.h:11,
                 from lua/lapi.cpp:11:
stdafx.h:25:20: warning: unistd.h: No such file or directory
stdafx.h:99:23: warning: sys/types.h: No such file or directory
stdafx.h:101:21: warning: sys/uio.h: No such file or directory
stdafx.h:105:20: warning: unistd.h: No such file or directory
stdafx.h:110:19: warning: stdio.h: No such file or directory
stdafx.h:111:19: warning: fcntl.h: No such file or directory
stdafx.h:112:20: warning: stdlib.h: No such file or directory
stdafx.h:113:20: warning: string.h: No such file or directory
stdafx.h:115:20: warning: assert.h: No such file or directory
stdafx.h:116:19: warning: ctype.h: No such file or directory
stdafx.h:120:20: warning: dirent.h: No such file or directory
In file included from vector3d.h:21,
                 from bits.h:22,
                 from debug.h:18,
                 from savegame.h:21,
                 from lua/lua.h:31,
                 from lua/lapi.h:11,
                 from lua/lapi.cpp:11:
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::acos(float)':
/usr/include/gcc/darwin/3.3/c++/cmath:99: error: `::acosf' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:105: error: `acos' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::acos(long 
   double)':
/usr/include/gcc/darwin/3.3/c++/cmath:109: error: `::acosl' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:115: error: `asin' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::asin(float)':
/usr/include/gcc/darwin/3.3/c++/cmath:119: error: `::asinf' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::asin(long 
   double)':
/usr/include/gcc/darwin/3.3/c++/cmath:127: error: `::asinl' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:133: error: `atan' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::atan(float)':
/usr/include/gcc/darwin/3.3/c++/cmath:137: error: `::atanf' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::atan(long 
   double)':
/usr/include/gcc/darwin/3.3/c++/cmath:145: error: `::atanl' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:151: error: `atan2' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::atan2(float, 
   float)':
/usr/include/gcc/darwin/3.3/c++/cmath:155: error: `::atan2f' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::atan2(long 
   double, long double)':
/usr/include/gcc/darwin/3.3/c++/cmath:164: error: `::atan2l' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:171: error: `ceil' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::ceil(float)':
/usr/include/gcc/darwin/3.3/c++/cmath:175: error: `::ceilf' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::ceil(long 
   double)':
/usr/include/gcc/darwin/3.3/c++/cmath:183: error: `::ceill' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:189: error: `cos' not declared
/usr/include/gcc/darwin/3.3/c++/cmath:199: error: `cosh' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::cosh(float)':
/usr/include/gcc/darwin/3.3/c++/cmath:203: error: `::coshf' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::cosh(long 
   double)':
/usr/include/gcc/darwin/3.3/c++/cmath:211: error: `::coshl' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:217: error: `exp' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::exp(float)':
/usr/include/gcc/darwin/3.3/c++/cmath:221: error: `::expf' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::exp(long 
   double)':
/usr/include/gcc/darwin/3.3/c++/cmath:229: error: `::expl' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:235: error: `fabs' not declared
/usr/include/gcc/darwin/3.3/c++/cmath:245: error: `floor' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::floor(float)':
/usr/include/gcc/darwin/3.3/c++/cmath:249: error: `::floorf' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::floor(long 
   double)':
/usr/include/gcc/darwin/3.3/c++/cmath:257: error: `::floorl' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:263: error: `fmod' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::fmod(float, 
   float)':
/usr/include/gcc/darwin/3.3/c++/cmath:267: error: `::fmodf' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::fmod(long 
   double, long double)':
/usr/include/gcc/darwin/3.3/c++/cmath:276: error: `::fmodl' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:283: error: `frexp' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::frexp(float, 
   int*)':
/usr/include/gcc/darwin/3.3/c++/cmath:287: error: `::frexpf' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::frexp(long 
   double, int*)':
/usr/include/gcc/darwin/3.3/c++/cmath:295: error: `::frexpl' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:302: error: `ldexp' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::ldexp(float, 
   int)':
/usr/include/gcc/darwin/3.3/c++/cmath:306: error: `::ldexpf' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::ldexp(long 
   double, int)':
/usr/include/gcc/darwin/3.3/c++/cmath:315: error: `::ldexpl' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:322: error: `log' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::log(float)':
/usr/include/gcc/darwin/3.3/c++/cmath:326: error: `::logf' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::log(long 
   double)':
/usr/include/gcc/darwin/3.3/c++/cmath:334: error: `::logl' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:340: error: `log10' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::log10(float)':
/usr/include/gcc/darwin/3.3/c++/cmath:344: error: `::log10f' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::log10(long 
   double)':
/usr/include/gcc/darwin/3.3/c++/cmath:352: error: `::log10l' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:358: error: `modf' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::modf(float, 
   float*)':
/usr/include/gcc/darwin/3.3/c++/cmath:362: error: `::modff' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::modf(long 
   double, long double*)':
/usr/include/gcc/darwin/3.3/c++/cmath:376: error: `::modfl' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:397: error: `pow' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::pow(float, 
   float)':
/usr/include/gcc/darwin/3.3/c++/cmath:401: error: `::powf' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::pow(long 
   double, long double)':
/usr/include/gcc/darwin/3.3/c++/cmath:410: error: `::powl' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:429: error: `sin' not declared
/usr/include/gcc/darwin/3.3/c++/cmath:439: error: `sinh' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::sinh(float)':
/usr/include/gcc/darwin/3.3/c++/cmath:443: error: `::sinhf' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::sinh(long 
   double)':
/usr/include/gcc/darwin/3.3/c++/cmath:451: error: `::sinhl' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:457: error: `sqrt' not declared
/usr/include/gcc/darwin/3.3/c++/cmath:467: error: `tan' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::tan(float)':
/usr/include/gcc/darwin/3.3/c++/cmath:471: error: `::tanf' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::tan(long 
   double)':
/usr/include/gcc/darwin/3.3/c++/cmath:479: error: `::tanl' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: At global scope:
/usr/include/gcc/darwin/3.3/c++/cmath:485: error: `tanh' not declared
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::tanh(float)':
/usr/include/gcc/darwin/3.3/c++/cmath:489: error: `::tanhf' undeclared (first 
   use here)
/usr/include/gcc/darwin/3.3/c++/cmath: In function `long double std::tanh(long 
   double)':
/usr/include/gcc/darwin/3.3/c++/cmath:497: error: `::tanhl' undeclared (first 
   use here)
In file included from debug.h:18,
                 from savegame.h:21,
                 from lua/lua.h:31,
                 from lua/lapi.h:11,
                 from lua/lapi.cpp:11:
bits.h:24:20: warning: stdlib.h: No such file or directory
bits.h:25:19: warning: stdio.h: No such file or directory
In file included from lua/lua.h:31,
                 from lua/lapi.h:11,
                 from lua/lapi.cpp:11:
savegame.h:22:18: warning: zlib.h: No such file or directory
In file included from lua/lua.h:31,
                 from lua/lapi.h:11,
                 from lua/lapi.cpp:11:
savegame.h: At global scope:
savegame.h:36: error: 'gzFile' is used as a type, but is not defined as a type.
In file included from lua/lapi.h:12,
                 from lua/lapi.cpp:11:
lua/lobject.h:11:20: warning: limits.h: No such file or directory
lua/lobject.h:206:20: warning: string.h: No such file or directory
In file included from lua/ldo.h:12,
                 from lua/lapi.cpp:13:
lua/lstate.h:10:20: warning: setjmp.h: No such file or directory
In file included from lua/ldo.h:12,
                 from lua/lapi.cpp:13:
lua/lstate.h:66: error: syntax error before `*' token
lua/lstate.h:86: error: syntax error before `*' token
lua/lapi.cpp: In function `int luaA_passresults()':
lua/lapi.cpp:78: error: `memcpy' undeclared (first use this function)
lua/lapi.cpp:78: error: (Each undeclared identifier is reported only once for 
   each function it appears in.)
lua/lapi.cpp: In function `void lua_pushstring(char*)':
lua/lapi.cpp:345: error: `strlen' undeclared (first use this function)
make: *** [lua/lapi.o] Error 1
Is that another error with g++ or gcc?
User avatar
Jimbob
Posts: 307
Joined: Mon Oct 31, 2005 4:36 pm
Location: Somewhere in the UK

Post by Jimbob »

Soul Monkey wrote:Ok I completly reinstalled the whole Xcode Tools, but sadly it still don't work.

Just to make some things clear.

There needs to be a file named .residualrc in /Users/My User/ and the content of the file is

Code: Select all

DataDir=[/Users/Markus/Spiele/Grim Fandango]
       good_times=TRUE
In the Grim Fandango folder are all the .LAB files and the GRIM.TAB file. Also the compiled residual executable unix file goes there.

Code: Select all

/Users/Markus/Spiele/Grim\ Fandango/residual; exit
ERROR: Cannot find DataDir registry entry - check configuration file
logout
You don't need the square brackets around the path, it should read DataDir=/Users/Markus/Spiele/Grim Fandango (or probably DataDir=/Users/Markus/Spiele/Grim\ Fandango to cater for the space in the folder name). I've tried this with an empty directort (no space in the directory name) and it reports the following: -

Code: Select all

ERROR: Cannot find any resource files in /Users/James/Documents/Residual/ - check configuration file
So I think it is working, I'm just lacking the required files.
Soul Monkey wrote:

Code: Select all

g++ -g -W -Wall -Ilua `sdl-config --cflags` -I. -DUNIX -Wno-multichar  -Wp,-MMD,"lua/lapi.d",-MQ,"lua/lapi.o",-MP -c lua/lapi.cpp -o lua/lapi.o
lua/lapi.cpp:8:20: warning: stdlib.h: No such file or directory
lua/lapi.cpp:9:20: warning: string.h: No such file or directory
In file included from bits.h:21,
                 from debug.h:18,
                 from savegame.h:21,
                 from lua/lua.h:31,
                 from lua/lapi.h:11,
                 from lua/lapi.cpp:11:
stdafx.h:25:20: warning: unistd.h: No such file or directory
stdafx.h:99:23: warning: sys/types.h: No such file or directory
stdafx.h:101:21: warning: sys/uio.h: No such file or directory
stdafx.h:105:20: warning: unistd.h: No such file or directory
stdafx.h:110:19: warning: stdio.h: No such file or directory
stdafx.h:111:19: warning: fcntl.h: No such file or directory
stdafx.h:112:20: warning: stdlib.h: No such file or directory
stdafx.h:113:20: warning: string.h: No such file or directory
stdafx.h:115:20: warning: assert.h: No such file or directory
stdafx.h:116:19: warning: ctype.h: No such file or directory
stdafx.h:120:20: warning: dirent.h: No such file or directory
In file included from vector3d.h:21,
                 from bits.h:22,
                 from debug.h:18,
                 from savegame.h:21,
                 from lua/lua.h:31,
                 from lua/lapi.h:11,
                 from lua/lapi.cpp:11:

*Snipped *

make: *** [lua/lapi.o] Error 1
Is that another error with g++ or gcc?
Something still isn't right with your XCode/dev tools installation, it looks like the standard include files are missing (the .h files). Which version of XCode are you installing?
Last edited by Jimbob on Sun Mar 05, 2006 11:02 am, edited 1 time in total.
Ender
Retired
Posts: 106
Joined: Wed Sep 21, 2005 5:06 am
Location: Perth, Western Australia

Post by Ender »

If you type "echo $HOME" in a terminal, are you sure its the same directory that the config file is in? (It -should- be on MacOSX, but it never hurts to check).

Secondly, what did you use to create the .residualrc file? Popping it into bbedit and making sure its saved w/ UNIX linefeeds might be an option.

As far as your compilation problems go, its quite clear that something is wrong with your developer tools install. It looks like missing the libc (or stdlibc, or whatever its called with the dev tools) headers. Unfortunately I've never had to install the developer tools on a mac more than once, so I can't help troubleshoot that :)



[Edit: Oh, and as JimBob said - brackets bad. I just assumed that was a typo. Quotes are also bad. You shouldn't even need the \ in there to escape the space. However, you would get a different error ("Cannot Open DataDir") if this was the problem. The only two things I could think of that give the error your getting (given the config file is mostly correct) is that residual either can't find .residualrc, or cannot parse the DataDir line due to bad line-endings.]
User avatar
Jimbob
Posts: 307
Joined: Mon Oct 31, 2005 4:36 pm
Location: Somewhere in the UK

Post by Jimbob »

What happens if you do the following in the Terminal?

Code: Select all

ls -a /usr/include
Are lots of files listed?
Soul Monkey
Posts: 8
Joined: Fri Mar 03, 2006 5:30 pm

Post by Soul Monkey »

Thanks for your comments, I made some progress with your help.

The .residual file was created using Smultron (open source editor) and just saving the file. Then in the terminal I entered

Code: Select all

mv residualrc .residualrc
The content of the file is now

Code: Select all

DataDir=/Users/Markus/Spiele/Grim Fandango
       good_times=TRUE
With a bracket(?) \ <- this symbol it doesn't work, but without it works for 1 second.
When I now execute the residual file a window pops up, I can see Grim Fandango and then the window closes in less than a second.

A file named grimdialog.htm is created in /Users/Markus/ and the content is

Code: Select all

Grim Fandango Dialogprotokoll
© LucasArts Entertainment Company LLC. All rights reserved.

Code: Select all

echo $HOME
/Users/Markus

Code: Select all

ls -a

in /Users/Markus/ lists .residualrc

Code: Select all

ls -a /usr/include
entered in the terminal says

Code: Select all

PowerBook-G4-15&#58;~ Markus$ ls -a /usr/include
.               ..              gcc             stdint.h
How should I install the Xcode Tools? I put in the Mac OS X Tiger DVD, navigate to the folder "Xcode Tools" and exectue XcodeTools.mpkg follow the instructions and make a custom installation (Developer Tools Software, gcc 4.0 and gcc 3.3 are chosen and installed). Since I cannot choose a path to install I guess Mac OS X installs them in the correct path on his own?

Xcode.app in /Developer/Applications is v2.0

/usr/include/gcc/darwin contains 2 folders "3.3" (2,9 MB) and "4.0" (40,6 MB) and two alias "3.3-fast" (points to the 3.3 folder") and "default" (points to the 4.0 folder)

Content of the Grim Fandango folder is

Code: Select all

PowerBook-G4-15&#58;~/Spiele/Grim Fandango Markus$ ls -a
.               DATA003.LAB     IMUSE.PSL       README          YEAR1MUS.LAB
..              DATA004.LAB     LOCAL.LAB       VOX0000.LAB     YEAR2MUS.LAB
.DS_Store       DATA006.LAB     MOVIE00.LAB     VOX0001.LAB     YEAR3MUS.LAB
CREDITS.LAB     FLOWER.ICO      MOVIE01.LAB     VOX0002.LAB     YEAR4MUS.LAB
DATA000.LAB     GF.ICO          MOVIE02.LAB     VOX0003.LAB     residual
DATA001.LAB     GRIM.TAB        MOVIE03.LAB     VOX0004.LAB
DATA002.LAB     HANDBUCH        MOVIE04.LAB     YEAR0MUS.LAB
Handbuch is the german name for Manual
User avatar
Jimbob
Posts: 307
Joined: Mon Oct 31, 2005 4:36 pm
Location: Somewhere in the UK

Post by Jimbob »

I don't know how to fix this (I'm just guessing a bit now) but there may be an optional package that can be installed during the Mac OS X setup that may fix the problems you are having with compiling. Have you got X11 installed in /Application/Utilities ?

Can you also try running residual from a Terminal prompt rather than clicking on the executable in the Finder? Hopefully, some more debug messages may be output to the Terminal window that may help track down the problem.
Post Reply