![]() |
Blitz Support : |
From: Xavier WARIN (OSIRIS-EDF) (xavier.warin_at_[hidden])
Date: 2005-04-25 00:32:13
Hi ,
In fact you forgot to link with the library. The libblitz.a is not in
your path. What you did in fact is :
g++ -lm blitztest.cpp
Xavier
Chris Neff wrote:
> Hi, I am new to Blitz++. I have gotten sick of programming in Fortran 77
> after learning of the joy of OOP, but I still like the Fortran style of
> array storage for alot of my code because its column ordering is how I
> think. I try to compile this code:
>
> ------------------------------------------------------------------------------
> #include <blitz/array.h>
>
> using namespace blitz;
>
> Array<int,1> x; // A one-dimensional array of int
> Array<int,2> A(3, 3, fortranArray);
>
> int main()
> {
>
> }
>
> ------------------------------------------------------------------------------
>
> using the following g++ command:
>
> g++ -lblitz -lm blitztest.cpp
>
>
> And i get the error:
>
> /tmp/cccfRe8Y.o(.text+0xbf): In function
> `__static_initialization_and_destruction_0(int, int)':
> : undefined reference to `blitz::fortranArray'
> collect2: ld returned 1 exit status
>
>
> It is finding the library okay, but it can't find fortranArray. Suggestions?
>
> Thanks for the help,
> -Chris Neff
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Blitz-support mailing list
> Blitz-support_at_[hidden]
> http://www.oonumerics.org/mailman/listinfo.cgi/blitz-support