Solved I added a .lib file and calling object problem
-
Hi ,
I am trying to create an object in .lib ,but I cannot rich it.
-
Check your .pro file.
That you link to the Dll.
(i assume you are using lib+dll and not all .cpp in project)Run qmake and watch output if it complains about the lib/dll
-
Hmm,no dll ,I didnt add it because I dont know how can I do it,where will I put it in project
-
@ZekDe
Hi
The lib file describes what symbols (code) that is visible. (or whole lib)
The DLL contains the actual binary code.
Always keep them together.
So where u point the .pro file should contain the DLL also.
You dont add the .dll to the project. its loaded runtime. -
What I do is snap7.cpp,snap7.h,snap7.lib is in project ,I linked the .lib and I didnt add the snap7.cpp and snap7.h already program handled it as far as I understand.
-
Hi
Where is the dll?
when you compiled the project, it didnt make a dll?
This is ULTRA important -
Hmm,when the download the folders in snap7 webside,They came with together .dll and .lib also .cpp and .h ,but when I add the .cpp,.h,.lib I didnt get any dll in runtime because I cannot compile because of mistake
-
I suppose I have to use dll coming with download ,am I right,also additional ,I tried src files all sources codes to compile but in this time program cannot find a xxxx.h as a result again I had a problem
-
When I went to home ,I will send .pro file İF you would like ,all project file
-
Hi
so you never ran the .bat file to build the lib? -
No,I didnt
-
Well ,how can I src folders,probably this is better to use but I have a mistake with it .cannot find snap_threads.h but it is there
-
@ZekDe
Hi
Add the .h and .cpp files
Adjust
INCLUDEPATH += to include those locations where .h files can be found. -
@mrjj said in I added a .lib file and calling object problem:
Adjust
INCLUDEPATH += to include those locations where .h files can be found.Hi

-
Ok it is solved.
win32:LIBS += C:\Qt\Tools\mingw530_32\i686-w64-mingw32\lib\libws2_32.a
win32:LIBS += C:\Qt\Tools\mingw530_32\i686-w64-mingw32\lib\libwinmm.abut Why I dont know,