some problems with the build process

Forum for software developers to discuss BCI2000 software development
Locked
brice rebsamen
Posts: 7
Joined: 07 Sep 2010, 04:11

some problems with the build process

Post by brice rebsamen » 10 Jan 2011, 23:28

Under Windows 7

Impossible to make Visual C++ Express work properly: apparently there is something wrong with the compiler:


/////////////////////////////////////////////////////////////////////////////////////

C:\Users\Moe\Desktop\BCI2000\build>cmake "-DBUILD_CONTRIB:BOOL=FALSE" "-DBUILD_T
OOLS:BOOL=TRUE" "-DBUILD_MFC:BOOL=FALSE" "-DBUILD_BCPY2000:BOOL=FALSE" -G"Visual
Studio 9 2008"
-- Check for working C compiler using: Visual Studio 9 2008
-- Check for working C compiler using: Visual Studio 9 2008 -- broken
CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCComp
iler.cmake:52 (MESSAGE):
The C compiler "cl" is not able to compile a simple test program.

It fails with the following output:

Change Dir: C:/Users/Moe/Desktop/BCI2000/build/CMakeFiles/CMakeTmp

Run Build Command:C:\PROGRA~1\MICROS~2.0\Common7\IDE\VCExpress.exe
CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec

Microsoft (R) Visual C++ Express Edition Version 9.0.30729.1.

Copyright (C) Microsoft Corp 2007. All rights reserved.

1>------ Build started: Project: cmTryCompileExec, Configuration: Debug
Win32 ------

1>Compiling...

1>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for
80x86

1>Copyright (C) Microsoft Corporation. All rights reserved.
1>cl /Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "CMAKE_INTDIR=\"Debug\""
/D "_MBCS" /FD /RTC1 /MDd /Fo"cmTryCompileExec.dir\Debug\\"
/Fd"C:\Users\Moe\Desktop\BCI2000\build\CMakeFiles\CMakeTmp\Debug/cmTryCompileE
xec.pdb"
/W3 /c /Zi /TC /Zm1000

1> .\testCCompiler.c

1>testCCompiler.c

1>.\testCCompiler.c : fatal error C1033: cannot open program database ''

1>Build log was saved at
"file://c:\Users\Moe\Desktop\BCI2000\build\CMakeFiles\CMakeTmp\cmTryCompileExe
c.dir\Debug\BuildLog.htm"

1>cmTryCompileExec - 1 error(s), 0 warning(s)

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
==========

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:15 (PROJECT)

-- Configuring incomplete, errors occurred!


/////////////////////////////////////////////////////////////////////////////////////


So I dropped Visual C++, downloaded QT SDK, and went for the MinGW option, building against the standard QT, not the one shipped with BCI2000.

I had the following problems.



First: SpikeLFPGenerator (during cmake)

/////////////////////////////////////////////////////////////////////////////////////

CMake Error at C:/Users/Moe/Desktop/BCI2000/src/contrib/SignalSource/CMakeLists.
txt:16 (ADD_SUBDIRECTORY):
add_subdirectory given source "SpikeLFPGenerator" which is not an existing
directory.

/////////////////////////////////////////////////////////////////////////////////////

Fix: comment line 16 in src/contrib/SignalSource/CMakeLists.txt


Second: FilePlayback (compilation stage)

/////////////////////////////////////////////////////////////////////////////////////

[ 91%] Building CXX object contrib/SignalSource/FilePlayback/CMakeFiles/FilePlay
back.dir/FilePlaybackADC.cpp.obj
C:\Users\Moe\Desktop\BCI2000\src\contrib\SignalSource\FilePlayback\FilePlaybackA
DC.cpp: In member function 'virtual void FilePlaybackADC::Preflight(const Signal
Properties&, SignalProperties&) const':
C:\Users\Moe\Desktop\BCI2000\src\contrib\SignalSource\FilePlayback\FilePlaybackA
DC.cpp:86: error: 'dataFile' cannot appear in a constant-expression
C:\Users\Moe\Desktop\BCI2000\src\contrib\SignalSource\FilePlayback\FilePlaybackA
DC.cpp:86: error: '.' cannot appear in a constant-expression
C:\Users\Moe\Desktop\BCI2000\src\contrib\SignalSource\FilePlayback\FilePlaybackA
DC.cpp:89: error: 'dataFile' cannot appear in a constant-expression
C:\Users\Moe\Desktop\BCI2000\src\contrib\SignalSource\FilePlayback\FilePlaybackA
DC.cpp:89: error: '.' cannot appear in a constant-expression
C:\Users\Moe\Desktop\BCI2000\src\contrib\SignalSource\FilePlayback\FilePlaybackA
DC.cpp:92: error: 'dataFile' cannot appear in a constant-expression
C:\Users\Moe\Desktop\BCI2000\src\contrib\SignalSource\FilePlayback\FilePlaybackA
DC.cpp:92: error: '.' cannot appear in a constant-expression
C:\Users\Moe\Desktop\BCI2000\src\contrib\SignalSource\FilePlayback\FilePlaybackA
DC.cpp: In member function 'virtual void FilePlaybackADC::Initialize(const Signa
lProperties&, const SignalProperties&)':
C:\Users\Moe\Desktop\BCI2000\src\contrib\SignalSource\FilePlayback\FilePlaybackA
DC.cpp:131: error: ambiguous overload for 'operator=' in '((FilePlaybackADC*)thi
s)->FilePlaybackADC::mFileName = ((FilePlaybackADC*)this)->FilePlaybackADC::<ano
nymous>.GenericADC::<anonymous>.GenericFilter::<anonymous>.Environment::<anonymo
us>.EnvironmentBase::Parameter(((const std::string&)(& std::basic_string<char, s
td::char_traits<char>, std::allocator<char> >(((const char*)"FileName"), ((const
std::allocator<char>&)((const std::allocator<char>*)(& std::allocator<char>()))
)))))'
c:\qt\2010.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/bits/basic_string.h
:505: note: candidates are: std::basic_string<_CharT, _Traits, _Alloc>& std::bas
ic_string<_CharT, _Traits, _Alloc>::operator=(const std::basic_string<_CharT, _T
raits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc =
std::allocator<char>]
c:\qt\2010.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/bits/basic_string.h
:513: note: std::basic_string<_CharT, _Traits, _Alloc>& std::bas
ic_string<_CharT, _Traits, _Alloc>::operator=(const _CharT*) [with _CharT = char
, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>] <near match>
c:\qt\2010.05\mingw\bin\../lib/gcc/mingw32/4.4.0/include/c++/bits/basic_string.h
:524: note: std::basic_string<_CharT, _Traits, _Alloc>& std::bas
ic_string<_CharT, _Traits, _Alloc>::operator=(_CharT) [with _CharT = char, _Trai
ts = std::char_traits<char>, _Alloc = std::allocator<char>]
C:\Users\Moe\Desktop\BCI2000\src\contrib\SignalSource\FilePlayback\FilePlaybackA
DC.cpp:149: error: 'FilePlaybackADC::mDataFile' cannot appear in a constant-expr
ession
C:\Users\Moe\Desktop\BCI2000\src\contrib\SignalSource\FilePlayback\FilePlaybackA
DC.cpp:149: error: '->' cannot appear in a constant-expression
C:\Users\Moe\Desktop\BCI2000\src\contrib\SignalSource\FilePlayback\FilePlaybackA
DC.cpp:153: error: 'FilePlaybackADC::mDataFile' cannot appear in a constant-expr
ession
C:\Users\Moe\Desktop\BCI2000\src\contrib\SignalSource\FilePlayback\FilePlaybackA
DC.cpp:153: error: '->' cannot appear in a constant-expression
C:\Users\Moe\Desktop\BCI2000\src\contrib\SignalSource\FilePlayback\FilePlaybackA
DC.cpp:157: error: 'FilePlaybackADC::mDataFile' cannot appear in a constant-expr
ession
C:\Users\Moe\Desktop\BCI2000\src\contrib\SignalSource\FilePlayback\FilePlaybackA
DC.cpp:157: error: '->' cannot appear in a constant-expression
mingw32-make[2]: *** [contrib/SignalSource/FilePlayback/CMakeFiles/FilePlayback.
dir/FilePlaybackADC.cpp.obj] Error 1
mingw32-make[1]: *** [contrib/SignalSource/FilePlayback/CMakeFiles/FilePlayback.
dir/all] Error 2
mingw32-make: *** [all] Error 2

/////////////////////////////////////////////////////////////////////////////////////

Again I commented the FilePlayback line in CMakeLists.txt, because I don't need it (for now).

After that the whole compilation went fine, including the BCPy2000 stuffs.

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

Post by mellinger » 11 Jan 2011, 08:51

Brice,

did you try with Visual C++ Express 2008 or 2010? 2010 is not supported currently.

The compilation errors with MinGW will be fixed soon.

Best regards,
Juergen

brice rebsamen
Posts: 7
Joined: 07 Sep 2010, 04:11

Post by brice rebsamen » 11 Jan 2011, 10:22

I tried with visual c++ 2008

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

Post by mellinger » 12 Jan 2011, 08:28

Maybe this is a Windows 7 issue -- it works fine under XP.

azurex
Posts: 12
Joined: 16 Mar 2011, 10:31

Re: some problems with the build process

Post by azurex » 30 Mar 2011, 15:36

If you can get access to Visual Studio Professional 2008, then it will work. Check with your school to see if you already have access through MSDNAA or Dreamspark. Also alternatively, join IEEE to gain access to MSDNAA for free. That is an alternative while you wait.

Locked

Who is online

Users browsing this forum: Google [Bot] and 3 guests