[AMBER] Problems using NAB and GCC

From: Roberto Vera <r78v10a07.gmail.com>
Date: Thu, 10 Jan 2013 17:13:58 +0100

Hi,

I am using NAB to create a model server but I am facing some compilation
problems. I would like to understand the NAB compilation process.

I have my .nab code and a C code with the main.

If I compile like this:

nab -o a.out main.c nabcode.nab

the program runs very well.

However, if I compile the program using the gcc with the C or the object
generated by NAB like this:

nab -c nabcode.nab
gcc -c main.c
gcc -o a.out main.o nabcode.c -L/usr/local/nab/lib/Linux -lnab -lm

the program compiles well but it gives a nice Segmentation fault during the
execution.

Could you explain me how can I compile NAB code and linked with GCC?

Thanking in advanced and best regards,
   Roberto


_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Jan 10 2013 - 08:30:03 PST
Custom Search