qt, undefined reference to a function

qt中,create

//common.h 
void test();
//common.cpp 
#include "common.h"
void test(){
 //code
}

qmake compile the project

output error:

undefined reference to test() function

add common.h and common.cpp to .pro file

你可能感兴趣的:(qt, undefined reference to a function)