Coder Social home page Coder Social logo

Comments (16)

vshevchyk avatar vshevchyk commented on May 10, 2024

Hello,

The easiest way to run QSimpleScadaSample is to use qpm. Just run qpm install inside QSimpleScadaSample and QSimpleScada will be downloaded and installed in vendor folder. After that you can compile sample.

Regarding lib folder it will be in the same path with QSimpleScada
//in pro file
win32 {
DLLDESTDIR +=../QSimpleScadaLib/
}

Regarding how to add lib to QSimpleScadaSample, just connect dll and hearers in pro file and remove line - include(com_indeema_QSimpleScada.pri) - from pro file.

from qsimplescada.

Ahrovan avatar Ahrovan commented on May 10, 2024
QSimpleScada-master>qpm install
QPM: 2018/12/22 16:01:48 ERROR: rpc error: code = 3 desc = Must supply at least one package

and

QSimpleScadaSample-master>qpm install
QPM: 2018/12/22 16:02:28 ERROR: No qpm.json file found

from qsimplescada.

vshevchyk avatar vshevchyk commented on May 10, 2024

in QSimapleScadaSample run
qpm install com.indeema.QSimpleScada

or now just run
qpm install

I've added qpm file.

from qsimplescada.

Ahrovan avatar Ahrovan commented on May 10, 2024

in QSimpleScada-master dir, I opened QSimpleScada.pro and build qt project:

16:33:05: Running steps for project QSimpleScada...
16:33:05: Configuration unchanged, skipping qmake step.
16:33:05: Starting: "C:\Qt\Qt5.9.0\Tools\mingw530_32\bin\mingw32-make.exe" 
C:/Qt/Qt5.9.0/Tools/mingw530_32/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'E:/Design/QSimpleScada-master/build-QSimpleScada-Desktop_Qt_5_9_0_MinGW_32bit-Debug'
mingw32-make[1]: Nothing to be done for 'first'.
mingw32-make[1]: Leaving directory 'E:/Design/QSimpleScada-master/build-QSimpleScada-Desktop_Qt_5_9_0_MinGW_32bit-Debug'
16:33:07: The process "C:\Qt\Qt5.9.0\Tools\mingw530_32\bin\mingw32-make.exe" exited normally.
16:33:07: Elapsed time: 00:02.

QSimpleScada0.dll created in QSimpleScada-master\QSimpleScadaLib.
then as you say:

QSimpleScadaSample-master\QSimpleScadaSample-master>qpm install com.indeema.QSimpleScada
INFO: Package com.indeema.qsimplescada has a different license (MIT) than it's dependant (NONE).
Installing [email protected]

QSimpleScadaSample-master\QSimpleScadaSample-master>qpm install
INFO: Package com.indeema.qsimplescada has a different license (MIT) than it's dependant (NONE).
Installing [email protected]

QSimpleScadaSample-master\QSimpleScadaSample-master>

now vender

added:

12/22/2018  04:35 PM    <DIR>          .
12/22/2018  04:35 PM    <DIR>          ..
09/11/2018  09:45 PM               172 main.cpp
09/11/2018  09:45 PM             7,403 mainwindow.cpp
09/11/2018  09:45 PM               822 mainwindow.h
09/11/2018  09:45 PM             2,180 mainwindow.ui
12/22/2018  04:35 PM                64 qpm.json
09/11/2018  09:45 PM             1,081 QSimpleScadaSample.pro
09/11/2018  09:45 PM             1,377 README.md
09/11/2018  09:45 PM    <DIR>          resources
09/11/2018  09:45 PM               107 resources.qrc
12/22/2018  04:35 PM    <DIR>          vendor
               8 File(s)         13,206 bytes
               4 Dir(s)  46,477,438,976 bytes free

then open QSimpleScadaSample.pro with qt

also I added

win32 {
DLLDESTDIR +=../QSimpleScadaLib/
}

to QSimpleScadaSample.pro file.

Result:
E:\Design\QSimpleScadaSample-master\QSimpleScadaSample-master\vendor\com\indeema\qsimplescada\QScadaBoard\qscadaboardcontroller.h:7: error: ../QScadaObject/qscadaobject.h: No such file or directory
but now I don't know why error occur.

from qsimplescada.

vshevchyk avatar vshevchyk commented on May 10, 2024

You don't need to compile QSimpleScada as dll if you are using qpm. QPM downloads code from github and locates in vendor folder.

You should use custom compilation or qpm.
If custom compilation then you also nee to add headers to your project.

win32 {
DLLDESTDIR +=../QSimpleScadaLib/
INCLUDPATH += ../QSimpleScada
}

I reccomend to use qpm. so remove win32 from profile.

from qsimplescada.

Ahrovan avatar Ahrovan commented on May 10, 2024

include(com_indeema_QSimpleScada.pri) is Only in QSimpleScada.pro project that was built with qt and QSimpleScada0.dll created. I have previously worked with qt. I don't know the relationship between the two projects.

qpm created C:\Users\USER\vendor, I see C:\Users\USER\vendor\com\indeema\qsimplescada.

I went the way you said with qpm. Please guide for that. now I do not work with the project QSimpleScada for custom compilation

from qsimplescada.

Ahrovan avatar Ahrovan commented on May 10, 2024

I removed:
win32 {
DLLDESTDIR +=../QSimpleScadaLib/
}
my qt project :
image

from qsimplescada.

vshevchyk avatar vshevchyk commented on May 10, 2024

Did you remove shadow build folder before compilation?

from qsimplescada.

Ahrovan avatar Ahrovan commented on May 10, 2024

no, There is no such folder name in sample files
If you mean the folder ؛build-QSimpleScadaSample-Desktop_Qt_5_9_0_MinGW_32bit-Debug؛ Yes I try remove that and rebuild project again

from qsimplescada.

vshevchyk avatar vshevchyk commented on May 10, 2024

Could you copy here the whole error, as it's cutted on screenshot

from qsimplescada.

Ahrovan avatar Ahrovan commented on May 10, 2024

image

and .pro file:

#-------------------------------------------------
#
# Project created by QtCreator 2017-07-01T17:39:42
#
#-------------------------------------------------

QT       += core gui network

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = QSimpleScadaSample
TEMPLATE = app
CONFIG +=C++14

# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

include (./vendor/vendor.pri)

SOURCES += main.cpp\
        mainwindow.cpp

HEADERS  += mainwindow.h

RESOURCES += resources.qrc

FORMS += mainwindow.ui

from qsimplescada.

vshevchyk avatar vshevchyk commented on May 10, 2024

I just checked on my machine, it's working fine.

It looks like INCLUDEPATH += $$PWD in QSimpleScada pri file is not working

from qsimplescada.

vshevchyk avatar vshevchyk commented on May 10, 2024

Also please check if all files where download correctly

screen shot 2018-12-22 at 3 57 43 pm

from qsimplescada.

Ahrovan avatar Ahrovan commented on May 10, 2024

image
I do not know why my folder is very different from the contents of your folder.
The contents after running the following two commands were added. Unless you have done another way to add this folder:

QSimpleScadaSample-master>qpm install com.indeema.QSimpleScada
QSimpleScadaSample-master>qpm install

I checked but don't know why ..
image

from qsimplescada.

Ahrovan avatar Ahrovan commented on May 10, 2024

I changed project dir to C:/ and rebuild. problem solved.

from qsimplescada.

vshevchyk avatar vshevchyk commented on May 10, 2024

Super, I am happy to hear that. Please mark this issue solved

from qsimplescada.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.