Need help compiling map2difplus on intel mac xcode 2.4
by Joe O · in Torque Game Engine · 11/11/2006 (5:36 pm) · 35 replies
The title says it all. I can't get map2difplus to build correctly for the life of me. I tried posting in the tools forum but no reply yet... Have any of you other Mac users been able to get the map2difplus for Torque 1.5 to build yet? I think there's something different about the project / target settings but I don't know enough about it...
Any help is greatly appreciated. Thanks much.
Any help is greatly appreciated. Thanks much.
#2
Here's what I don't get... This is code that is compiled as part of TGE and works without any issues. When I try to compile that same code for this tool it horks. It makes me think there is some build setting that is off in the project. It would be nice to see some support by the GG staff on this one - seeing as the tool doesn't even build but yours is the only response I've seen.
Thanks for trying it out - I will bang my head on the keyboard some more this weekend. I'll also try to get it to build on my G4 mini but I doubt I will see any improvements.
11/17/2006 (5:12 am)
Yes, that's about what I'm seeing. I posted in the tools forum a complete dump from the compiler after trying to fix that round of build errors.Here's what I don't get... This is code that is compiled as part of TGE and works without any issues. When I try to compile that same code for this tool it horks. It makes me think there is some build setting that is off in the project. It would be nice to see some support by the GG staff on this one - seeing as the tool doesn't even build but yours is the only response I've seen.
Thanks for trying it out - I will bang my head on the keyboard some more this weekend. I'll also try to get it to build on my G4 mini but I doubt I will see any improvements.
#3
11/17/2006 (8:50 am)
If you set the default compiler for the map2difplus target to GCC 3.3, the compile errors will go away. However, the "jam" (just another make) error is still there. I haven't figured that one out yet.
#4
11/17/2006 (8:52 am)
In the jam script, it seems like the compiler settings are different (_DEFAULT_GCC_VERSION is 4.0 even after the above change). Sometimes I love XCode. Othertimes are like today.
#5
So, in the target list, select the "map2difplus" target. Go to the "Project" menu and pick "Upgrade to native target". This will make a duplicate of the target that uses the native XCode build system, not jam. Then, build and run.
I get a huge bunch of linker errors, but I leave that to you, as that's hopefully an easier problem to solve.
11/17/2006 (9:03 am)
Aha. ok. Well, "jam" is the make tool used by the older ProjectBuilder projects. The "map2difplus" target dates from pre-XCode, and apparently has never been updated. So, in the target list, select the "map2difplus" target. Go to the "Project" menu and pick "Upgrade to native target". This will make a duplicate of the target that uses the native XCode build system, not jam. Then, build and run.
I get a huge bunch of linker errors, but I leave that to you, as that's hopefully an easier problem to solve.
#6
Thanks a lot. If I manage to get it working I'll post a reply later tonight.
11/17/2006 (9:06 am)
That's an interesting start you've got. I will try that later this evening to see what happens. I'm not certain what it will take to get the linker errors resolved but it has to be better than the current situation :)Thanks a lot. If I manage to get it working I'll post a reply later tonight.
#7
11/18/2006 (3:39 am)
Well, I managed to get the huge list of build errors as well. I assumed this would be easily fixed by adding the appropriate frameworks to the project but it has solved nothing. I then tried to add specific source files to the build to see if that would help things. I managed to get it to compile but it's still not linking - it fails on some really strange things. I'm going to do some more digging but it sure would be nice to see a GG response on this.... you know.... since their code doesn't compile correctly out of the box.
#8
11/18/2006 (1:40 pm)
Some of these missing symbols are clearly Torque -- LightManager, SceneLighting, GuiListBoxCtrl, DetailMapping, etc. Maybe toss some more Torque .cc files in the target until they all go away?
#9
11/18/2006 (2:38 pm)
Yeah, I tried that... or rather , that's what I'm trying... it's a bit rough systematically knocking these out. Wouldn't you think it should work if you just include everything too? (I know this isn't optimal... but... wouldn't it?)
#10
11/18/2006 (5:48 pm)
Yeah, who cares if map2dif is huge? Stick all the files in there and see if it helps.
#11
So, in the target list, select the "map2difplus" target. Go to the "Project" menu and pick "Upgrade to native target". This will make a duplicate of the target that uses the native XCode build system, not jam. Then, build and run.
I get a huge bunch of linker errors, but I leave that to you, as that's hopefully an easier problem to solve.
11/19/2006 (5:04 pm)
Aha. ok. Well, "jam" is the make tool used by the older ProjectBuilder projects. The "map2difplus" target dates from pre-XCode, and apparently has never been updated. So, in the target list, select the "map2difplus" target. Go to the "Project" menu and pick "Upgrade to native target". This will make a duplicate of the target that uses the native XCode build system, not jam. Then, build and run.
I get a huge bunch of linker errors, but I leave that to you, as that's hopefully an easier problem to solve.
#12
So, in the target list, select the "map2difplus" target. Go to the "Project" menu and pick "Upgrade to native target". This will make a duplicate of the target that uses the native XCode build system, not jam. Then, build and run.
I get a huge bunch of linker errors, but I leave that to you, as that's hopefully an easier problem to solve.
11/29/2006 (11:43 am)
Aha. ok. Well, "jam" is the make tool used by the older ProjectBuilder projects. The "map2difplus" target dates from pre-XCode, and apparently has never been updated. So, in the target list, select the "map2difplus" target. Go to the "Project" menu and pick "Upgrade to native target". This will make a duplicate of the target that uses the native XCode build system, not jam. Then, build and run.
I get a huge bunch of linker errors, but I leave that to you, as that's hopefully an easier problem to solve.
#13
I had just come here to post this exact problem when i saw this thread. Altho it is a bummer I cant get it to work ,i am glad i am not insane :-)
I am currently at the same point as Joe, and am trying to make the missing symbols go away. I will update if i get anywhere.
cheers!
11/29/2006 (8:59 pm)
Hello All!I had just come here to post this exact problem when i saw this thread. Altho it is a bummer I cant get it to work ,i am glad i am not insane :-)
I am currently at the same point as Joe, and am trying to make the missing symbols go away. I will update if i get anywhere.
cheers!
#14
here is what i did:
1* i deleted the build run script phase that fixed the build directories, it was blowing up on my machine,
2* i fixed all the compile errors, mostly const correctness issues
3* i compiled and got the long list of missing symbols
4* i went to bed, got up this morning and read this thread
5* I upgraded map2difplus to a native target
6* i had to undo some of the fixes i did in step 2, which were now showing up as compile errors :-(
7* i went through each of the missing symbols, did a search and then tagged the file for map2difplus (was much easier once i found out you could jsut hit command-i from within the file, instead of having to find it in the left had file list)
8* and finally had to tag the cocoa frameworks (much the same way as step 7) to target it to map2difplus
and viola! a very very big map2difplus universal binary. (11Meg)
However... I cant seem to get it to function properly. It seems to work, but i cant get it to make difs for me.
it seems to bomb out somewhere... I tried using the cottage.map in the fps starter (data/interiors/cottage/)
and i got this:
[kablam:data/interiors/cottage] bsmith% map2difplus cottage.map
starting RAEL
map2dif - Torque .MAP file converter
Copyright (C) GarageGames.com, Inc.
Program version: 1.0r
Programmers: John Folliard, Dave Moore, and Matthew Fairfax
Built: Nov 30 2006 at 16:13:13
Loading cottage.map
Initial texture search path is set to ""
Error opening map file: cottage.maptrying to join main loop...
main loop joined.
exiting...
any ideas?
-edited for stupid typos
11/29/2006 (10:31 pm)
I got it compiling. (fyi I am running on a g4 powerbook)here is what i did:
1* i deleted the build run script phase that fixed the build directories, it was blowing up on my machine,
2* i fixed all the compile errors, mostly const correctness issues
3* i compiled and got the long list of missing symbols
4* i went to bed, got up this morning and read this thread
5* I upgraded map2difplus to a native target
6* i had to undo some of the fixes i did in step 2, which were now showing up as compile errors :-(
7* i went through each of the missing symbols, did a search and then tagged the file for map2difplus (was much easier once i found out you could jsut hit command-i from within the file, instead of having to find it in the left had file list)
8* and finally had to tag the cocoa frameworks (much the same way as step 7) to target it to map2difplus
and viola! a very very big map2difplus universal binary. (11Meg)
However... I cant seem to get it to function properly. It seems to work, but i cant get it to make difs for me.
it seems to bomb out somewhere... I tried using the cottage.map in the fps starter (data/interiors/cottage/)
and i got this:
[kablam:data/interiors/cottage] bsmith% map2difplus cottage.map
starting RAEL
map2dif - Torque .MAP file converter
Copyright (C) GarageGames.com, Inc.
Program version: 1.0r
Programmers: John Folliard, Dave Moore, and Matthew Fairfax
Built: Nov 30 2006 at 16:13:13
Loading cottage.map
Initial texture search path is set to ""
Error opening map file: cottage.maptrying to join main loop...
main loop joined.
exiting...
any ideas?
-edited for stupid typos
#15
Anyhow, looks like map2difplus needs a full pathname for the file, while the above bombed, this worked:
map2difplus /Users/bsmith/torqueGameEngine/Torque\ Game\ Engine\ 1.5\ SDK/Torque\ SDK/example/tutorial.base/data/interiors/test4x.map
well, kinda... I am getting other, new errors now:
Fatal-ISV: (/Users/bsmith/torqueGameEngine/Torque Game Engine 1.5 SDK/Torque SDK/engine/interior/interiorIO.cc @ 947) Not a power of 2? Something wrong
DEBUG_BREAK!
Done.
but they seem to not have to do with compiling. so that's good i guess :-)
more to come when i discover it..
11/29/2006 (10:41 pm)
Aha! (i'll just have a conversation with myself for a bit here :-) you all are probably asleep in the US right now)Anyhow, looks like map2difplus needs a full pathname for the file, while the above bombed, this worked:
map2difplus /Users/bsmith/torqueGameEngine/Torque\ Game\ Engine\ 1.5\ SDK/Torque\ SDK/example/tutorial.base/data/interiors/test4x.map
well, kinda... I am getting other, new errors now:
Fatal-ISV: (/Users/bsmith/torqueGameEngine/Torque Game Engine 1.5 SDK/Torque SDK/engine/interior/interiorIO.cc @ 947) Not a power of 2? Something wrong
DEBUG_BREAK!
Done.
but they seem to not have to do with compiling. so that's good i guess :-)
more to come when i discover it..
#16
So, even though i am getting the "Not a power of 2?" errors, it is still making a useable .dif file. my test map worked great, and i brought it into the game with textures intact no problem.
So i am pretty happy with that for now. I can deal with absolute pathnames and extra errors for the time being, since i am jsut starting out.
Cheers!
-ben
11/29/2006 (11:06 pm)
Last post today, i promise :-)So, even though i am getting the "Not a power of 2?" errors, it is still making a useable .dif file. my test map worked great, and i brought it into the game with textures intact no problem.
So i am pretty happy with that for now. I can deal with absolute pathnames and extra errors for the time being, since i am jsut starting out.
Cheers!
-ben
#17
7* i went through each of the missing symbols, did a search and then tagged the file for map2difplus (was much easier once i found out you could jsut hit command-i from within the file, instead of having to find it in the left had file list)
I'm not real slick with Xcode yet - if you could describe this in a bit more detail I'm sure it would help me figure out my problems too.
11/30/2006 (4:12 am)
Hi Ben - thanks for the awesome post(s) but I have a question for you. What do you mean on step #7 when you say:7* i went through each of the missing symbols, did a search and then tagged the file for map2difplus (was much easier once i found out you could jsut hit command-i from within the file, instead of having to find it in the left had file list)
I'm not real slick with Xcode yet - if you could describe this in a bit more detail I'm sure it would help me figure out my problems too.
#18
So, in the target list, select the "map2difplus" target. Go to the "Project" menu and pick "Upgrade to native target". This will make a duplicate of the target that uses the native XCode build system, not jam. Then, build and run.
I get a huge bunch of linker errors, but I leave that to you, as that's hopefully an easier problem to solve.
11/30/2006 (9:31 am)
Aha. ok. Well, "jam" is the make tool used by the older ProjectBuilder projects. The "map2difplus" target dates from pre-XCode, and apparently has never been updated. So, in the target list, select the "map2difplus" target. Go to the "Project" menu and pick "Upgrade to native target". This will make a duplicate of the target that uses the native XCode build system, not jam. Then, build and run.
I get a huge bunch of linker errors, but I leave that to you, as that's hopefully an easier problem to solve.
#19
sorry for the bad description :-) i was euphoric over compilation at the time and wasnt thinking clearly :-)
anyhow:
each missing symbol is basically an object or constant declaration that is being called somewhere but the file wasnt included in the target properly. So, i would do a global search for guilistboxcontrol or something, and then find the originating file for that object. Once there, get information on that file, click the targets tab, and then make sure to check map2difplus. rinse, repeat. (as i mentioned the slow way to do this is to manually go through the left file nav, find the file, hit command-i and make the target change. i did the first two this way, and it really really sucked to wade though 800 source files looking for sgSceneLIghting or whatever it happened to be. I noticed that if you use the find to open the file like you are going to edit it, do one extra click in the file to de-select the selected find string (for some reason) then you could hit comman-i from right there and get the info box, and make the target change, which was much quicker)
I would occasionally do a build just to make sure i was getting somewhere. and about 90% through it occured to me that i should have recorded which files i had to include so i could post it, but by then it was too late. all in all it took me maybe 10 -15 minutes to track them all down.
anyhow, let me know if you have any more problems. (or if you figure out any of the run-time errors that map2dif throws)
@rob: i think rob is stuck in a loop of some kind, either that or he is really really consistent :-)
cheers!
-ben
11/30/2006 (1:00 pm)
@Joesorry for the bad description :-) i was euphoric over compilation at the time and wasnt thinking clearly :-)
anyhow:
each missing symbol is basically an object or constant declaration that is being called somewhere but the file wasnt included in the target properly. So, i would do a global search for guilistboxcontrol or something, and then find the originating file for that object. Once there, get information on that file, click the targets tab, and then make sure to check map2difplus. rinse, repeat. (as i mentioned the slow way to do this is to manually go through the left file nav, find the file, hit command-i and make the target change. i did the first two this way, and it really really sucked to wade though 800 source files looking for sgSceneLIghting or whatever it happened to be. I noticed that if you use the find to open the file like you are going to edit it, do one extra click in the file to de-select the selected find string (for some reason) then you could hit comman-i from right there and get the info box, and make the target change, which was much quicker)
I would occasionally do a build just to make sure i was getting somewhere. and about 90% through it occured to me that i should have recorded which files i had to include so i could post it, but by then it was too late. all in all it took me maybe 10 -15 minutes to track them all down.
anyhow, let me know if you have any more problems. (or if you figure out any of the run-time errors that map2dif throws)
@rob: i think rob is stuck in a loop of some kind, either that or he is really really consistent :-)
cheers!
-ben
#20
Thanks Ben! You gave me the motivation to parse the build results piece by piece to find all the missing dependencies. After that I had to do a little fix up in macCarbEvent.cc and macCarbMain.cc. (I don't know how you're supposed to get a const char* into a char* properly but we'll see if it runs with what I did - it's been awhile since my c days).
After those two built I found a few more missing deps and got them resolved fairly quick and like magic - it built! Since I read your post I decided to keep track of all the files I added to the map2difplus native target. I have no idea if it will work for anyone else but it worked for me.
Next on my list is to run it and see what happens :) Thanks again!
macPathCopy.mm
sgLightManager.cc
sgSceneLighting.cc
sgObjectShadows.cc
guiListBoxCtrl.cc
sgDetailMapping.cc
macCarbUtil.cc
editTSCtrl.cc
worldEditor.cc
sgLightingModel.cc
sgScenePersist.cc
sgSceneLightingTerrain.cc
sgSceneLightingInterior.cc
sgLightMap.cc
sgLightObject.cc
sgMissionLightingFilter.cc
11/30/2006 (2:10 pm)
Finally! Thanks Ben! You gave me the motivation to parse the build results piece by piece to find all the missing dependencies. After that I had to do a little fix up in macCarbEvent.cc and macCarbMain.cc. (I don't know how you're supposed to get a const char* into a char* properly but we'll see if it runs with what I did - it's been awhile since my c days).
After those two built I found a few more missing deps and got them resolved fairly quick and like magic - it built! Since I read your post I decided to keep track of all the files I added to the map2difplus native target. I have no idea if it will work for anyone else but it worked for me.
Next on my list is to run it and see what happens :) Thanks again!
macPathCopy.mm
sgLightManager.cc
sgSceneLighting.cc
sgObjectShadows.cc
guiListBoxCtrl.cc
sgDetailMapping.cc
macCarbUtil.cc
editTSCtrl.cc
worldEditor.cc
sgLightingModel.cc
sgScenePersist.cc
sgSceneLightingTerrain.cc
sgSceneLightingInterior.cc
sgLightMap.cc
sgLightObject.cc
sgMissionLightingFilter.cc
Torque Owner Rob Terrell
CFStringRef newCFstring = CFStringCreateWithBytes(NULL, (UInt8*) retBuf, dStrlen(retBuf), kCFStringEncodingUTF8, false);
...Basically, casting the char* to a UInt8*. But then 3 more errors appeared in macCarbOGLVideo.cc.
So, I'm at a loss. Is that what you're seeing?