(1) Does the (...)\release directory contain elab.lib?
It does.
(2)Does the elab lib contain precalc()? Use lib /list elab.lib for the check. You should see "precalc".
It probably doesnt. Running the lib /list elab.lib I get just
release mat.obj
release mat.obj
To copy to clipboard, switch view to plain text mode
So I guess my elab.lib is not ok. How do I fix it in Qt? I open elab project in Qt designer and I have mat.h
#ifndef ADD_H
#define ADD_H
int precalc(int x, int y);
#endif
#ifndef ADD_H
#define ADD_H
int precalc(int x, int y);
#endif
To copy to clipboard, switch view to plain text mode
mat.cpp
int precalc(int x, int y) {
return (x + y);
}
int precalc(int x, int y) {
return (x + y);
}
To copy to clipboard, switch view to plain text mode
and elab.pro
TEMPLATE = lib
CONFIG += staticlib
TARGET = elab
QT -= core
HEADERS = mat.h
SOURCES = mat.cpp
TEMPLATE = lib
CONFIG += staticlib
TARGET = elab
QT -= core
HEADERS = mat.h
SOURCES = mat.cpp
To copy to clipboard, switch view to plain text mode
Shouldn't this build a valid "lib"?
(3) Use the second form (simply "path/library.lib") of LIBS. The first form can cause problems. Do not use quotation marks around unless you absolutely must. Also, many software has troubles with blanks in file and directory names. Use rather names without blanks (it's not our case but an experience).
Ok I used the second form, no spaces in path, but I don't think this is the problem.
Bookmarks