xcode compiler error with preRelease v.02

I’m getting some wacky errors on the prerelease v.02 examples. Never got these before!

http://farm1.static.flickr.com/192/485725258-ce1733e233-o.png

My stuff based on the version of OF found here: http://muonics.net/blog/?postid=4 works fine…

:?

any help or ideas would be most definitely appreciated!!!

did you keep the 0.02 folder seperate / (apps and libs) ?

it looks like you are compiling against the wrong libs.

just to note - you should keep different OF releases in seperate directories, like this:

0.01
— apps
-------- graphicsExample
-------- …
— libs

0.02— apps
-------- graphicsExample
-------- …
— libs

also, what version of xcode / cpu ?

thanks!
zach

ps.

it looks like this could be an error just by “copying the library”

With the way libraries used to be created, errors were possible if the library was modified with ar(1) and the table of contents was not updated by rerunning ranlib(1). Thus the link editor, ld, warns when the modification date of a library is more recent than the creation date of its table of contents. Unfortunately, this means that you get the warning even if you only copy the library."

http://lists.apple.com/archives/Xcode-users/2004/Oct/msg00378.html

I can’t begin to explain it, but it looks like the simple solution is suggested there - running ranlib from the command line…

more info if you google this quote: "is out of date. rerun ranlib(1) "

hope that helps!
zach

I’m suprised this didn’t happen more often. Maybe it only happens when you copy or move the libs?

let us know if ranlib fixes it…

take care,
zach

http://tinyurl.com/2j9mdr

Me and a friend are working on a project together. He produces a .a
library that I link to. Everytime I get a new .a file from him I get
this error:

ld: table of contents for archive: …/jzintv/src/libjzintv_common.a is
out of date; rerun ranlib(1) (can’t load from it)

So I execute the command ranlib on the library and then everything
working fine. The .a file work fine for him.

Why do I need to do this?

Because you need to re-run ranlib whenever the modification date of a .a
file changes. It’s annoying, but that’s the way it works. If he’s
building it on his system, his build process is automatically running
ranlib at the end of the build for him.

well ranlib made quick work of those errors! Thanks zach!

yeah its weird, i didn’t move or copy them since i unzipped the files after downloading them. Except the openCV libs…

anyways, now I’m getting this:

http://farm1.static.flickr.com/190/486502374-8cf0fb547a-o.png

I googled “___dso_handle” and came up with this: http://gcc.gnu.org/bugzilla/show-bug.cgi?id=27121

okay, I’m on XCode 2.2.1. I will upgrade and see what happens.

C

glad that helped –

yes please upgrade - I know it’s a pain (at 900 mb to download, yikes) but we are working with 2.4.1+, and older versions of xcode cause problems… let us know if that solves things - take care! zach

The last error looks very much like it could be related to not having the latest xcode. Not only does it upgrade the compiler but also the platform sdk which you are compiling against.

The first error I get now and again when I move folders etc, selecting “Clean All Targets” from the “Build” menu tends to make the errors go away, and is probably easier than running ranlib. There should be a note about this in the 0.02 release notes . I’ll add it to the Xcode setup guide too.

thanks for the reply theo.

i just installed 2.4.1 (that 900meg download was a doozy) and it fixed it up (i figured that was it after some googling)

so yeah, im in business now. New examples made me giiggle.

guess that means 2.4.1 is required for OFv.02.

thanks again zach for the responses before… ill be hanging out on here a helluva lot over the next few days, hopefully with something more fun to contribute than compile errors!

C