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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -