将静态库链接到.cpp文件

时间:2013-06-20 04:50:55

标签: c++ compilation static-libraries static-linking .a

我有一个libcx3d.a,它包含我的VrmlParser类和VrmlParser使用的其他类。

我有一个main.cpp可以做到这一点:

VrmlParser vp = new VrmlParser();  
double **VOB = vp.getVOB();`

我编译使用:

g++ main.cpp -o main -L. -lcx3d

我收到以下错误:

 'VrmlParser' was not declared in this scope. expected ';' before vp.   
 'vp' was not declared in this scope.

我该怎么办?

0 个答案:

没有答案