Game Development Community

1.4r2

by Steve Lamperti · in Torque Game Engine · 09/13/2005 (3:53 pm) · 19 replies

I'm having a lot of trouble compiling and linking 1.4r2 on the Mac. Is this version not quite up to speed on the Mac side, or is this something specific to my project? Any one else trying this?

#1
09/13/2005 (4:03 pm)
We're working on the Mac side, yep. We'll let it be known when the new Mac files are checked into CVS. Thanks, for checking!
#2
09/13/2005 (4:03 pm)
This is mentioned in Ben Garney's most recent .plan... possibly other places as well. See the comments to that .plan for some suggestions.

www.garagegames.com/blogs/8863/8670
#3
09/15/2005 (11:25 pm)
Here's what I did to get r2 to build using XCode 2.1 (gcc4). As someone suggested on Ben's .plan, I went through the engine directories and made sure all the files were imported (the XCode project is out of date and doesn't reflect all of the files). Then I found that the referenced Frameworks (Theora, Ogg, Vorbis) in lib/ are messed up because the symbolic links have all been broken. I created new symbolic links to fix that. I had to remove the basram.c, lex and yacc stuff because they were complaining. Don't know if that will cause problems down the road. I then realized that the i18n directory wasn't added to the XCode project and was responsible for several undefined symbol errors. Finally, I got down to a single undefined symbol error that was rectified when I updated to the most recent (as of 1 AM CST) CVS version and replaced macCarbStrings.cc. Now she builds! Can't wait to start playing :-)
#4
09/16/2005 (10:34 am)
I use the latest version of xCode, but I normally like to link against fink static libs, mainly because I'm lazy. That way I don't need to compile png, ungif, etc... What I did notice is by doing this, the torque support library for libjpeg is not the standard library. You need to use the supplied library or compile time error will occur.

Other than that I had to disable gif support as well, couldn't get that to compile... weird.
#5
09/16/2005 (10:39 am)
I'm compiled and linked on the Mac, but I had to hack out a lot of code, in PlatformMacCarb to get things up, and they are definately not running correctly.

Specifically, I am running a codewarrior carbon project that is not using Mach-o. I realize that this makes our project seriously obsolete, but I was running under 1.3, and am hoping to be able to keep going in 1.4. (I'm also working on getting up and running in mach-o, but I have other issues with this.)

The problem that I am currently trying to deal with is in macCarbFileIO.cc. This file refers to dirent.d_type in several places. The only copy of dirent.h that I have on my machine doesn't have a d_type member in this structure.

If anyone has any suggestions as to how, and or if, I will be able to resolve this question, I would appreciate hearing them.
#6
09/27/2005 (2:40 am)
In platformMacCarb.h (line 12) it calls for a system include of QD.h, I'm guessing this is QuickDraw. This include is also giving error, when I comment it out it works fine with latest update. I'm guessing this file is no longer used, so would it be possible to remove this line like the rest? or should I keep commenting it out?

Also profiler.cc is giving a slight problem, the standard issue with redefinition of new in OpenTransport, but I can't move it above the standard system header using the torque defines, which reside in platform.h, as noted in platfromMacCarb.h. I can get around this by using compiler defines, but that seems to be a workaround for now. This also seems to be duplicating what is in macCarbTime, why not just call that instead, or use the generic profile that is empty? (Why is that empty?)

I hope that made sense.

#ifdef __APPLE__
#include <Timer.h>
#include <Math64.h>
#endif
#7
09/27/2005 (7:34 am)
How is possible download this 1.4r2 release? (I'm licensed user) I want try this release. Now i have only 1.3 + Lighting pack.
#9
09/27/2005 (6:28 pm)
@Mark Kromis: removed the QD.h include without problems. Check your include paths, it's under /Developer/Headers/FlatCarbon/ if you happen to need it in future. As for the profiler, I can compile a clean checkout from cvs without problems on any of my test machines... Are you using an old project file? My profiler.cc does not look at __APPLE__, it looks at TORQUE_OS_MAC_CARB. From your description of your problems, you're probably not using the latest project file. Many problems are fixed therein; give it a try!

@Steve: It's a standard unix header. It should be @ /usr/include/sys/dirent.h . It defines the dirent struct and it's d_type member. include/sys/dirent.h is included from include/dirent.h . As for codewarrior, I recommend that you take a look at the latest Xcode project, and build your codewarrior project accordingly. Codewarrior has not been directly supported for a number of years now. It *is* a very cool compiler, but as *every one* of our mac customers have access to Apple's dev tools, that toolchain gets priority.

Thanks for the bug reports. Keep em comin'!.
#10
09/27/2005 (7:27 pm)
I got the latest HEAD from cvs (not sure if this is 1.4r2 or not... "cvs checkout -c" did not list modules for me) but the build failed with missing files:

Missing file or directory: ../engine/console/gram.cc
Missing file or directory: ../engine/console/scan.cc
Missing file or directory: ../engine/gui/controls/guiOtherTreeViewCtrl.cc
Missing file or directory: ../engine/gui/controls/GuiTabPageCtrl.cc
Missing file or directory: ../engine/gui/editor/guiTreeViewCtrl.cc
Missing file or directory: ../lib/zlib/infblock.c
Missing file or directory: ../lib/zlib/infcodes.c
Missing file or directory: ../lib/zlib/infutil.c

Could be as simple as checking out the wrong module.
#11
09/28/2005 (4:02 pm)
@Paul: Thanks for the info. I found out why this header wasn't on my machine. (It really wasn't.) I had installed XCode, but not the XCode extras. So I didn't have GCC, and the Mac development SDK. Once I installed these, the correct version of dirent.h was installed.
#12
09/29/2005 (10:03 pm)
@Rob: I'll be updating the project files again soon. A few files have been removed, and there are some other fixes going in.
#13
10/01/2005 (2:10 pm)
@Paul Thanks for removing QD.h, I rechecked FlatCarbon folder and its not there, dunno why, but I was using the project file from cvs, so I figured that I would just get a new pull. Upon doing this I found a script editing folder for xcode, that was not there before, but thanks for the additions for xcode. Makes editing a little nicer. Thanks.

The only issue I found was when you start the torque_xcode_2_1.xcodeproj file Project->Edit Project Settings->Configuration: ->Edit Configurations... This will show you two profiles named Default. Would it be safe to remove one? I think xcode gets confused with this. Only one shows in drop down box.

The only other thing I found is that the targets are Legacy instead of native, but that is fixed easy enough.
#14
10/01/2005 (7:48 pm)
@Paul Thanks for removing QD.h, I rechecked FlatCarbon folder and its not there, dunno why, but I was using the project file from cvs, so I figured that I would just get a new pull. Upon doing this I found a script editing folder for xcode, that was not there before, but thanks for the additions for xcode. Makes editing a little nicer. Thanks.

The only issue I found was when you start the torque_xcode_2_1.xcodeproj file Project->Edit Project Settings->Configuration: ->Edit Configurations... This will show you two profiles named Default. Would it be safe to remove one? I think xcode gets confused with this. Only one shows in drop down box.

The only other thing I found is that the targets are Legacy instead of native, but that is fixed easy enough.
#15
10/03/2005 (5:12 am)
@Paul: Thanks, the new project file did the trick. Wow, the framerate is definitely improved. By the way I had some trouble with the "fix frameworks.command" being in Mac (not Unix) line endings. That might be MacCVS' fault. Also, in the project it's set to run with /bin/sh but the shebang line shows it's a bash script.
#16
10/03/2005 (5:36 am)
Well, it worked great for tutorial.base, but when I coped my game folder over to the new build, it wouldn't start. No missions are listed, and it hangs on starting. I got the same result with starter.fps and starter.racing, so I assume there's something wrong with what I built. No errors listed in the console. I'll run it through the debug build later today.
#17
10/03/2005 (7:21 am)
@Rob: Take a look at this thread. If you run the executable from the command line or the run button inside xcode it will see the missions. Starting the game from finder is what causes the game to not load missions.
#18
10/03/2005 (5:47 pm)
@Rob: New stuff on CVS. Improved file loading.

Share and Enjoy
#19
10/04/2005 (9:14 am)
Thanks Craig & Paul! Updating from cvs now.