timmu
5th September 2012, 20:45
I have a program that needs to read in a reference table during runtime. The table is basically two 1-dimensional arrays of doubles (QList<double>). Currently I do it by referring to a function which is nothing more than the statements for arrays:
QList<double> array1, array2;
void readRef()
{
array1[0]=2.45; array2[0]=5.17;
array1[1]=3.78; array2[1]=3.12;
.....
array1[1700]=4.67; array2[1700]=0.12;
}
This method should work, but I run into weird problems. For example it compiles on 32 Debian to give a 1 MB executable which runs fine. When I compile the same program on 64 bit Scientific Linux (RedHat) it takes a long time to compile and the executable is 70 MB and it won't run (I get a weird message that an X-something is not found). I'm pretty sure that my functions that contain all the array definitions cause this because without this table the program runs fine on both systems. Does anyone know what is happening. Is there something Qt-specific about compiling programs that contain functions with only array statements?
Thank you!
QList<double> array1, array2;
void readRef()
{
array1[0]=2.45; array2[0]=5.17;
array1[1]=3.78; array2[1]=3.12;
.....
array1[1700]=4.67; array2[1700]=0.12;
}
This method should work, but I run into weird problems. For example it compiles on 32 Debian to give a 1 MB executable which runs fine. When I compile the same program on 64 bit Scientific Linux (RedHat) it takes a long time to compile and the executable is 70 MB and it won't run (I get a weird message that an X-something is not found). I'm pretty sure that my functions that contain all the array definitions cause this because without this table the program runs fine on both systems. Does anyone know what is happening. Is there something Qt-specific about compiling programs that contain functions with only array statements?
Thank you!