linker error with externed value
Posted on 2007-07-30
I am getting a 2019 linker error followed by a 1120 when I try to access matrix lut_max in a thread. I externed the value in the thread (thus leading to the error) becuase I was getting an unknown identifier error without it. The reason I do not create the table in the thread is becuase I only need to create it once, and the thread would create it multiple times. I wrote a function that writes the table once from my GUI. I instatiate the class with
Then I call the function
All the class and function do is write the table, no erros there.
My extern statement is:
extern CvMat* lut_mat;
I am sure that this is something simple or simly done wrong. Please help.
error in full:
C:\...\OpenCVThread1.obj [Error LNK2019] unresolved external symbol "struct CvMat * lut_mat" (?lut_mat@@3PAUCvMat@@A) referenced in function "public: virtual void * __thiscall OpenCVThread::Entry(void)" (?Entry@OpenCVThread@@UAEPAXXZ)