include compiled through command prompt static library in qt project -
i’m trying make simple static library, like: my.h
void my();
my.cpp
#include "my.h" #include "stdio.h" void my() { printf("hello, world"); }
if made in qtcreator, can call my() function in other project like:
.pro
includepath += c:/users/pc/my libs += -lc:/users/pc/my/debug -lmy
.cpp
#include <my.h> .... my();
when compiling library, makefile created qmake. if try compile stated in makefile through command prompt, other object , library files. if include them project, obtain error:
undefined reference `my()'.
how link static library through command prompt , include project?
Comments
Post a Comment