Horde3D
http://horde3d.org/forums/

Compiling Horde 3d on Mac OS X 10.5.7
http://horde3d.org/forums/viewtopic.php?f=3&t=747
Page 1 of 1

Author:  Jedimace1 [ 18.05.2009, 20:27 ]
Post subject:  Compiling Horde 3d on Mac OS X 10.5.7

Yeah, a new update for Mac came out, if you didn't notice. I am using a Powerbook G4. But this is my first time compiling Horde 3d. It seems that one of the samples gave me an error after I used CMake to generate an XCode project and compiled it. These are the errors I got:
Code:
#ifdef __APPLE__
   std::string s(p);
   for (int i = 0; i < 4; i++)
      s = s.substr(0, s.rfind("/"));
   return s + "/" + file;
#else


This was in main.cpp in the Knight sample. I'm sure it's just a simple type mismatch for the Mac, anyone know the problem? I'm eager about using Horde 3d, and the first thing I want to check out is the samples, but I need them to compile. Everything else seemed to compile fine, including the Horde 3d library. Ask me if you need anymore information.
EDIT: Found the problem. Just needed std:: before string. Simple enough. Might want to fix that. I changed the code to show how it would be properly.

Author:  Jedimace1 [ 18.05.2009, 20:37 ]
Post subject:  Re: Compiling Horde 3d on Mac OS X 10.5.7

Well, sure enough it compiled. But I don't think I'm seeing what I'm supposed to on the samples. I'll attach a screen shot of what is happening. I am running a PowerBook G4 1.67GHz, 1 GB RAM, an ATI Graphics card with 128 MB RAM, ATI Mobility Radeon 9700.

Author:  Volker [ 18.05.2009, 20:40 ]
Post subject:  Re: Compiling Horde 3d on Mac OS X 10.5.7

Thanks for the bug report. Concerning the graphics error it is hard to tell what could be wrong, since neither nicolas nor I have a mac available. Does the error log provide some helpful information?

[edit] Regarding the std:: this is a bit strange because in app.h the following line should prevent getting such an error:
Code:
using namespace std;

Author:  Jedimace1 [ 18.05.2009, 21:07 ]
Post subject:  Re: Compiling Horde 3d on Mac OS X 10.5.7

I have posted the build log in this paste bin so that it does not clog up this forum. See it here. Also, about the std:: thing, doesn't the using namespace std; have to be in the app.h file for it to work correctly? The other version below it used std also, I don't think that the using statement would have transferred over.

Author:  Volker [ 18.05.2009, 21:35 ]
Post subject:  Re: Compiling Horde 3d on Mac OS X 10.5.7

I'm a bit confused now. I thought I just checked the app.h and the using namespace statment was in there, but now it turns out it is in the app.cpp. Maybe I should sleep a bit more. :-)

Well of course you're right then, in the main.cpp it should be std::string instead of string.

Concerning the log,... I ment the EngineLog.html file created by Horde3D when the samples are executed.

Author:  Jedimace1 [ 19.05.2009, 08:08 ]
Post subject:  Re: Compiling Horde 3d on Mac OS X 10.5.7

I think that's the problem. Here's the link. http://rafb.net/p/BWHlnY28.html

Author:  Volker [ 19.05.2009, 08:41 ]
Post subject:  Re: Compiling Horde 3d on Mac OS X 10.5.7

It seems like the resources couldn't be found. Please check if the working directory is set correctly to the contents directory.

Author:  Jedimace1 [ 19.05.2009, 08:56 ]
Post subject:  Re: Compiling Horde 3d on Mac OS X 10.5.7

Ok, I got it working. Thanks.

Author:  marciano [ 20.05.2009, 00:56 ]
Post subject:  Re: Compiling Horde 3d on Mac OS X 10.5.7

Is there anything special in the code that you had to fix to get it working?

Author:  Jedimace1 [ 20.05.2009, 06:22 ]
Post subject:  Re: Compiling Horde 3d on Mac OS X 10.5.7

No. When I used CMake, it moved the binaries to a different position(one I chose) than they would normally be executed from, I guess. I moved them into a different folder with the Windows executables, and the logo appeared when I ran it.

Author:  swiftcoder [ 20.05.2009, 19:53 ]
Post subject:  Re: Compiling Horde 3d on Mac OS X 10.5.7

Jedimace1 wrote:
No. When I used CMake, it moved the binaries to a different position(one I chose) than they would normally be executed from, I guess. I moved them into a different folder with the Windows executables, and the logo appeared when I ran it.
I haven't tried CMake on the Mac in a while, but it was generating the correct directory structure at some point in the past.

Unfortunately, it doesn't do a very good job of building Mac frameworks and executables yet (the CMake developers are aware of this issue).

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/