我有一个共享库 wise.so。我如何在我的程序中使用它?我需要包含该库的标题吗?
我在 Linux 下使用 Eclipce。我已经使用 -L 和 -l 设置了库的路径。但是我的功能在程序中不可见。
你能解释一下共享库是如何工作的吗?
问候。
编辑:
我收到以下错误:
int main() {
char* path = "/export/home/pdmazubi3/workspace/proj1/src/pic.jpg";
CEDD_Descriptor::CEDD ced; // undefined reference to `CEDD_Descriptor::CEDD::CEDD[in-charge]()'
ced.execute(path);
}
标题:
class CEDD
{
public:
CEDD(double Th0, double Th1, double Th2, double Th3,bool CompactDescriptor);
CEDD();
~CEDD(void);
double T0;
double T1;
double T2;
double T3;
bool Compact;
double* execute(char* path);
private:
int cedd_segnum; //number of segments
int* cedd_partitionSize; //number of pixels in each segment
};