malformed object

Archives Forums/MacOS X Discussion/malformed object

gman(Posted 2006) [#1]
ok. the compiler now finds the .a file using the import statement:
Import "libIrrlicht.a"

this is different than the syntax im used to for win and linux:
Import "-lIrrlicht"

when buiding a sample, i now get a whole bunch of the following type of errors:

ld:/Applications/BlitzMax/mod/gg.mod/irrlicht.mod/libirrlicht.a(Irrlicht.o) malformed object (stray relocation PAIR entry (1) in section (__TEXT.__eh_frame))


the (#) seems to change possible denoting line #. also, the (.o) file changes as well. i have no clue :) thoughts i have are this:

a) trying to link to .a file built with xcode 2.2 using xcode 1.5

b) the difference in the Import statements (not specifying the -l option)

any insights out there?


salric(Posted 2006) [#2]
Gman,

I think a) because of:

http://www.cocoabuilder.com/archive/message/xcode/2006/1/11/2662

Is the work you've done already available for download somewhere?

I was considering trying to rebuild the irrlich .a with xcode 2.0 (I understand it will probably involve recreating the project itself in xcode) & try linking everything etc. & see if it works...


gman(Posted 2006) [#3]
i found a few that posts that mentioned it could backwards compatiblity issues. unfortunately i dont yet have a distribution of what ive done. i have yet to learn about zipping off of mac and what ftp programs are available. if you could give me a rundown on those two things i could get a zip out on gprogs.com for you to try out. as far as the irrlicht mac distro goes, you will need to download that from the irrlicht page.

http://irrlicht.sourceforge.net/downloads.html


assari(Posted 2006) [#4]
Gman,
can't you just copy all the relevant files across to the PC and the zip and ftp them from windows?

I don't have a Mac so I'm guessing copying files across is possible


gman(Posted 2006) [#5]
lol. i havent figure out how to network them together yet. im such a mac newb! i have to admit though, zipping and FTPing turned out to be the easiest things ive done so far :) im uploading now the compiled mods. ill post when they are done.


gman(Posted 2006) [#6]
http://www.gprogs.com/gg.Irrlicht/gg.mod_macos.zip

good luck :) place the runtime .a file called libirrlicht.a (you will need to build it from the Irrlicht mac distro) into the root of irrlicht.mod.


skidracer(Posted 2006) [#7]
To connect to your pc from your mac and if you know it's local ip address, from the mac run finder, then from the menu Go->ConnectToServer and type smb://192.168.0.4 or what ever your pc's ip address.

To go the other way, from the mac, go to system preferences, select sharing, then enable Windows Sharing. Once it's enabled it should tell you the Mac's IP address so you can connect to it from a window's file explorer window.


gman(Posted 2006) [#8]
thx skid! got sharing up and running :) now i can copy things over. heres a question... what happens if i plug a fat32 usb drive into the mac? been afraid to try it since the drive is so critical to me.


gman(Posted 2006) [#9]
if anyone takes the time to rebuild the xcode project for building the libIrrlicht.a file, i would very much appreciate if you could write down the steps you took so that i could then replicate it.


gman(Posted 2006) [#10]
this info was provided by a user in the Irrlicht forums. maybe it will help someone out there?

Now, version problems could be an issue. But did you used ranlib on your .a file? Mac compilers need an index inside object collections. Alternatively add an s to the options of ar when grouping the .o files.




pls(Posted 2006) [#11]
gman... I'll be looking into your project and try to help on mac os x as soon as I get my game done (almost there http://www.deadpixelgames.com for the forums, and http://greedy.mrnet.pt/sudoku/distro/SuDokuLive.dmg if you wanna take a look at it).

I am very interested and excited about it. So count me in in a few weeks.

PLS


gman(Posted 2006) [#12]
thx PLS. it is very much appreciated.


gman(Posted 2006) [#13]
im wondering now if we are missing some build settings. a little online research and i found:

http://developer.apple.com/releasenotes/DeveloperTools/Xcode/XcodeBuildSettings.html

check out the "compiler settings" section. the first thing we might actually try is the GCC_VERSION setting. if this is set to 4.0 that may be the issue. probably needs to be at its lowest setting (3.3). also, try changing the MACOSX_DEPLOYMENT_TARGET to the 10.2 setting.

im getting excited. i think we are onto something. if anyone feels like rebuilding the project trying out some of these settings it would be much appreciated.


Will(Posted 2006) [#14]
I posted in your forum a version built as 10.1 compatible.