Qt for manager

Discussion about recent product features & solutions!
17 posts • Page 1 of 2
CyaNn
Posts:97
Joined: Tue Nov 23, 2010 9:48 am

Qt for manager

Post by CyaNn »

Is it possible to use Qt framework and IDE to develop WinCC Control Manager or Drivers ?

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Qt for manager

Post by leoknipp »

Hello,

if you want to develop an own driver you have to use the WinCC OA API toolkit.
At the WinCC OA online help you'll find addiitional information concerning the API development at the chapters:
Installation --> Requirements for WinCC OA --> Software requirements
Special functions --> API
Special functions --> CTRL Extensions


You have to use the following toolkits:
Windows - Visual C++ / Visual Studio 2010 (VC10)
Linux - Red Hat Enterprise Server 4 (compilation with gcc-4.1.2).

Best Regards
Leopold Knipp
Senior Support Specialist

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Qt for manager

Post by mkoller »

You can use whatever IDE or Texteditor you like to write your source code.
And you can also use the Qt classes in your code.
The only thing which you should be aware of is the fact that our libraries already link against some Qt-4.7.0 libs, so you should use the same version for your development.

Also be aware that we compiled Qt-4.7.0 with a namespace on Linux so that the Qt libs do not collide with the libs already installed on the PC.
That is: configure Qt-4.7.0 on Linux with: -qtnamespace WinCC_OA -qtlibinfix WinCC_OA
ad for forward declaration of classes use the Qt macro, e.g.: QT_FORWARD_DECLARE_CLASS(QEvent)
(this makes sure the namespace is being used if it was defined, so your source is platform neutral and compiles with or without namespace)
And make sure you have the following define used when compiling: -DQT_NAMESPACE=WinCC_OA

CyaNn
Posts:97
Joined: Tue Nov 23, 2010 9:48 am

Re: Qt for manager

Post by CyaNn »

Hello Martin,

Thanks a lot for your reply.
It answer perfectly what I want: using QT framework to avoid some low level features programming.
I am not yet decided about the IDE. I think using Netbeans.

ragrawal
Posts:22
Joined: Tue Dec 14, 2010 5:53 am

Re: Qt for manager

Post by ragrawal »

Hello,
Please let me know the config settings for any Open Source IDE ( Netbeans or Eclipse) with PVSS API so that the code can be built from the IDE itself.

Can we also debug using the IDE in Linux? How?

I have experience of Windows with Visual Studio, there we can debug and do break point, single stepping etc.

CyaNn
Posts:97
Joined: Tue Nov 23, 2010 9:48 am

Re: Qt for manager

Post by CyaNn »

My idea is the following :
Using VS2008 to write the CtrlExtention interface
Using Qt to write a dynamic library with the business code and have benefict of QTest and other libraries.

The problem I have is :
When I use the Qt Library on the CrtlExt project I have the following error :
Image

I have tries to add all the dependencies dll in the bin folder of the wincc project, but nothing fixed the problem.
It works in the only case I remove my Lib.

Please can you help me ? Do you have any idea ?
Attachments
error.png

mpoint
Posts:49
Joined: Thu Oct 28, 2010 11:28 am

Re: Qt for manager

Post by mpoint »

Caron Yann wrote:
I have tries to add all the dependencies dll in the bin folder of the wincc project, but nothing fixed the problem.
It works in the only case I remove my Lib.
You can check the dependencies of the DLL with Dependency Walker, which would show you if an indirectly required DLL is missing. But this error message can also occur when your DLL was compiled for a different version of PVSS than you have installed, or probably if you did not use the CTRL_EXTENSION macro.

CyaNn
Posts:97
Joined: Tue Nov 23, 2010 9:48 am

Re: Qt for manager

Post by CyaNn »

Yes I have used the dependency walker to know what dll to put on /bin folder.
It found : MSVCR90D.dll and Kernel32.dll
But these two libs are windows system32, aren't it ? It is not necessary to add it into bin folder !

I have used the good Ctrl templates from WinCC/API directory.
If I suppress the call to my Qt lib, it works perfectly.

:blink: :blink: :blink: I really don't unserstand my mistake.

mpoint
Posts:49
Joined: Thu Oct 28, 2010 11:28 am

Re: Qt for manager

Post by mpoint »

I'm not sure it will solve your issue, but you should not use MSVCR90D.dll. This is the debug-version of the C Runtime. Our binaries are linked with the release-version of the Runtime, and mixing these can lead to issues.

EDIT:
Caron Yann wrote:
If I suppress the call to my Qt lib, it works perfectly.
This would suggest that your Qt library or its dependencies are not found, or an incompatible version with the same name is found. Have you checked in Dependency Walker that the correct libraries in the correct folder were found?

CyaNn
Posts:97
Joined: Tue Nov 23, 2010 9:48 am

Re: Qt for manager

Post by CyaNn »

Now I use the good MSVCR90.dll, not the debug one, but it does not solve the problem.

This is the Dependency walker output :
Image

The name of my CtrlExt is NetbeansCtrlExt and the qt lib is lib.dll.
Attachments
Dependency_Walker-20130116.png
Dependency_Walker.png

17 posts • Page 1 of 2