Collada dom
I'm having problems using the collada libraries/frameworks.
I checked out the latest cvs repository and ran make for the proper project. Everything goes well (no errors reported at least) and make install does create the framework directories.
No whenever I attempt to use these frameworks in a command line application in xcode, I get a link error stating that:
ld: warning: ignoring file /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks//Collada14Dom.framework/Collada14Dom, file was built for unsupported file format which is not the architecture being linked (x86_64)
I have no idea what to do. To be honest, I haven't had an idea what to do for the last two days.
Can anybody help?
Thanks.
<edit> I'm using a macbook pro running os.x 10.6.8<edit>
I checked out the latest cvs repository and ran make for the proper project. Everything goes well (no errors reported at least) and make install does create the framework directories.
No whenever I attempt to use these frameworks in a command line application in xcode, I get a link error stating that:
ld: warning: ignoring file /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks//Collada14Dom.framework/Collada14Dom, file was built for unsupported file format which is not the architecture being linked (x86_64)
I have no idea what to do. To be honest, I haven't had an idea what to do for the last two days.
Can anybody help?
Thanks.
<edit> I'm using a macbook pro running os.x 10.6.8<edit>
Try using otool to see if the arch is present:
EDITED: Fixed my goof from before since you really want -fv instead of -hv --cmiller
Code:
otool -fv /Developer/SDKs/MacOSX10.6.sdk/Library/Frameworks//Collada14Dom.framework/Collada14DomEDITED: Fixed my goof from before since you really want -fv instead of -hv --cmiller
I have executed the command you said. The output is as follows:
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC I386 ALL 0x00 DYLIB 12 1732 NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK NO_REEXPORTED_DYLIBS
I am not familiar with otool, so how should I interpret these results? Does I386 for cputype mean the framework is compiled for i386 and not for x86_64?
And if that is the case does it mean I can only link to this framework if my application is compiled for i386 as well? What if I want to compile the framework for another architecture?
Thanks for the help...
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC I386 ALL 0x00 DYLIB 12 1732 NOUNDEFS DYLDLINK TWOLEVEL WEAK_DEFINES BINDS_TO_WEAK NO_REEXPORTED_DYLIBS
I am not familiar with otool, so how should I interpret these results? Does I386 for cputype mean the framework is compiled for i386 and not for x86_64?
And if that is the case does it mean I can only link to this framework if my application is compiled for i386 as well? What if I want to compile the framework for another architecture?
Thanks for the help...
That may or may not be correct. I goofed and the command you really want is otool -fv. For example, the following library is compiled for both i386 and x86_64:
otool is a tool that you can use to inspect binary files and find out information about them. For instance, using the -t and -d flags you can view the text and data sections of the binary (inspect for string and array literal definitions, etc. If you have to do something evil like monkey-patch a binary, you can more easily find the right part to mangle using otool - though for the love of all that's x86 make a freakin backup first before you try something like that!)
One of the most common uses of otool is to re-write the library load paths of a binary. For instance, if you needed to bundle Boost C++ with your Mac game for the App Store, you'd copy the Boost C++ libs into the application bundle and then use otool to change the location of the library load path in your application executable to the relative location inside the bundle (instead of /usr/local/lib or something like that).
It's a really useful little utility that can save you a metric ton of time in the right situations.
Code:
> otool -fv /Developer/SDKs/MacOSX10.7.sdk/usr/lib/libc++.dylib
Fat headers
fat_magic FAT_MAGIC
nfat_arch 2
architecture i386
cputype CPU_TYPE_I386
cpusubtype CPU_SUBTYPE_I386_ALL
capabilities 0x0
offset 4096
size 234056
align 2^12 (4096)
architecture x86_64
cputype CPU_TYPE_X86_64
cpusubtype CPU_SUBTYPE_X86_64_ALL
capabilities 0x0
offset 241664
size 242416
align 2^12 (4096)otool is a tool that you can use to inspect binary files and find out information about them. For instance, using the -t and -d flags you can view the text and data sections of the binary (inspect for string and array literal definitions, etc. If you have to do something evil like monkey-patch a binary, you can more easily find the right part to mangle using otool - though for the love of all that's x86 make a freakin backup first before you try something like that!)
One of the most common uses of otool is to re-write the library load paths of a binary. For instance, if you needed to bundle Boost C++ with your Mac game for the App Store, you'd copy the Boost C++ libs into the application bundle and then use otool to change the location of the library load path in your application executable to the relative location inside the bundle (instead of /usr/local/lib or something like that).
It's a really useful little utility that can save you a metric ton of time in the right situations.
Thanks for the info on otool. I tried your edited command, but I'm not getting any output now. This demotivates me even more... 
I never seem to understand why using make files on my system never leads to a ready to use output binary. Might be (most probably is) my lack of good understanding of the way to build things with make files.
Do you have any idea why there is no output at all?
Thanks...

I never seem to understand why using make files on my system never leads to a ready to use output binary. Might be (most probably is) my lack of good understanding of the way to build things with make files.
Do you have any idea why there is no output at all?
Thanks...
Nope, no idea.
When make doesn't do what you want, it's usually because of a problem in ./configure. Go check the configure flags to ensure that you're making a universal binary. Collada is a pretty good library and Apple uses it internally in a few (rare) locations, so it's probably a totally fixable problem.
When make doesn't do what you want, it's usually because of a problem in ./configure. Go check the configure flags to ensure that you're making a universal binary. Collada is a pretty good library and Apple uses it internally in a few (rare) locations, so it's probably a totally fixable problem.
Thanks, I was already looking for the ./configure file, but apparently it's not included in the svn checkout (or at least, I can't find it)...
how'd you build it then?
@OneSadCookie: I did a checkout of the collada branch using the guide on: http://collada.org/mediawiki/index.php/D...Setting_up
After checkout is completed you can immediately call: make in the main repository directory.
I haven't been able to find any ./configure files...
I'm convinced I'm probably missing something really trivial, but I can't find out what...
After checkout is completed you can immediately call: make in the main repository directory.
I haven't been able to find any ./configure files...
I'm convinced I'm probably missing something really trivial, but I can't find out what...
It says you can build with Xcode, you should probably try that. At the very least it'll be easier to get it building for the right set of architectures in Xcode.
Tried that too. I end up with a library (libdom.a) against which I can't either because of the architecture problem.
Can you explain how to set the correct arch in xcode? I tried several things already. No luck yet.
Thanks.
Can you explain how to set the correct arch in xcode? I tried several things already. No luck yet.
Thanks.
I used macports to install collada dom. This appears to solve the issues with incompatible architectures so I am a little bit more happy now...
I still can't link to the framework, but it appears to be a different problem than this. I'll start looking for solutions to that.
Thanks for the help.
I still can't link to the framework, but it appears to be a different problem than this. I'll start looking for solutions to that.
Thanks for the help.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Link error collada framework mac port | BBBert | 3 | 3,109 |
Dec 28, 2011 04:59 PM Last Post: OneSadCookie |
|

