EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: EpicsQt compile problems
From: <[email protected]>
To: <[email protected]>, <[email protected]>
Date: Tue, 8 Mar 2016 15:48:04 +0000

Hi Andrew,

 

Thanks for your help, I now have it working. It was the PATH on the PC that was causing the problem when Designer started. I became suspicious when your method failed as well. I  did the same install on another PC and it all worked just fine.

 

So, I went back and cleaned out all the user ENV variables, but still got: “%1 this is not a valid Win32 application”. In the end, I fixed it by making a Windows .bat file to start Designer with the right environment. The first lines flushes the PATH and QT_PLUGIN_PATH, the next sets the PATH to how EpicsQt needs it. The EpicsQt DLL needs the  EPICS .DLL files and the Qwt .DLL:

 

set PATH=""

set QT_PLUGIN_PATH=""

 

PATH=<PATH TO YOUR EPICS BASE> <PATH TO EPICS_BIN>;%PATH%

PATH=<PATH TO QWT><PATH TO LIB>;%PATH%

<PATH TO 5.5.1 DESIGNER >\designer.exe

 

Here is a copy of mine for clarity:

set PATH=""

set QT_PLUGIN_PATH=""

PATH=C: \base-3.15.3\bin\win32-x86-mingw;%PATH%

PATH=C: \qwt-6.1.2\lib;%PATH%

C:\Qtmin\Qt5.5.1\5.5\mingw492_32\bin\designer.exe

 

Other notes from this:

 

Framework.pro

 

I needed to uncomment these lines in the framework.pro file in EpicsQt:

DEFINES += _MINGW=TRUE

INCLUDEPATH += $$_QE_EPICS_BASE/include/compiler/gcc

 

And change the path on this line to my version of Qwt:

win32:LIBS += -LC: \qwt-6.1.2\lib

 

Compile

 

I used mingw32-make for everything. I think nmake (Visual Studio) and ming32 don’t play well. Mingw32 was added when installing  Qt 5.5.1; you have to tick the option to add the Mingw32 Toolchain otherwise it will not install.

 

I used windows .bat files to set up and compile from  cmd windows (yea, I am used to Linux!)

 

I built the makefiles for EpicsQt and Qwt with

qmake –r –platform win32-g++

 

–r was needed to get the subdirectories to build and –platform win32-g++ was due to a compile  error after using nmake (for Visual Studio) and then switching to mingw32-make. This will break the makefile. If you have never used nmake on your sources you will not need this option.

 

My compile flags were:

mingw32-make –j4 release

 

The –j4 was to use multiple cores on the CPU and release suppresses the debug version of the code and  the “debug and release” error in Designer you mentioned.

 

Is there an option to do a static build for the EpicsQt DLL?

 

Best regards,

 

Rory

 

 

From: Andrew Rhyder [mailto:[email protected]]
Sent: 07 March 2016 11:31
To: Clarke, Rory (STFC,DL,TECH); [email protected]
Subject: RE: EpicsQt compile problems

 

Hi Rory

 

I can’t see any particular problem with your setup. We have tried to ensure EpicsQt continues to build over a range of version of Qt and compilers and your setup is not exceptional. While we don’t confirm that the latest of everything will work all the time, I have recently confirmed the following setup builds and runs with the latest trunk source based on epicsQt 3.2.5. (Although there are warnings regarding the use of some deprecated Qt include files which have moved in Qt5.5 which will be removed shortly.)

 

- Window8 64 bit

- Qt 5.5.1 MinGW 32 bit

- Qt Creator 3.6.0 Based on Qt 5.5.1 (MSVC 2013, 32 bit)

- MinGW 4.9.2   32 bit

- QWT 6.1 built with MinGW 4.9.2   32 bit

- EPICS 3.15.3 built with MinGW 4.9.2 and Strawberry Perl 5.22.1.2-64bit

 

This set up is not a long way from your own.

 

Changes for Qt5 were introduced around epcisQt version 2.8, changes for Qt5.2 were released in 3.2.3 changes for Qt5.4 were released in epicsQt 3.2.4. If epicsQt3.1.0 compiles Ok, the you should be good regarding the Qt version.

 

By the way, to avoid some mingw environment errors you can include the following in examplePlugin.pro and framework.pro which may avoid the need to comment out Timespec. (This ‘defines’ is already there, just commented out)

 

  DEFINES += _MINGW=TRUE

 

Also – a long shot - QtDesigner won’t let you mix debug and release plugins, so unless all plugins are debug, you can’t run a debug version of QEPlugin.dll, but I recall it kicks back with a very specific message about this though. Not the "not valid win 32” message you are dealing with.

 

Rather than try to use it in Designer as a plugin, have you tried running QEGui, or one of the sample applications (QEMonitor, QEWidgetDisplay) in epicsQt which loads QEPlugin.dll as a dll rather than a Qt plugin?

 

I hope some of this helps. Let me know if I should do some more digging.

 

Regards

Andrew

 


From: [email protected] [[email protected]] on behalf of [email protected] [[email protected]]
Sent: Friday, 4 March 2016 08:29
To: [email protected]
Subject: EpicsQt compile problems

Hi, I am having some major problems trying to compile EpicsQt source files to make custom plugins

 

My setup is a Windows 64 bit machine and I compile in 32 bits but I think the problem is using Qt5 which is 32 bit and telling me “%1 this is not a valid win32 plugin”

 

Setup:

64Bit machine, Windows7

Qt5

For Visual Studio I used the C++ libs:

VC 2012 and VC 2015. I ended up only using VC2012 libs to get as close to the Qt4 install as possible

Mingw32 bit

Strawberry Perl 32 bit

 

All compiled on the command line.

 

The version of EpicsQt is 3.1.0 simply because I found a working windows version of epicsqt on Sourceforge that I could trial and assumed that if the EpicsQt team could get that working so could I.  I have made some of my own libraries under this system but I get a strange “not valid win 32” error when try to open the QEPlugin.dll in designer 5.5. I am wondering if I am using something that is too new?

 

I compiled Epics Base and epicsqt with the win-x86-ming32. The only change I made was to comment out Timespec for EPICS base to get this to work with Mingw32 but base works and caget opens. VC2012 is also set to be 32 bits in this compile.

 

Now for EpicsQt:

3.1.0 compiles just fine. I used a program called “depends” to check QEPlugin.dll . It shares to the exact same x64 system libs that the working demo version uses and is an x32 lib like the working version. So, seeing as I have used 32bits everywhere, any idea why Qt5 should throw that error? Will EpicsQt not build for Qt5? I’m hoping that one of the Qt’ers out there has used a similar setup (Qt5, Visual Studio 2013 or 2015). I tried to install Qt4 in desperation but it is telling me that Mingw32 Is too new and may cause errors. I am wondering what should be the next step forward, as the Qt designer “not a valid win32 ” error is not much to go on.

 

Regards,

 

Rory

 

Rory Clarke

Electrical and Controls Systems Group

Daresbury Laboratory

Keckwick Lane

Warrington

Cheshire

WA4 4AD

 

E: [email protected]

T: 01925 60 Ext. 3777

 


References:
EpicsQt compile problems rory.clarke
RE: EpicsQt compile problems Andrew Rhyder

Navigate by Date:
Prev: RE: Array of strings with asyn? Mark Rivers
Next: Re: Q: Are any tools using gui_group() properties? Rolf Keitel
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: EpicsQt compile problems Andrew Rhyder
Next: question about archive 岳敏
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·