Snap7 for siemens control
-
Hi people,
i'm not software engineer, but my work is actually to create C++ soft to control gantry system (siemens language).
I use Qt because it's very easy to make user interface, and i know (a little) c++.
I use snap7 engine too (1.4.2). But i'm locked by an error (i think basic error): "LNK1181: cannot open input file 'snap7.obj'".
I only put all the cpp,h,def and lib files on my project (Qmake), i don't put any instruction using them. On my realease folder, there are some .obj files, but no any snap7.obj. I don't know how to create it, or use it.
Can something help me? :D (i can give you screenshoot if you need)
Thank you very much :-)
-
@LegendOfYoda Can you show your pro file and complete build log?
-
Hi @jsulm , thank you for your answer, there are the screens: (i only hide the name of my project because it's for my work)
-
@LegendOfYoda Why do you have LIBS += snap7 if you already added its source code files directly?
Either build snap7 as lib and add the lib to your project or remove LIBS += snap7 -
I tryed many thinks. If i remove only LIBS += snap7, i got the same issue, without .obj:
"LNK1104: cannot open file '..\XXX_Controler\snap7'"
-
@LegendOfYoda Try to remove DEF_FILE
-
i got another kind of issue:
I'm really inexperimented i can be very basic error from me! :/
-
@LegendOfYoda Does the file shown in the first line exist?
Remember that after changing pro file you need to run qmake first. Safest is to delete the build directory and then build again. -
Yes, i always clear - Qmake-build, and sometimes delete theses folders.
After doing tis, without .def,and without .lib, i got this kind of error:
(more than 130 issues)
I think .def is necessary, or an equivalent.
-
This post is deleted!