Unknown CMake command "QT4_WRAP_CPP".

Forum for software developers to discuss BCI2000 software development
Post Reply
rnordstrom
Posts: 3
Joined: 07 Jun 2014, 23:15

Unknown CMake command "QT4_WRAP_CPP".

Post by rnordstrom » 30 Oct 2014, 07:39

Hello!
This has been tried on both a WinXP (64 bit) and a Win7 (32 bit) system. IDE is Visual Studio 2010.
Running the file "Make VS10 Project Files.bat", renders the error "Unknown CMake command "QT4_WRAP_CPP".", both from the current revision (4761) or at the latest release version (4230).
Following the advice given in other threads, and linking to an own installation of QT4 (v.4.8.6) works initially, but renders the error "QtCore4.dll cannot be found" when running a built test module, as per this thread. The wiki also advices against this build method, citing "DLL hell" issues.

To quote mellingers post
There is no USE_STD_QT any more -- instead, cmake will try to detect whether there is a BCI2000-precompiled version of Qt available for your platform/compiler, and will try to detect an external installation of Qt if this is not the case.
I cannot get this method to work. I have tested it on both XP and 7, CMake v.2.8.3 (linked from here) and latest stable release (3.0.2, downloaded from Cmake.org). Output below;

Code: Select all

C:\Documents and Settings\Administrator\My Documents\BCI2000\v4230\build>cmake
-G "Visual Studio 10"
-- Check for working C compiler using: Visual Studio 10
-- Check for working C compiler using: Visual Studio 10 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 10
-- Check for working CXX compiler using: Visual Studio 10 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Qt QTGUI library not found.
Qt QTCORE library not found.
-- Creating Project files for BCI2000 Version 3.0.5
-- Skipping custom extension DataGloveLogger
---- (to enable, set the BUILD_DATAGLOVELOGGER setting to TRUE)
-- Skipping custom extension WebcamLogger
---- (to enable, set the BUILD_WEBCAMLOGGER setting to TRUE)
-- Skipping custom extension EyetrackerLogger
---- (to enable, set the BUILD_EYETRACKERLOGGER setting to TRUE)
-- Skipping custom extension WiimoteLogger
---- (to enable, set the BUILD_WIIMOTELOGGER setting to TRUE)
-- Skipping custom extension GazeMonitorFilter
---- (to enable, set the BUILD_GAZEMONITORFILTER setting to TRUE)
-- Skipping custom extension AudioExtension
---- (to enable, set the BUILD_AUDIOEXTENSION setting to TRUE)
---Adding Framework Library: BCI2000FrameworkCore
---Adding Framework Library: BCI2000FrameworkSigSrcModule
---Adding Framework Library: BCI2000FrameworkSigProcModule
---Adding Framework Library: BCI2000FrameworkAppModule
Qt QTOPENGL library not found.
Qt QTGUI library not found.
Qt QTCORE library not found.
Qt QTOPENGL library not found.
Qt QTGUI library not found.
Qt QTCORE library not found.
CMake Error at C:/Documents and Settings/Administrator/My Documents/BCI2000/v423
0/src/extlib/3DAPI/Demo/CMakeLists.txt:31 (QT4_WRAP_CPP):
  Unknown CMake command "QT4_WRAP_CPP".


-- Configuring incomplete, errors occurred!
Press any key to continue . . .
Is there another way to get the "stripped-down, precompiled version of Qt" refered to on the wiki?

rnordstrom
Posts: 3
Joined: 07 Jun 2014, 23:15

Re: Unknown CMake command "QT4_WRAP_CPP".

Post by rnordstrom » 31 Oct 2014, 01:37

Problem solved by adding C:\Qt\4.8.6\bin to PATH. Now I can build against an external QT lib, and run the executables.

ALShope
Posts: 3
Joined: 26 Nov 2014, 13:29

Re: Unknown CMake command "QT4_WRAP_CPP".

Post by ALShope » 11 Dec 2014, 11:01

I seem to be having the same problem. I was wondering if you could add more details on how you fixed it. Did you add C:\QT\4.8.6\bin to PATH of CMAKE or PATH of VS2010?

Thanks!

nisl4218d
Posts: 2
Joined: 29 Oct 2014, 04:36

Re: Unknown CMake command "QT4_WRAP_CPP".

Post by nisl4218d » 20 Dec 2014, 23:16

I meet this problem, too. Plz let me know if there is any solution.

Thx!

mellinger
Posts: 1052
Joined: 12 Feb 2003, 11:06

Re: Unknown CMake command "QT4_WRAP_CPP".

Post by mellinger » 09 Jan 2015, 09:14

Hi,
sorry for not replying earlier.
The BCI2000 trunk is currently broken and will remain so until the next binary release comes out, which is scheduled for the first quarter of this year.

If you experience build problems, please check out the source code version corresponding to the most recent binary release, as suggested on the BCI2000 wiki:

http://www.bci2000.org/svn/stable

instead of /svn/trunk.

Regards,
Juergen

rnordstrom
Posts: 3
Joined: 07 Jun 2014, 23:15

Re: Unknown CMake command "QT4_WRAP_CPP".

Post by rnordstrom » 05 Feb 2015, 18:03

ALShope wrote:I seem to be having the same problem. I was wondering if you could add more details on how you fixed it. Did you add C:\QT\4.8.6\bin to PATH of CMAKE or PATH of VS2010?

Thanks!
Hello!

Very sorry for late answer. I added the search path to QT:s bin-directory ("C:\QT\4.8.6\bin", but it might be different on your system) in Windows PATH variable. To set it, one can navigate via Windows GUI:
  • Click the Windows-orb/Start-button
  • Right-click Computer->Properties
  • "Advanced System Settings" (left side)
  • "Environment Variables"-button
  • Edit the variable named "Path". Use a semicolon (;) to separate two entries, remember to enclose path in double quotes (") if it has spaces.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest