Hello,
My globally defined GArray *Move is not accesible via a second object- which I have linked. I don't know how to solve this, the structure is as follows:
calculate.c:
#include calculate.h
... define GArray *Move and fill it (that works okay, it exists alright and I can save it with Save_Move !!)
..... define other functions as stated in calculate.h
.... etc.
void Allocate_matrixes (void)
{
...............
Move = g_array_sized_new (FALSE, FALSE, sizeof(double), 3 * lumpamount);
for (i=0; i < (3 * lumpamount); i++)
{
g_array_index(Move, GArray *, i) = g_array_sized_new (FALSE, FALSE, sizeof(double), sim.amount_step );
}
.............
}
calculate.h: #ifndef CALCULATE_H_ #define CALCULATE_H_
extern GArray *Forces; extern GArray *Move;
extern void Calculate_moves_and_forces (void); extern void Free_matrixes (void); extern void Save_Move (gchar *filenaam); extern double Get_matrix (GArray *, guint, guint); #endif
graph.c
#include calculate.h <-- this is done so in graph.c I should be able to use Move.
...
...
g_print("Get_matrix value = %f", Get_matrix (Move, 1000, 0)); <---- this results in segmentation error !!! (line before was printed okay, removing this line makes it work fine too).
Is it a typical feature of GArray that it is not reachable from another object-file ?
Greetings, Edward.
_______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list