[SAC-HELP] Compiling a c code with subroutines from sacio.a

Shahar Shani Kadmiel kadmiel at bgu.ac.il
Tue Jun 8 07:12:38 PDT 2010


I have written a short code in c utilizing the "wsac1" subroutine.
When compiling, I get this:

Undefined symbols:
  "_wsac1", referenced from:
      _main in cc7iJC76.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

This is the only problem and when I comment out the line containing wsac1 the program compiles with no errors.
The part after _main, where it says "cc7iJC76.o", changes with every try.

This is my compile line:

cc codeName.c -o codeName -lm -m32 sacio.a 

where sacio.a is in the same folder as codeName.c.
I have tried giving the full path of sacio.a as-well as changing the order of appearance of the arguments in the compile line.

I know that sacio.a is being read because when -m32 wasn't specified I got a warning stating:

ld: warning: in sacio.a, file was built for unsupported file format which is not the architecture being linked (x86_64)

I am using MacSAC 10.6f-grh104 and the sacio.a that came with it.
I am currently trying to compile this code on a Mac running OS X 10.6.3 (i7 processor) but I intend to compile this on a linux machine that does not have sac installed. Can I copy the sacio.a that came with MacSAC or should I use a different archive file?

Thanks for all your help.
Shahar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.iris.washington.edu/pipermail/sac-help/attachments/20100608/5e5ab9ce/attachment.html>


More information about the sac-help mailing list