Unknown CMake command "QT4_WRAP_CPP".

Known Issues and Problems with BCI2000
Post Reply
lsegura003
Posts: 19
Joined: 07 Sep 2016, 20:03

Unknown CMake command "QT4_WRAP_CPP".

Post by lsegura003 » 15 Sep 2016, 11:29

Hey,

First of all ,the software i am using for this is tortoiseSVN, to get 3.0.5 source code version at:

http://www.bci2000.org/svn/tags/releases/current/

Visual Studio 2010 Express with SP1

Cmake 3.3.2 (altough i tried with other Cmake versions)

Windows 7 32/64 bits (i try doing same things independently in both)

QT 4.8.6 (as external QT libraries, i will explain why later, but it will not solve nothing)


after trying to build from source code 3.0.5, i get this error

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 . . .

I have been checking this forums and came up with 2 threads:

First one gives as solution to add QT/bin to windows PATH (which i did).
by rnordstrom » Thu Feb 05, 2015 18:03

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.
Then, as that did not solve nothing, i used external QT libraries (as stated as another solution):

Before starting, to understand it, you must know that QT libraries are not included in BCI2000 files. They are downloaded later, as stated here
Postby mellinger » Thu Aug 08, 2013 16:10

Hi,

there have been quite some changes since this thread was started half a year ago.
Especially, precompiled static Qt libraries are no longer kept in the BCI2000 repository.

Rather, they are downloaded by CMake at configuration time, trying a plain HTTP download first, and using a locally installed SVN command line client if that fails.
Also, for non-Windows platforms, there are no precompiled Qt libraries available.
So when we do the next thing, we are telling our cmake not to download QT libraries in our BCI2000 folders, but to use the QT libraries defined in our system path.
We managed to fix this by downloading and installing Qt 4.8 and modifying the FindQt.cmake file in the build/cmake directory of BCI2000 from "SET( USE_STD_QT FALSE )" to read "SET( USE_STD_QT TRUE )". This fix isn't ideal, since the Qt installation is another 200MB after checking out the BCI2000 source code, but I'm not sure what else to do.
Problem is that even this way we are able to build the BCI2000.sln for our project, it is not correctly done (you notice it fast, as executables generated have like a 15% of the weigth in MB they should).

So here i am, not really sure on what to do next.

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: Unknown CMake command "QT4_WRAP_CPP".

Post by pbrunner » 15 Sep 2016, 18:06

lsegura003,

It seems like as if building BCI2000 with external QT will work properly with the 3.0.5 source code on your machine. You have two alternatives:

1) Use the pre-compiled static compilation of QT4 that is downloaded with setting up the build environment of 3.0.5.

2) Use the latest trunk source code with VS2012SP4. If there is a specific reason to use a external QT version, you can do this properly with the latest trunk, either by using the standard settings and external QT, which will bundle the dlls into the executable, or by disabling the app bundling the cmake configuration to use the QT in the path.

Let me know if this resolves the issue.

Regards, Peter

lsegura003
Posts: 19
Joined: 07 Sep 2016, 20:03

Re: Unknown CMake command "QT4_WRAP_CPP".

Post by lsegura003 » 15 Sep 2016, 19:05

1) Use the pre-compiled static compilation of QT4 that is downloaded with setting up the build environment of 3.0.5.


I do not know if i understand this. You mean not to use external ones? I use external ones because when i use the make VS2010 project files it is not able to download QT libraries.

2) Use the latest trunk source code with VS2012SP4. If there is a specific reason to use a external QT version, you can do this properly with the latest trunk, either by using the standard settings and external QT, which will bundle the dlls into the executable, or by disabling the app bundling the cmake configuration to use the QT in the path.
Trunk code (3.6 version i think ) with 3.6 binaries gives problems in the execution, not compilation.

That is why i am trying to build in with 3.0.5 source code.

Perhaps i am mistaken and trunk source code is compatible with 3.0.5?

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests