日期:2014-05-16  浏览次数:20621 次

加载静态库失败
在当前文件夹下存在一个名为libmy.a的静态库,通过下面命令加载失败:
  $(GPLUS) -o $(TARGET) $(OBJ) -L$(STATIC_LIB) -lmy.a 
其中STATIC_LIB 为当前程序路径。
请问是哪里出错了。

错误提示:
g++ -c test.cpp
g++ -c -I/opt/install_cpp/include run.cpp
echo "shit"
shit
g++ -o cppunit_CROSS test.o run.o -L/mnt/hgfs/share/cppunittest -lmy.a 
/usr/bin/ld: cannot find -lmy.a
collect2: ld returned 1 exit status
make: *** [all] Error 1


------解决方案--------------------
探讨

请帮忙分析一下。谢谢