Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Want to be my graduate student?

No, I've never wanted to become a slave. It isn't in my nature. I do enjoy helping others learn though.

Attached is an Xcode project that implements the cfitsio 'testprog'.

It contains a copy of the 'libcfitsio.a' compiled using MacPorts.

It copies the test file 'testprog.tpt' into the build tree:


build
Debug
testprog.tpt
testprog
View attachment cfitsio testprog.zip
 
No, I've never wanted to become a slave. It isn't in my nature. I do enjoy helping others learn though.

Attached is an Xcode project that implements the cfitsio 'testprog'.

It contains a copy of the 'libcfitsio.a' compiled using MacPorts.

It copies the test file 'testprog.tpt' into the build tree:


build
Debug
testprog.tpt
testprog
View attachment 214684

I'm curious... $80 worth of tickets, divided by several hours communicating with farmerdoug and then solving his problem for him, earns you an hourly rate of...$20-30?

I wonder what Farmer Doug got paid in that same amount of time.
 
Given that I'm on a fixed salary, my hourly rate is about 52 cents an hour but I supplement my income by selling my allotment of tickets on the side.
 
I'm curious... $80 worth of tickets, divided by several hours communicating with farmerdoug and then solving his problem for him, earns you an hourly rate of...$20-30?

I wonder what Farmer Doug got paid in that same amount of time.

Your mistake would be thinking I did for the tickets. I didn't!
 
Lloyd.

I could compile and run your code in Xcode but do I have to learn MacPort to do this myself or did you create a linkable version?

thanks
 
Are these applications you've been torturing for awhile now going be distributed or are the for your use only?

Are there going to be multiple applications developed or is it a one off?

Do you plan on using Xcode as your IDE or do you prefer makefiles?
 
Any code using fits files is for me and my astronomical colleagues. The other code you've been help with are use sole for me and a friend.

I would rather get everything to compile in Xcode so that I can use the debugger.
 
yes. The data reduction pipeline has been write in c on a mac and is about to be distributed. What I'm working on now is a way to reduce what is called speckle noise. If I solve the problem, and I'm pretty sure I have taken a significant step forward, it will be come part of the pipeline. I have code in iraf which I've mentioned before; it takes days to run which is why I've moved to c.

I know this is more than you asked. If you'd like to know more, I'll be glad to go into it further.

Doug
 
In the "cfitsio testprog" project folder you'll find a working compiled and linkable archive file, "libcfitsio.a", that you can copy to your own projects and link against.

Most questions will be answered through looking over the project file.
 
Lloyd. It seems to have worked just fine. I'll give it a more thorough work out probably tomorrow. If you give me a short description of what you did, I'll send it to NASA. Did you just download it and compile it in MacPorts?

Thanks
 
no soap.

If I make a new project and add library the program compiles, links to the library, runs and prints out "hello world". When I replace the code with my own code which actually calls fits routines, I get the warning about the library being of the wrong architecture and errors about symbols not found.
 
If you look in the upper left corner of the project window does the pull-down menu show i386 or x86_64. If it shows x_86_64 try selecting the pull-down menu an selecting i386 and then try running it.
 
Lets determine if the problem is operator error!

Did you try copying the project I put together and replacing the code in "testprog.c" with your own?

Make that the whole folder containing the working project!
 
You expect me to remember from this morning? before lunch? No, not that way. I used your library in my code. And how could you dare suggest operator error.

So I tried it your way and it compiled but when I tried to run it I got a Mismatch error between the Version the fitsio.h file used to build the library (3.23) and the version of the application program 3.2.

There was a fitsio.h in my header; when I took that out I had 16 errors.
 
If I modified the make file supplied with the code by adding an "-arch x86_64" to the CFLAGS, I do not get a link error to the cfitsio library but I do get a to undefined symbols _fopen$UNIX2003 and _fdopen$UNIX2003. Any ideas about what this means or how to fix it.

Thanks.

Got it. Set active SDK to 10.6. Haven't got a clue to why but it seems to work.

thanks to all those who worked on this.
 
If I modified the make file supplied with the code by adding an "-arch x86_64" to the CFLAGS, I do not get a link error to the cfitsio library but I do get a to undefined symbols _fopen$UNIX2003 and _fdopen$UNIX2003. Any ideas about what this means or how to fix it.

For future reference, if you had googled either one of those symbols, the first page of search results would have shown the answer.

The top result for _fopen$UNIX2003, for example:
http://cocoawithlove.com/2009/09/building-for-earlier-os-versions-in.html
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.