ngmath

From: Tamara Tosic <tosic81_at_nyahnyahspammersnyahnyah>
Date: Tue, 19 Sep 2006 00:36:56 -0700 (PDT)

Hello!
   
  I have a problem with compiling my simple program in C which is calling functions from ngmath lib. I'm not Linux guru and my administrator is on holiday, under windows I can't work, so any help would be more then significant! What should I do?
   
  I tried to compail it with
  gcc -I ~/ncarg/include -L ~/ncarg/lib -lngmath test.c
  (~ is my home directory)
   
  Errors are:
   
  /tmp/cce3ZoJV.o(.text+0xda): In function `main':
: undefined reference to `c_css2cd'
/tmp/cce3ZoJV.o(.text+0x18c): In function `main':
: undefined reference to `c_csvoro'
collect2: ld returned 1 exit status
   
  and my short test program is:
   
  test.c
   
  #include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <ncarg/ngmath.h>
  #define PI 3.1416
extern void c_css2cd (int, double *, double *, double *, double *, double * );
extern void c_csvoro(int, float [], float [], int, int, float [], float [], float [], int *,
                int *, int [], int *);
int main()
{
  
int npts=5;
float rlati[]={20, 3 ,40, 50,60};
float rloni[]={10, 20, 30, 40, 50};
int ni, nf;
int iwk[135];
double rwk[45];//iwk[27*npts], rwk[9*npts]
int nc=10;
float rlato[10], rlono[10], rc[10];//nc=10
int nca, numv, nv[5], ier;
  printf("print\n");
  
 c_css2cd(1, &rlatit, &rlongit, &x, &y, &z);
 printf("x is: %f \n", x);
 printf("y is: %f \n", y);
 printf("z is %f \n", z);
  nf=1;
for(ni=0;ni<5;ni++)
{
 c_csvoro(npts,rlati,rloni,ni,nf, rlato,rlono,rc,&nca,&numv,nv,&ier);
 nf=0;//it's not first call of function anymore
 printf("prints!");
  }
  return 0;
}
   
  Thaks a lot!
  Tamara Tosic, student

                 
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.

_______________________________________________
ncarg-talk mailing list
ncarg-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
Received on Tue Sep 19 2006 - 01:36:56 MDT

This archive was generated by hypermail 2.2.0 : Wed Sep 27 2006 - 08:36:17 MDT