调用静态库文件时提示未定义
想学习eclipse开发c++ ,自己编写了一个makefile
在hello.cpp里定义了 sayhello(); 然后生成hello.a
在把hello.a便已到main.exe里面去
这一条命令
g++ -Wall -I./src/hello -o main.exe src/hello/hello.a src/main.o
在cmd 里直接使用能上面的命令 可以生成 main.exe 且运行正常
而eclipse编写makefile执行上面这条命令就会提示src/main.o:main.cpp:(.text+0xc): undefined reference to `sayhello()'
请高手指点迷津~