We're Hiring!

C++ Header compiler error of ome-bioformat in Qt5.7-VC12-x86

Having a problem deploying OMERO? Here's a great place to start.
Please note:
The OMERO.server installation documentation begins here and you can find OMERO.web deployment documentation here.

C++ Header compiler error of ome-bioformat in Qt5.7-VC12-x86

Postby Polaris » Fri Jul 15, 2016 1:08 pm

I use ome-bioformats library to develop an windows application. The framework I have already download is bioformats-cpp-5.1.8-Release-WindowsVC12-x86. The IDE of the project is Qt5-VC12. I import the biofomat library into the project and test the tutorial example http://www.openmicroscopy.org/site/supp ... writer.cpp. There are many compile error, all about the c++ header file error inbioformats-cpp-5.1.8-Release-WindowsVC12-x86/include/boost. I am very expected someone can help me to fix it.
Polaris
 
Posts: 7
Joined: Fri Jul 15, 2016 12:14 pm

Re: C++ Header compiler error of ome-bioformat in Qt5.7-VC12

Postby rleigh » Fri Jul 15, 2016 1:21 pm

Please could you post a transcript of the errors so we can take a look?

How exactly did you got about importing the library into your project?

Is the search path for the headers set to look in the include directory of the downloaded build? That's where all the boost and other headers needed should be located.

The other thing to check is that the project configuration matches the build you downloaded, i.e. x86|x64, debug|release, otherwise the libraries and runtime might not be compatible.

Thanks,
Roger
User avatar
rleigh
Team Member
 
Posts: 215
Joined: Tue Mar 13, 2012 11:45 am

Re: C++ Header compiler error of ome-bioformat in Qt5.7-VC12

Postby Polaris » Fri Jul 15, 2016 1:59 pm

The errors
Code: Select all
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(435): error C2988: unrecognizable template declaration/definition
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(435): error C2059: syntax error: '('
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(435): error C2091: function returns function
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(435): error C2059: syntax error: ')'
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(440): error C2143: syntax error: missing ';' before '}'
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(440): error C2238: unexpected token(s) preceding ';'
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(1355): error C2059: syntax error: '('
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(2370): note: see reference to class template instantiation 'boost::variant<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39>' being compiled
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(1355): error C2091: function returns function
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(1355): error C2059: syntax error: ')'
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(1355): error C2059: syntax error: '{'
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(1355): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(1750): error C2059: syntax error: '('
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(1750): error C2091: function returns function
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(1750): error C2059: syntax error: ')'
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(1750): error C2059: syntax error: '{'
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(1750): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(2147): error C2059: syntax error: '('
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(2147): error C2091: function returns function
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(2147): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(2147): error C2059: syntax error: ')'
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(2149): error C2059: syntax error: '{'
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/variant/variant.hpp(2149): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/optional/optional.hpp(870): error C2059: syntax error: '('
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/optional/optional.hpp(1173): note: see reference to class template instantiation 'boost::optional<T>' being compiled
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/optional/optional.hpp(870): error C2091: function returns function
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/optional/optional.hpp(870): error C2059: syntax error: ')'
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/optional/optional.hpp(871): error C2059: syntax error: ')'
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/optional/optional.hpp(870): error C2059: syntax error: ':'
..\..\Downloads\bioformats-cpp-5.1.8-Release-WindowsVC12-x86\include\boost/optional/optional.hpp(870): error C2334: unexpected token(s) preceding ':'; skipping apparent function body


The project configuration
Code: Select all
QT += core
QT -= gui

CONFIG += c++11

TARGET = BioTest
CONFIG += console
CONFIG -= app_bundle

TEMPLATE = app

SOURCES += main.cpp

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../Downloads/bioformats-cpp-5.1.8-Release-WindowsVC12-x86/lib/ -lome-bioformats
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../Downloads/bioformats-cpp-5.1.8-Release-WindowsVC12-x86/lib/ -lome-bioformatsd
else:unix: LIBS += -L$$PWD/../../Downloads/bioformats-cpp-5.1.8-Release-WindowsVC12-x86/lib/ -lome-bioformats

INCLUDEPATH += $$PWD/../../Downloads/bioformats-cpp-5.1.8-Release-WindowsVC12-x86/include
DEPENDPATH += $$PWD/../../Downloads/bioformats-cpp-5.1.8-Release-WindowsVC12-x86/include
Polaris
 
Posts: 7
Joined: Fri Jul 15, 2016 12:14 pm

Re: C++ Header compiler error of ome-bioformat in Qt5.7-VC12

Postby rleigh » Fri Jul 15, 2016 2:22 pm

I see from the paths that you are using bioformats-cpp 5.1.8. You might want to try http://downloads.openmicroscopy.org/ome ... cpp/0.1.1/ instead -- this is the current version after the project was split into separate components, and there will be a 0.2.0 release coming out very soon.

I can't see anything specifically wrong at the lines showing the errors. It's likely in the BOOST_NOEXCEPT_IF and/or BOOST_NOEXCEPT_EXPR macros. I wouldn't expect these to be problematic unless there was something significantly different between the compiler used to compile boost and the one you are using, or if there are #defines set which stop these macros working properly. In the first instance, I'd suggest downloading one of the newer builds for OME Files C++ 0.1.1 and retesting with that. If it's still causing problems, we can look at things in more detail.

Just to double-check, you're definitely using the VC12/Visual Studio 2013 compiler with Qt Creator, and not mingw64-gcc or a different VC version? When you retry with ome-files 0.1.1, please could you paste the full output so we can see the command-line used to invoke the compiler?


Regards,
Roger Leigh
User avatar
rleigh
Team Member
 
Posts: 215
Joined: Tue Mar 13, 2012 11:45 am

Re: C++ Header compiler error of ome-bioformat in Qt5.7-VC12

Postby Polaris » Mon Jul 18, 2016 7:31 am

I try the current version http://downloads.openmicroscopy.org/ome%20...%20cpp/0.1.1/, but same issues appear.

The full output is shown below,
Code: Select all
09:27:36: Running steps for project BioImage...
09:27:36: Configuration unchanged, skipping qmake step.
09:27:36: Starting: "C:\Qt\Qt5.7.0\Tools\QtCreator\bin\jom.exe"
   C:\Qt\Qt5.7.0\Tools\QtCreator\bin\jom.exe -f Makefile.Release
   cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -O2 -MD -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -EHsc -DUNICODE -DWIN32 -DQT_NO_DEBUG -DQT_CORE_LIB -DNDEBUG -I..\BioImage -I. -I..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include -I..\..\..\..\Qt\Qt5.7.0\5.7\msvc2015\include -I..\..\..\..\Qt\Qt5.7.0\5.7\msvc2015\include\QtCore -Irelease -I..\..\..\..\Qt\Qt5.7.0\5.7\msvc2015\mkspecs\win32-msvc2015 -Forelease\ @C:\Users\RDWANG~1\AppData\Local\Temp\main.obj.4864.78.jom
main.cpp
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3590): error C2065: '_Left': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3590): error C2065: '_Right': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3590): error C3861: '_Pred': identifier not found
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3590): error C2126: 'max' cannot be declared with 'constexpr' specifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3590): error C2206: 'max': typedef cannot be used for function definition
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3610): error C2065: '_Left': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3610): error C2065: '_Right': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3610): error C2126: 'max' cannot be declared with 'constexpr' specifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3610): error C2206: 'max': typedef cannot be used for function definition
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3627): error C2065: '_Right': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3627): error C2065: '_Left': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3627): error C3861: '_Pred': identifier not found
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3627): error C2126: 'min' cannot be declared with 'constexpr' specifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3627): error C2206: 'min': typedef cannot be used for function definition
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3647): error C2065: '_Right': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3647): error C2065: '_Left': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3647): error C2126: 'min' cannot be declared with 'constexpr' specifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3647): error C2206: 'min': typedef cannot be used for function definition
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(435): error C2988: unrecognizable template declaration/definition
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(435): error C2059: syntax error: '('
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(435): error C2091: function returns function
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(435): error C2059: syntax error: ')'
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(440): error C2143: syntax error: missing ';' before '}'
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(440): error C2238: unexpected token(s) preceding ';'
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(1355): error C2059: syntax error: '('
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(2373): note: see reference to class template instantiation 'boost::variant<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39>' being compiled
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(1355): error C2091: function returns function
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(1355): error C2059: syntax error: ')'
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(1357): error C2059: syntax error: ')'
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(1355): error C2059: syntax error: '{'
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(1355): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(1753): error C2059: syntax error: '('
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(1753): error C2091: function returns function
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(1753): error C2059: syntax error: ')'
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(1753): error C2059: syntax error: '{'
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(1753): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(2150): error C2059: syntax error: '('
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(2150): error C2091: function returns function
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(2150): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(2150): error C2059: syntax error: ')'
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(2152): error C2059: syntax error: '{'
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/variant/variant.hpp(2152): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/optional/optional.hpp(870): error C2059: syntax error: '('
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/optional/optional.hpp(1173): note: see reference to class template instantiation 'boost::optional<T>' being compiled
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/optional/optional.hpp(870): error C2091: function returns function
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/optional/optional.hpp(870): error C2059: syntax error: ')'
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/optional/optional.hpp(871): error C2059: syntax error: ')'
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/optional/optional.hpp(870): error C2059: syntax error: ':'
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/optional/optional.hpp(870): error C2334: unexpected token(s) preceding ':'; skipping apparent function body
..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost/optional/optional.hpp(106): fatal error C1075: the left brace '{' was unmatched at the end of the file
jom: C:\Users\RDWangJu2\Project\build-BioImage-Desktop_Qt_5_7_0_MSVC2015_32bit-Release\Makefile.Release [release\main.obj] Error 2
jom: C:\Users\RDWangJu2\Project\build-BioImage-Desktop_Qt_5_7_0_MSVC2015_32bit-Release\Makefile [release] Error 2
09:27:38: The process "C:\Qt\Qt5.7.0\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project BioImage (kit: Desktop Qt 5.7.0 MSVC2015 32bit)
When executing step "Make"
09:27:38: Elapsed time: 00:03.
Polaris
 
Posts: 7
Joined: Fri Jul 15, 2016 12:14 pm

Re: C++ Header compiler error of ome-bioformat in Qt5.7-VC12

Postby rleigh » Mon Jul 18, 2016 8:56 am

Ah, there are two paths you need to include:

ome-files-bundle-xxx\include (you have this one already)
ome-files-bundle-xxx\include\boost-1_60 (this one is missing)

When building with CMake, this is automatically detected and done for you. With Qt Creator/qmake, it needs adding by hand. We could certainly look at removing this versioned directory for a subsequent release; we left it for compatibility with upstream, but it's certainly something that would make using it with other build systems a little easier.


Kind regards,
Roger
User avatar
rleigh
Team Member
 
Posts: 215
Joined: Tue Mar 13, 2012 11:45 am

Re: C++ Header compiler error of ome-bioformat in Qt5.7-VC12

Postby Polaris » Mon Jul 18, 2016 9:48 am

I remove the intermediate fold boost-1_60, so it doesn't appear in the previous output.

Just now I try your suggestion, add the path "ome-files-bundle-xxx\include\boost-1_60", but the issue isn't solved.

The full output is
Code: Select all
11:33:56: Running steps for project TestOme...
11:33:56: Configuration unchanged, skipping qmake step.
11:33:56: Starting: "C:\Qt\Qt5.7.0\Tools\QtCreator\bin\jom.exe"
   C:\Qt\Qt5.7.0\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
   cl -c -nologo -Zc:wchar_t -FS -Zc:strictStrings -Zc:throwingNew -Zi -MDd -GR -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -EHsc /Fddebug\TestOme.pdb -DUNICODE -DWIN32 -DQT_QML_DEBUG -DQT_CORE_LIB -I..\TestOme -I. -I..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include -I..\..\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60 -I..\..\..\..\Qt\Qt5.7.0\5.7\msvc2015\include -I..\..\..\..\Qt\Qt5.7.0\5.7\msvc2015\include\QtCore -Idebug -I..\..\..\..\Qt\Qt5.7.0\5.7\msvc2015\mkspecs\win32-msvc2015 -Fodebug\ @C:\Users\RDWANG~1\AppData\Local\Temp\main.obj.2640.78.jom
main.cpp
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3590): error C2065: '_Pred': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3590): error C2065: '_Left': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3590): error C2065: '_Right': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3590): error C2126: 'max' cannot be declared with 'constexpr' specifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3590): error C2206: 'max': typedef cannot be used for function definition
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3610): error C2065: '_Left': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3610): error C2065: '_Right': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3610): error C2126: 'max' cannot be declared with 'constexpr' specifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3610): error C2206: 'max': typedef cannot be used for function definition
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3627): error C2065: '_Pred': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3627): error C2065: '_Right': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3627): error C2065: '_Left': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3627): error C2126: 'min' cannot be declared with 'constexpr' specifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3627): error C2206: 'min': typedef cannot be used for function definition
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3647): error C2065: '_Right': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3647): error C2065: '_Left': undeclared identifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3647): error C2126: 'min' cannot be declared with 'constexpr' specifier
C:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE\algorithm(3647): error C2206: 'min': typedef cannot be used for function definition
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(435): error C2988: unrecognizable template declaration/definition
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(435): error C2059: syntax error: '('
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(435): error C2091: function returns function
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(435): error C2059: syntax error: ')'
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(440): error C2143: syntax error: missing ';' before '}'
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(440): error C2238: unexpected token(s) preceding ';'
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(1355): error C2059: syntax error: '('
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(2373): note: see reference to class template instantiation 'boost::variant<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39>' being compiled
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(1355): error C2091: function returns function
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(1355): error C2059: syntax error: ')'
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(1357): error C2059: syntax error: ')'
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(1355): error C2059: syntax error: '{'
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(1355): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(1753): error C2059: syntax error: '('
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(1753): error C2091: function returns function
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(1753): error C2059: syntax error: ')'
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(1753): error C2059: syntax error: '{'
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(1753): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(2150): error C2059: syntax error: '('
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(2150): error C2091: function returns function
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(2150): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(2150): error C2059: syntax error: ')'
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(2152): error C2059: syntax error: '{'
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/variant/variant.hpp(2152): error C2334: unexpected token(s) preceding '{'; skipping apparent function body
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/optional/optional.hpp(870): error C2059: syntax error: '('
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/optional/optional.hpp(1173): note: see reference to class template instantiation 'boost::optional<T>' being compiled
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/optional/optional.hpp(870): error C2091: function returns function
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/optional/optional.hpp(870): error C2059: syntax error: ')'
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/optional/optional.hpp(871): error C2059: syntax error: ')'
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/optional/optional.hpp(870): error C2059: syntax error: ':'
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/optional/optional.hpp(870): error C2334: unexpected token(s) preceding ':'; skipping apparent function body
C:\Users\RDWangJu2\Downloads\ome-files-bundle-0.1.1-VC12-x86-Release-b6\include\boost-1_60\boost/optional/optional.hpp(106): fatal error C1075: the left brace '{' was unmatched at the end of the file
jom: C:\Users\RDWangJu2\Project\build-TestOme-Desktop_Qt_5_7_0_MSVC2015_32bit-Debug\Makefile.Debug [debug\main.obj] Error 2
jom: C:\Users\RDWangJu2\Project\build-TestOme-Desktop_Qt_5_7_0_MSVC2015_32bit-Debug\Makefile [debug] Error 2
11:33:59: The process "C:\Qt\Qt5.7.0\Tools\QtCreator\bin\jom.exe" exited with code 2.
Error while building/deploying project TestOme (kit: Desktop Qt 5.7.0 MSVC2015 32bit)
When executing step "Make"
11:33:59: Elapsed time: 00:03.


The pro file is
Code: Select all
QT += core
QT -= gui

CONFIG += c++11

TARGET = TestOme
CONFIG += console
CONFIG -= app_bundle

TEMPLATE = app

SOURCES += main.cpp


win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../Downloads/ome-files-bundle-0.1.1-VC12-x86-Release-b6/lib/ -lome-files
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../Downloads/ome-files-bundle-0.1.1-VC12-x86-Release-b6/lib/ -lome-filesd
else:unix: LIBS += -L$$PWD/../../Downloads/ome-files-bundle-0.1.1-VC12-x86-Release-b6/lib/ -lome-files

INCLUDEPATH += $$PWD/../../Downloads/ome-files-bundle-0.1.1-VC12-x86-Release-b6/include
INCLUDEPATH += $$PWD/../../Downloads/ome-files-bundle-0.1.1-VC12-x86-Release-b6/include/boost-1_60

DEPENDPATH += $$PWD/../../Downloads/ome-files-bundle-0.1.1-VC12-x86-Release-b6/include
DEPENDPATH += $$PWD/../../Downloads/ome-files-bundle-0.1.1-VC12-x86-Release-b6/include/boost-1_60
Polaris
 
Posts: 7
Joined: Fri Jul 15, 2016 12:14 pm

Re: C++ Header compiler error of ome-bioformat in Qt5.7-VC12

Postby rleigh » Tue Jul 19, 2016 4:36 pm

Our code is built with these options:

(debug) /DWIN32 /D_WINDOWS /W3 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 /FS
(release) /DWIN32 /D_WINDOWS /W3 /MD /O2 /Ob2 /DNDEBUG /FS

I thought you were doing a release build? /MDd might be the wrong option? And you might want to try adding the other options above which are missing from your compile options.

I hope that's some help,
Roger
User avatar
rleigh
Team Member
 
Posts: 215
Joined: Tue Mar 13, 2012 11:45 am

Re: C++ Header compiler error of ome-bioformat in Qt5.7-VC12

Postby Polaris » Wed Jul 20, 2016 9:13 am

The issue is caused by the VC14 compiler. The VC14 will crash with provided boost library. I change the compiler to VC12 and it works.

Hopefully, your team can provide the library for VC14.
Polaris
 
Posts: 7
Joined: Fri Jul 15, 2016 12:14 pm

Re: C++ Header compiler error of ome-bioformat in Qt5.7-VC12

Postby rleigh » Wed Jul 20, 2016 10:10 am

The upcoming 0.2.0 release will provide VC14 builds. You can of course build your own from source rather than use our binary builds if you would like to do so.

In the meantime, you can download a prerelease build from https://ci.openmicroscopy.org/view/File ... /binaries/ (note--it's 64-bit-only and it's also not an official release). We will be making the real release in the next few days.
User avatar
rleigh
Team Member
 
Posts: 215
Joined: Tue Mar 13, 2012 11:45 am

Next

Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 1 guest