cfitsio/Xcode

farmerdoug

macrumors 6502a
Original poster
Sep 16, 2008
541
0
Has any successfully linked the new cfitsio library to Xcode and Snow Leopard?
 

farmerdoug

macrumors 6502a
Original poster
Sep 16, 2008
541
0
cfitsio

Yes, but it's been awhile since I tried so I don't remember. I'll have to try again to get you the error message. Have you ever done it?
 

farmerdoug

macrumors 6502a
Original poster
Sep 16, 2008
541
0
error

ld: warning: in /cfitsio/lib/libcfitsio.a, file is not of required architecture

After downloading the tar file, one is supposed to be able to make the library in Xcode but that didn't work in the past. One needed to use the command line. That's why the original more general question of whether or not anybody has had any luck.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,745
3
You got it compiled and built, but not for whatever architecture Xcode is using. Usually the ./configure and make routine only works on a single architecture, and doesn't build a universal binary which Xcode is doing. You'll need to build the library for whatever architecture(s) Xcode is using, or add the files to Xcode directly and use it to compile for you.

http://developer.apple.com/mac/library/technotes/tn2005/tn2137.html
 

farmerdoug

macrumors 6502a
Original poster
Sep 16, 2008
541
0
cfitsio

So with the C code and the header files, any idiot can, following the instructions on the web page, build a library that will work in Xcode?
 

kainjow

Moderator emeritus
Jun 15, 2000
7,745
3
Possibly, but not all projects are the same so you may run into some snags.
 

farmerdoug

macrumors 6502a
Original poster
Sep 16, 2008
541
0
builing a library for Xcode

Fits files are image files used in astronomy and elsewhere. The new library for using them in C will not link in Xcode. Does anybody want to try building it to work in Xcode?
 

kainjow

Moderator emeritus
Jun 15, 2000
7,745
3
I just merged your threads together, no real need for a separate one.

Why not try creating a new Xcode framework and add the source files into it and see what happens?
 

farmerdoug

macrumors 6502a
Original poster
Sep 16, 2008
541
0
Because, while it would be a help and convenience, I can do with makefiles and don't have the time to stop what I'm doing.
 

kainjow

Moderator emeritus
Jun 15, 2000
7,745
3
Well since you'll be using this library it would be good to figure out either how to build a universal binary with makefiles or how to use Xcode to do it, which IMO is a lot easier. FWIW, I created a new Xcode project setup as a Cocoa Framework (which probably could just be a "BSD C Library"), then I added all the source and header files to it and compiled. I got errors in two files that I simply removed from the project as they were unnecessary (Windows specific or unused), then I got another error which was due to a missing preprocessor macro which originally was set in the configuration script, and after all that I had a duplicate symbols error which I didn't bother to fix. All that in about 2 minutes.

Really, it's not that hard and doesn't take much time, just a little experimentation. Once you figure it out it'll help immensely in future projects.
 

farmerdoug

macrumors 6502a
Original poster
Sep 16, 2008
541
0
I'm not a programmer so much as an algorithm developer. It might take you two minutes; It might take more.
Since I already have a library that works with the makefile, I don't need any more adventures; I'll keep what you said in mind and maybe try it in the future.

thanks.

4 tickets to the American Museum of Natural History to any one who wants to do it.
 

lloyddean

macrumors 65816
May 10, 2009
1,001
16
Des Moines, WA
I keep reading about this thing called "web search engine", There's this one, called Google, that when asked questions points you to some neat stuff most of the time. Such as this!
 

farmerdoug

macrumors 6502a
Original poster
Sep 16, 2008
541
0
Give me a break

That's where I download the code in the first place. Something is wrong. I have several emails from NASA about this. Would you like to see them? This is also another reason why I'm not looking to tackle this.
 

farmerdoug

macrumors 6502a
Original poster
Sep 16, 2008
541
0
Programmer writes code; Some who develops algorithms doesn't necessarily need to know; he just passes the algorithm he wants written to the programmer who codes it.
 

lloyddean

macrumors 65816
May 10, 2009
1,001
16
Des Moines, WA
Programmer writes code; Some who develops algorithms doesn't necessarily need to know; he just passes the algorithm he wants written to the programmer who codes it.
Good thing you're near retirement age as your kind of job is on its way out much like the secretary of middle level management in decades past. Just an observation, not meant to be mean.
 

farmerdoug

macrumors 6502a
Original poster
Sep 16, 2008
541
0
Lloyd

Besides the fact, the it doesn't apply to me, I don't know what you are talking about.
First, I'm an astronomer. My main responsibility is data reduction but I have others. I occasionally have to code my own algorithms but not always. When necessary I do code in LabView, C, iraf and IDL. It gets a little complicated trying to remember which uses ;'s and which doesn't.
Second, for the record, although I am near retirement, it doesn't mean I'm going to any time soon. I have a few more breakthroughs in me yet.

What profession was not going to be needed- programmers or signal processors (i.e. algorithm developers)?
 

lloyddean

macrumors 65816
May 10, 2009
1,001
16
Des Moines, WA
farmerdoug

As I mentioned in another of your threads I figured you had an association with Astronomy back in November.

I'm not a programmer so much as an algorithm developer. It might take you two minutes; It might take more.
Since I already have a library that works with the makefile, I don't need any more adventures; I'll keep what you said in mind and maybe try it in the future.

It is not my intent to insult you with any of my comments. But I am trying to get you to change the way you ask for help, not that you ask for help.
 

farmerdoug

macrumors 6502a
Original poster
Sep 16, 2008
541
0
Lloyd

I'm still curious about which profession is going away.

With regard to the other issue, the rule in the group is that no email is to exceed 25 words. The joke is that I couldn't exceed 25 words if I tried; The more words the more they are unintelligible. You should see me try and give a presentation.

Its really hard to change. On my first college physics test, the teacher wrote: "This is unreadable A"

But between my questions and the boards answers, the job does get done.
 

lloyddean

macrumors 65816
May 10, 2009
1,001
16
Des Moines, WA
Up here in Seattle are many large corporation. It used to be, until about 18 to 15 years ago, that many mid level managers had their own secretaries the dictated work to. Well with computers these same managers lost their secretaries an were required to do such thing as type their own business correspondence. The days vast pools of secretaries came to and end as job roles merged.

Simular thing with mathematicians and programmer at Boeing. Mathematicians were required to come up with the math models and algorithms for the software projects which they passed of to the programmers that implemented them. Today the mathematicians do there own programming providing the model components to the application programmers.

You implied, in an earlier comment, that your focus was on algorithm design which you then passed onto programmer to implement. My comment is that the earlier type of collaboration has been collapsing with the expectation of mathematicians doing their own programming.

In your case I see you struggling with programming issues related to memory allocation and access. You come here asking for help but the way you ask question here leaves so much un-communicated that it become difficult at best to answer your questions. Most of information we need to assist is left in your head were we can get at. It's like you assume we know what you're thinking.

So again we wish to assist but your brevity, or attempt to short cut the process, make for a lot of work on the park of others. After a while it feels like abuse and people slowly stop trying to assist.

In other words help us help you.
 

farmerdoug

macrumors 6502a
Original poster
Sep 16, 2008
541
0
All, I can say is I know exactly from where you are coming and I'll do my best.
 

lloyddean

macrumors 65816
May 10, 2009
1,001
16
Des Moines, WA
That'd be great - I wish you nothing more than luck and understanding.

Here is a link to one of the K12 educational products I've worked on in the past. As you read the article keep in mind I was the only Mac oriented programmer at the company and other than the single Mac in the testing department I had the only other Mac in the whole company of just under 60 people.
 

farmerdoug

macrumors 6502a
Original poster
Sep 16, 2008
541
0
Looks good.

BTW. graduates students and apprentices are for programming. As soon as I an get a new one ...