Menu

Can't compile using Qt Creator IDE on W...

Help
brassmann
2010-09-15
2013-04-24
  • brassmann

    brassmann - 2010-09-15

    Hi!

    I'm trying to compile qvision.0.5.0 as described in the manual but I get lots of build errors (most of them in qvmath) in Qt Creator. qmake output seems to ok.

    My config.pri looks like this (I'd like to use qvision for image processing with opencv):

    #
    #    Copyright (C) 2007, 2008, 2009, 2010. PARP Research Group.
    #    <http://perception.inf.um.es>
    #    University of Murcia, Spain.
    #
    #    This file is part of the QVision library.
    #
    #    QVision is free software: you can redistribute it and/or modify
    #    it under the terms of the GNU Lesser General Public License as
    #    published by the Free Software Foundation, version 3 of the License.
    #
    #    QVision is distributed in the hope that it will be useful,
    #    but WITHOUT ANY WARRANTY; without even the implied warranty of
    #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    #    GNU Lesser General Public License for more details.
    #
    #    You should have received a copy of the GNU Lesser General Public
    #    License along with QVision. If not, see <http://www.gnu.org/licenses/>.
    #
    ################################
    #
    #    File config.pri.example
    #
    #    Rename this file to "config.pri". Modify the following lines following the
    #    instructions in the comments to configure the library for your system.
    #    Finally use the 'qmake' tool from the Qt library to create the 'Makefile'
    #    to compile the library.
    #
    #    Note: insert/delete the '#' symbol at the beggining of each line to
    #    comment/uncomment it.
    #
    ##################### Basic configuration ################################################
    ######## Install directory ##########
    #    Directory where QVision will be installed. Set it to the route where you
    #    want to install QVision's library binary, include and documentation files.
    #    It can be in your home directory, or anywhere in the system.
    #    Make sure to compile the library to a directory where you have write
    #    permissions.
    #
    INSTALL_PATH=D:\Programme\QVision
    ######## Compilation mode ##########
    #    Uncomment this line if you want to de-activate Qt's assert checking and
    #    debug information printing.
    #
    #CONFIG += release
    ######## Debug printing ##########
    #    Uncomment this line if you want to de-activate debug information printing.
    #
    DEFINES += QT_NO_DEBUG_OUTPUT
    ##################### Interoperability with other libraries ###############################
    ############ GSL ############
    #    GSL is optional. Notice that some of the mathematical functionallity contained
    #    in the qvmath module will not be included in the QVision if the GSL is not present.
    #       The GSL library includes a Blas implementation which will be used by the QVision to
    #       speed up matrix and vector operations.
    CONFIG += qvgsl
    # Specify GSL install path for the Windows version of the GSL library, which can be found at:
    #
    #   http://gnuwin32.sourceforge.net/packages/gsl.htm
    #
    # Uncomment this line only when compiling for Windows.
    #
    GSL_PATH=D:\Programme\GnuWin32
    ######## Intel's IPP ########
    #    Uncomment this line to enable compatibility with Intel's IPP library.
    #    Also the wrapper functions for the IPP will be included in the QVision.
    #CONFIG += qvipp
    #    The variable IPP_PATH should contain the IPP library installation path, up
    #    to the version number of the IPP library version.
    #
    #IPP_PATH=/opt/intel/ipp/5.3/ia32/
    ######## MPlayer ######
    #    Uncomment this line to enable MPlayer compatibility. This add MPlayer related
    #    functionallity in the QVision, that uses the MPlayer as a back-end application
    #    to read from a wide set of video sources.
    #    The MPlayer requires the IPP library compatibility enabled.
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvmplayer
    #    The varible MPLAYER_BINARY_PATH should contain the full path to the mplayer
    #    binary file in the system.
    #
    #MPLAYER_BINARY_PATH=/usr/bin/mplayer
    ######## QWT ##########
    #    Uncomment this line to enable QWT compatibility.
    #    Also, it adds several widgets based on the QWT, the Designer amongst them.
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvqwt
    #    The variable QWT_INCLUDE must contain the path to the include files for QWT
    #    the library. The variable QWT_LIB_BINARY must be set to the path to the    QWT
    #    library binary file (generally named 'lib<qwt and version identifier>.so').
    #
    #QWT_INCLUDE=/usr/include/qwt-qt4/
    #QWT_LIB_BINARY=/usr/lib/libqwt-qt4.so
    ######## OpenCV compatibility #######
    #    Uncomment this line to enable OpenCV compatibility.
    CONFIG += qvopencv
    #    Uncomment the following lines if you want to manually provide the installation
    #    path for the OpenCV library. Set the content of the following variables with
    #    the path to the library binary, and the include files of the OpenCV library.
    #    If these lines are commented, the QVision will try to configure the OpenCV
    #    through the 'pkg-config' application.
    #
    QVOPENCV_LIB_PATH=D:\Programme\OpenCV2.1\lib
    QVOPENCV_INCLUDE_PATH=D:\Programme\OpenCV2.1\include\opencv
    ######## Octave lib ##########
    #    Uncomment this line to enable Octave lib compatibility.
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvoctave
    #    Path to the octave library binary
    #OCTAVELIB_PATH = /usr/lib/octave-3.0.1
    ######## CGAL compatibility #########
    #    Uncomment this line to enable CGAL compatibility.
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvcgal
    ######## LAPACK linear algebra package ########
    #    Uncomment this line to enable compatibility with LAPACK linear algebra package.
    #       This enables the matrix algebra functionallity for the QVision.
    #       NOTE: this option is only available for Linux.
    #CONFIG += qvlapack
    #    Uncomment JUST ONE of the following lines, in order to determine the LAPACK
    #       implementation to use (LAPACK_VERSION = STATIC-ATLAS-SSE recommended):
    #LAPACK_VERSION = DYNAMIC
    #LAPACK_VERSION = STATIC-ATLAS-BASE
    #LAPACK_VERSION = STATIC-ATLAS-SSE
    #LAPACK_VERSION = STATIC-ATLAS-SSE2
    ######## Intel's MKL ########
    #    Uncomment this line to enable compatibility with Intel's MKL library.
    #       The MKL library includes a BLAS implementation which will be used by the QVision to
    #       speed up matrix and vector operations. It also includes a LAPACK implementation, which
    #       enables the matrix algebra functionallity for the QVision.
    #    NOTE: enabling the MKL compatibility overrides any other LAPACK / ATLAS compatibility.
    #CONFIG += qvmkl
    #    The variable MKL_PATH should contain the MKL installation path, up
    #    to the version number of the MKL library version.
    #    The variable MKL_PATH_LIB should contain the MKL library installation path, up
    #    to the place where the correct library files (32 or 64 bits) are located.
    #
    #MKL_PATH=/opt/intel/mkl/10.0.1.014/
    #MKL_PATH_LIB=/opt/intel/mkl/10.0.1.014/lib/32/
    ######## Intel C++ Compiler #########
    #    Uncomment this line to compile using the Intel C++ Compiler
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvicc
    ######## CUDA #########
    #    Uncomment this line to enable CUDA compatibility. Actually this is an
    #    experimental feature, not fully operational.
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvcuda
    #    Path to CUDA and to CUDA SDK (this last one to use cutil library).
    #
    #CUDA_DIR = $$system(which nvcc | sed 's,/bin/nvcc$,,')
    #CUDA_UTIL_DIR=/usr/local/NVIDIA_CUDA_SDK
    

    Here's a snapshot of Qt Creator right after build:

    Any ideas?

     
  • alrl1

    alrl1 - 2010-09-19

    We could not reproduce the compilation errors you get.
    Still, we have lately fixed other bugs in the QVision, that might be related to your compilation errors.

    If you want to try the lattest version of the QVision you can get it from the SVN repository:

    https://qvision.svn.sourceforge.net/svnroot/qvision

    You can use the tortoise SVN client for Windows to donwload it:
    http://en.wikipedia.org/wiki/TortoiseSVN

    We successfully compiled this version with the Qt Creator 2.0.0 on a Windows XP, using the following versions of the GSL and the OpenCV:

    GSL for Windows:
    http://sourceforge.net/projects/gnuwin32/files/gsl/1.8/gsl-1.8.exe/download

    OpenCV 2.1:
    http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.1/OpenCV-2.1.0-win32-vs2008.exe/download

    The following is the config.pri file used in the compilation. Hope this works for you:

    #
    #    Copyright (C) 2007, 2008, 2009, 2010. PARP Research Group.
    #    &lt;<a href="http://perception.inf.um.es&amp;gt">http://perception.inf.um.es&gt;</a>;
    #    University of Murcia, Spain.
    #
    #    This file is part of the QVision library.
    #
    #    QVision is free software: you can redistribute it and/or modify
    #    it under the terms of the GNU Lesser General Public License as
    #    published by the Free Software Foundation, version 3 of the License.
    #
    #    QVision is distributed in the hope that it will be useful,
    #    but WITHOUT ANY WARRANTY; without even the implied warranty of
    #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    #    GNU Lesser General Public License for more details.
    #
    #    You should have received a copy of the GNU Lesser General Public
    #    License along with QVision. If not, see &lt;<a href="http://www.gnu.org/licenses/&amp;gt">http://www.gnu.org/licenses/&gt;</a>;.
    #
    ################################
    #
    #    File config.pri.example
    #
    #    Rename this file to "config.pri". Modify the following lines following the
    #    instructions in the comments to configure the library for your system.
    #    Finally use the 'qmake' tool from the Qt library to create the 'Makefile'
    #    to compile the library.
    #
    #    Note: insert/delete the '#' symbol at the beggining of each line to
    #    comment/uncomment it.
    #
    ##################### Basic configuration ################################################
    ######## Install directory ##########
    #    Directory where QVision will be installed. Set it to the route where you
    #    want to install QVision's library binary, include and documentation files.
    #    It can be in your home directory, or anywhere in the system.
    #    Make sure to compile the library to a directory where you have write
    #    permissions.
    #
    INSTALL_PATH=D:\Programme\QVision
    ######## Compilation mode ##########
    #    Uncomment this line if you want to de-activate Qt's assert checking and
    #    debug information printing.
    #
    #CONFIG += release
    ######## Debug printing ##########
    #    Uncomment this line if you want to de-activate debug information printing.
    #
    DEFINES += QT_NO_DEBUG_OUTPUT
    ##################### Interoperability with other libraries ###############################
    ############ GSL ############
    #    GSL is optional. Notice that some of the mathematical functionallity contained
    #    in the qvmath module will not be included in the QVision if the GSL is not present.
    #       The GSL library includes a Blas implementation which will be used by the QVision to
    #       speed up matrix and vector operations.
    CONFIG += qvgsl
    # Specify GSL install path for the Windows version of the GSL library, which can be found at:
    #
    #   <a href="http://gnuwin32.sourceforge.net/packages/gsl.htm">http://gnuwin32.sourceforge.net/packages/gsl.htm</a>
    #
    # Uncomment this line only when compiling for Windows.
    #
    GSL_PATH=D:\GnuWin32
    ######## Intel's IPP ########
    #    Uncomment this line to enable compatibility with Intel's IPP library.
    #    Also the wrapper functions for the IPP will be included in the QVision.
    #CONFIG += qvipp
    #    The variable IPP_PATH should contain the IPP library installation path, up
    #    to the version number of the IPP library version.
    #
    #IPP_PATH=/opt/intel/ipp/5.3/ia32/
    ######## MPlayer ######
    #    Uncomment this line to enable MPlayer compatibility. This add MPlayer related
    #    functionallity in the QVision, that uses the MPlayer as a back-end application
    #    to read from a wide set of video sources.
    #    The MPlayer requires the IPP library compatibility enabled.
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvmplayer
    #    The varible MPLAYER_BINARY_PATH should contain the full path to the mplayer
    #    binary file in the system.
    #
    #MPLAYER_BINARY_PATH=/usr/bin/mplayer
    ######## QWT ##########
    #    Uncomment this line to enable QWT compatibility.
    #    Also, it adds several widgets based on the QWT, the Designer amongst them.
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvqwt
    #    The variable QWT_INCLUDE must contain the path to the include files for QWT
    #    the library. The variable QWT_LIB_BINARY must be set to the path to the    QWT
    #    library binary file (generally named 'lib&lt;qwt and version identifier&gt;.so').
    #
    #QWT_INCLUDE=/usr/include/qwt-qt4/
    #QWT_LIB_BINARY=/usr/lib/libqwt-qt4.so
    ######## OpenCV compatibility #######
    #    Uncomment this line to enable OpenCV compatibility.
    CONFIG += qvopencv
    #    Uncomment the following lines if you want to manually provide the installation
    #    path for the OpenCV library. Set the content of the following variable with
    #    the path to the OpenCV library.
    #    If this line is leaved commented, the QVision will try to automatically configure
    #    the OpenCV through the 'pkg-config' application (Linux only).
    #
    OPENCV_PATH=D:\OpenCV2.1
    # Depending on your operative system, maybe you should uncomment one of the following
    # lines:
    OPENCV_VERSION_PREFIX=210    # Windows, OpenCV version 2.1
    #OPENCV_VERSION_PREFIX=200    # Windows, OpenCV version 2.0
    #OPENCV_VERSION_PREFIX=       # Linux.
    ######## Octave lib ##########
    #    Uncomment this line to enable Octave lib compatibility.
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvoctave
    #    Path to the octave library binary
    #OCTAVELIB_PATH = /usr/lib/octave-3.0.1
    ######## CGAL compatibility #########
    #    Uncomment this line to enable CGAL compatibility.
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvcgal
    ######## LAPACK linear algebra package ########
    #    Uncomment this line to enable compatibility with LAPACK linear algebra package.
    #       This enables the matrix algebra functionallity for the QVision.
    #       NOTE: this option is only available for Linux.
    #CONFIG += qvlapack
    #    Uncomment JUST ONE of the following lines, in order to determine the LAPACK
    #       implementation to use (LAPACK_VERSION = STATIC-ATLAS-SSE recommended):
    #LAPACK_VERSION = DYNAMIC
    #LAPACK_VERSION = STATIC-ATLAS-BASE
    #LAPACK_VERSION = STATIC-ATLAS-SSE
    #LAPACK_VERSION = STATIC-ATLAS-SSE2
    ######## Intel's MKL ########
    #    Uncomment this line to enable compatibility with Intel's MKL library.
    #       The MKL library includes a BLAS implementation which will be used by the QVision to
    #       speed up matrix and vector operations. It also includes a LAPACK implementation, which
    #       enables the matrix algebra functionallity for the QVision.
    #    NOTE: enabling the MKL compatibility overrides any other LAPACK / ATLAS compatibility.
    #CONFIG += qvmkl
    #    The variable MKL_PATH should contain the MKL installation path, up
    #    to the version number of the MKL library version.
    #    The variable MKL_PATH_LIB should contain the MKL library installation path, up
    #    to the place where the correct library files (32 or 64 bits) are located.
    #
    #MKL_PATH=/opt/intel/mkl/10.0.1.014/
    #MKL_PATH_LIB=/opt/intel/mkl/10.0.1.014/lib/32/
    ######## Intel C++ Compiler #########
    #    Uncomment this line to compile using the Intel C++ Compiler
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvicc
    ######## CUDA #########
    #    Uncomment this line to enable CUDA compatibility. Actually this is an
    #    experimental feature, not fully operational.
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvcuda
    #    Path to CUDA and to CUDA SDK (this last one to use cutil library).
    #
    #CUDA_DIR = $$system(which nvcc | sed 's,/bin/nvcc$,,')
    #CUDA_UTIL_DIR=/usr/local/NVIDIA_CUDA_SDK
    
     
  • brassmann

    brassmann - 2010-09-21

    Hi!

    First of all: Thanks for your quick reply!

    As I'm using Win 7 at the moment, I set up a Virtual PC with Win XP with the versions of GSL, OpenCV and Qt Creator you mentioned. I tried your config.pri (just changed the paths to "C:\Programme\…") and the one that comes with version 0.5.0. What I now get is this (both with 0.5.0 and the latest version I downloaded via TortoiseSVN):

     
  • alrl1

    alrl1 - 2010-09-25

    We are sorry, but we could not reproduce this error yet. Still, we did not tried to compile QVision on a Virtual PC with Windows XP, on top of a Windows 7. Perhaps the error occurs under those circunstances.

    If we find and fix the problem in the future we will update this thread with the solution.

    Sorry, and thanks for the feedback about the compilation error.

     
  • alrl1

    alrl1 - 2010-11-02

    I believe we have solved the problem.

    The latest version from the repository, and further releases of the QVision (no less than future version 0.5.2) should be free from this compilation error.

    Make sure to disable the _shadow build _option from the Qt Creator to compile the QVision, or the library binaries will not be where they are supossed to be:

     
  • Fabian Wanner

    Fabian Wanner - 2011-06-21

    Hi,

    I am experiencing a similar problem, when trying to install qvision.0.6.0. I disabled shadow build, as was suggested in the previous post. Has this resolved the problem? Or have you solved it another way?

    I am using Qt 4.6.3 on Qt Creator 2.2.1, but on Qt Creator 1.0.0 the same thing is happening.

    Furthermore, I would like to change the compiler to Visual C++ Compiler 10.0 (x86), which is in the list of auto-detected compilers, but I cannot select it in the set of different tool chains. Do you know how to change that?

    Here is a part of the error list.

    Running build steps for project qvision…
    Starting: "c:\qt\4.6.3\bin\qmake.exe" C:\Users\localadmin\Documents\UCL\Project\VSLibs\QVision\qvision.0.6.0\qvision.pro -r -spec win32-msvc2008
    Project MESSAGE: Included module: qvcgal
    Project MESSAGE: Included module: qvgsl
    Project MESSAGE: No MKL or LAPACK present, will link with gslcblas
    Project MESSAGE: Included module: qvmath
    Project MESSAGE: Included module: qvip
    Project MESSAGE: Included module: qvopencv
    Project MESSAGE: * Path to OpenCV binaries:
    Project MESSAGE: * Path to OpenCV include files:
    Project MESSAGE: Included module: qvblockprogramming
    Project MESSAGE: -----------------
    Project MESSAGE: Install path set to: C:\Qt\QVision
    Project MESSAGE: Included module: qvcgal
    Project MESSAGE: Included module: qvgsl
    Project MESSAGE: No MKL or LAPACK present, will link with gslcblas
    Project MESSAGE: Included module: qvmath
    Project MESSAGE: Included module: qvip
    Project MESSAGE: Included module: qvopencv
    Project MESSAGE: * Path to OpenCV binaries:
    Project MESSAGE: * Path to OpenCV include files:
    Project MESSAGE: Included module: qvblockprogramming
    Project MESSAGE: -----------------
    Project MESSAGE: Install path set to: C:\Qt\QVision
    Project MESSAGE: Included module: qvcgal
    Project MESSAGE: Included module: qvgsl
    Project MESSAGE: No MKL or LAPACK present, will link with gslcblas
    Project MESSAGE: Included module: qvmath
    Project MESSAGE: Included module: qvip
    Project MESSAGE: Included module: qvopencv
    Project MESSAGE: * Path to OpenCV binaries:
    Project MESSAGE: * Path to OpenCV include files:
    Project MESSAGE: Included module: qvblockprogramming
    Project MESSAGE: -----------------
    Project MESSAGE: Install path set to: C:\Qt\QVision
    The process "c:\qt\4.6.3\bin\qmake.exe" exited normally.
    Starting: "C:\Qt\qtcreator-2.2.1\bin\jom.exe"
    C:\Qt\qtcreator-2.2.1\bin\jom.exe -nologo -j 8 -f Makefile.Release
    cl -c -nologo -Zm200 -Zc:wchar_t- -MD -O3 -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG_OUTPUT -DQVCGAL -DGSL_AVAILABLE -DBLAS_AVAILABLE -DQVMATRIXALGEBRA_AVAILABLE -DOPENCV -DQVOPENCV -DQT_DLL -DQT_NO_DEBUG -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"c:\Qt\4.6.3\include\QtCore" -I"c:\Qt\4.6.3\include\QtGui" -I"c:\Qt\4.6.3\include\QtOpenGL" -I"c:\Qt\4.6.3\include\QtXml" -I"c:\Qt\4.6.3\include" -I"src" -I"src" -I"src" -I"c:\Program Files\GnuWin32\include" -I"src" -I"src" -I"src" -I"c:\ProgramFiles\OpenCV2.1\include" -I"src" -I"c:\Qt\4.6.3\include\ActiveQt" -I"build\moc" -I"src\ui" -I"c:\Qt\4.6.3\mkspecs\win32-msvc2008" -Fobuild\obj\ @C:\Users\LOCALA~1\AppData\Local\Temp\getCameraFocals.obj.7148.265.jom
    getCameraFocals.cpp

    jom 1.0.5 - empower your cores

    cl : Command line warning D9002 : ignoring unknown option '-O3'
    src\qvmath/qvsparseblockmatrix.h(225) : error C2146: syntax error : missing ')' before identifier 'or'
    src\qvmath/qvsparseblockmatrix.h(225) : error C2059: syntax error : ')'
    src\qvmath/qvsparseblockmatrix.h(226) : error C2143: syntax error : missing ';' before '{'
    src\qvmath/qvsparseblockmatrix.h(225) : error C3861: 'or': identifier not found
    src\qvmath/qvsparseblockmatrix.h(290) : error C2146: syntax error : missing ')' before identifier 'or'
    src\qvmath/qvsparseblockmatrix.h(290) : error C2065: 'or' : undeclared identifier
    src\qvmath/qvsparseblockmatrix.h(290) : error C2146: syntax error : missing ';' before identifier 'majorRow'
    src\qvmath/qvsparseblockmatrix.h(290) : error C2146: syntax error : missing ';' before identifier 'or'
    src\qvmath/qvsparseblockmatrix.h(290) : warning C4552: '>=' : operator has no effect; expected operator with side-effect
    src\qvmath/qvsparseblockmatrix.h(290) : error C2065: 'or' : undeclared identifier
    src\qvmath/qvsparseblockmatrix.h(290) : error C2146: syntax error : missing ';' before identifier 'majorCol'
    src\qvmath/qvsparseblockmatrix.h(290) : error C2146: syntax error : missing ';' before identifier 'or'
    src\qvmath/qvsparseblockmatrix.h(290) : warning C4552: '<' : operator has no effect; expected operator with side-effect
    src\qvmath/qvsparseblockmatrix.h(290) : error C2065: 'or' : undeclared identifier
    src\qvmath/qvsparseblockmatrix.h(290) : error C2146: syntax error : missing ';' before identifier 'majorCol'
    src\qvmath/qvsparseblockmatrix.h(290) : error C2059: syntax error : ')'
    src\qvmath/qvsparseblockmatrix.h(291) : error C2143: syntax error : missing ';' before '{'
    src\qvmath/qvsparseblockmatrix.h(291) : warning C4552: '>=' : operator has no effect; expected operator with side-effect
    src\qvmath/qvsparseblockmatrix.h(298) : error C2146: syntax error : missing ')' before identifier 'or'
    src\qvmath/qvsparseblockmatrix.h(298) : error C2065: 'or' : undeclared identifier
    src\qvmath/qvsparseblockmatrix.h(298) : error C2146: syntax error : missing ';' before identifier 'minorCols'
    src\qvmath/qvsparseblockmatrix.h(298) : error C2059: syntax error : ')'
    src\qvmath/qvsparseblockmatrix.h(299) : error C2143: syntax error : missing ';' before '{'
    src\qvmath/qvsparseblockmatrix.h(299) : warning C4552: '!=' : operator has no effect; expected operator with side-effect
    src\qvmath/qveuclideanmapping3.h(123) : error C2146: syntax error : missing ')' before identifier 'and'
    src\qvmath/qveuclideanmapping3.h(123) : error C2059: syntax error : ')'
    src\qvmath/qveuclideanmapping3.h(130) : error C2146: syntax error : missing ')' before identifier 'or'
    src\qvmath/qveuclideanmapping3.h(130) : error C2059: syntax error : ')'
    src\qvmath\getCameraFocals.cpp(425) : warning C4804: '>' : unsafe use of type 'bool' in operation
    src\qvmath\getCameraFocals.cpp(449) : error C2143: syntax error : missing ')' before '{'
    src\qvmath\getCameraFocals.cpp(449) : error C2059: syntax error : ')'
    src\qvmath\getCameraFocals.cpp(449) : error C2143: syntax error : missing ';' before '{'
    src\qvmath\getCameraFocals.cpp(449) : error C2143: syntax error : missing ';' before '}'
    src\qvmath\getCameraFocals.cpp(449) : error C2059: syntax error : ')'
    src\qvmath\getCameraFocals.cpp(450) : error C2143: syntax error : missing ')' before '{'
    src\qvmath\getCameraFocals.cpp(450) : error C2059: syntax error : ')'
    src\qvmath\getCameraFocals.cpp(450) : error C2143: syntax error : missing ';' before '{'
    src\qvmath\getCameraFocals.cpp(450) : error C2143: syntax error : missing ';' before '}'
    src\qvmath\getCameraFocals.cpp(450) : error C2059: syntax error : ')'
    src\qvmath\getCameraFocals.cpp(452) : error C2065: 'coeffsMatrix' : undeclared identifier
    src\qvmath\getCameraFocals.cpp(452) : error C2065: 'objectivesVector' : undeclared identifier
    src\qvmath\getCameraFocals.cpp(455) : error C2065: 'coeffsMatrix' : undeclared identifier
    src\qvmath\getCameraFocals.cpp(455) : error C2065: 'objectivesVector' : undeclared identifier
    src\qvmath\getCameraFocals.cpp(455) : error C2228: left of '.norm2' must have class/struct/union
    src\qvmath\getCameraFocals.cpp(465) : error C2146: syntax error : missing ')' before identifier 'or'
    src\qvmath\getCameraFocals.cpp(465) : error C3861: 'isnan': identifier not found
    src\qvmath\getCameraFocals.cpp(465) : error C2059: syntax error : ')'
    src\qvmath\getCameraFocals.cpp(466) : error C2143: syntax error : missing ';' before '{'
    src\qvmath\getCameraFocals.cpp(545) : error C2065: 'not' : undeclared identifier
    src\qvmath\getCameraFocals.cpp(545) : error C2146: syntax error : missing ')' before identifier 'directCamerasFocalsCalibration'
    src\qvmath\getCameraFocals.cpp(545) : error C2059: syntax error : ')'
    src\qvmath\getCameraFocals.cpp(546) : error C2143: syntax error : missing ';' before '{'
    qvrationalnumber.cpp
    src\qvmath\qvrationalnumber.cpp(77) : error C2668: 'pow' : ambiguous call to overloaded function
            c:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(575): could be 'long double pow(long double,int)'
            c:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(527): or       'float pow(float,int)'
            c:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(489): or       'double pow(double,int)'
            while trying to match the argument list '(int, const int)'
    src\qvmath\qvrationalnumber.cpp(83) : error C2668: 'sqrt' : ambiguous call to overloaded function
            c:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(581): could be 'long double sqrt(long double)'
            c:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(533): or       'float sqrt(float)'
            c:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\math.h(128): or       'double sqrt(double)'
            while trying to match the argument list '(const int)'
    Generating Code…
    cl -c -nologo -Zm200 -Zc:wchar_t- -MD -O3 -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG_OUTPUT -DQVCGAL -DGSL_AVAILABLE -DBLAS_AVAILABLE -DQVMATRIXALGEBRA_AVAILABLE -DOPENCV -DQVOPENCV -DQT_DLL -DQT_NO_DEBUG -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"c:\Qt\4.6.3\include\QtCore" -I"c:\Qt\4.6.3\include\QtGui" -I"c:\Qt\4.6.3\include\QtOpenGL" -I"c:\Qt\4.6.3\include\QtXml" -I"c:\Qt\4.6.3\include" -I"src" -I"src" -I"src" -I"c:\Program Files\GnuWin32\include" -I"src" -I"src" -I"src" -I"c:\ProgramFiles\OpenCV2.1\include" -I"src" -I"c:\Qt\4.6.3\include\ActiveQt" -I"build\moc" -I"src\ui" -I"c:\Qt\4.6.3\mkspecs\win32-msvc2008" -Fobuild\obj\ @C:\Users\LOCALA~1\AppData\Local\Temp\qvmatrix.obj.7148.296.jom

    Thank you very much
    Fabian

     
  • alrl1

    alrl1 - 2011-06-22

    Hi:

    Yes, we reproduced the problem and we fixed it, amongst other things, by disabling 'shadow build'.

    About the compilation error you are getting: there seems to be a problem with the c++ 'or' operator with the version (or configuration) of the Qt Designer you are using. This is very strange, and should not happen with a standard c++ compiler.

    We will try to reproduce your error with the versions of Qt and Qt Designer you are using, to see if we can fix it anyway.

    About your problem configuring Visual C++ Compiler 10.0 (x86) on Qt Creator: we cannot solve your problem. Please contact Qt Creator developers for that question.

    Regards.

     
  • reavesdc

    reavesdc - 2011-07-21

    Hi,

    I have the similar errors as herculis above, using the latest version from the SVN trunk.
    I am using Qt Creator 4.7.3, and tried compiling with minGW and VS2008, all with shadow build disabled.
    I am interested in using QVision on both Windows and Red Hat (64-bit is important).
    My config file:
    ######## Install directory ##########
    #    Directory where QVision will be installed. Set it to the route where you
    #    want to install QVision's library binary, include and documentation files.
    #    It can be in your home directory, or anywhere in the system.
    #    Make sure to compile the library to a directory where you have write
    #    permissions.
    #
    INSTALL_PATH=E:/Development/QVision_Install

    Compiler output:
    The process "C:\QtSDK\QtCreator\bin\jom.exe" exited normally.
    Configuration unchanged, skipping qmake step.
    Starting: "C:\QtSDK\QtCreator\bin\jom.exe"
    C:\QtSDK\QtCreator\bin\jom.exe -nologo -j 12 -f Makefile.Debug
    c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\bin\uic.exe src\ui\qvprocessingblockformsmall.ui -o src\ui\ui_qvprocessingblockformsmall.h
    c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\bin\uic.exe src\ui\qvvideoreaderblockwidget.ui -o src\ui\ui_qvvideoreaderblockwidget.h
    c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\bin\uic.exe src\ui\qvvideoreaderblockwidgetsmall.ui -o src\ui\ui_qvvideoreaderblockwidgetsmall.h
    cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_MIN_VERSION_4_0 -DQT_MIN_VERSION_4_1 -DQT_MIN_VERSION_4_2 -DQT_MIN_VERSION_4_3 -DQT_MIN_VERSION_4_4 -DQT_MIN_VERSION_4_5 -DQT_MIN_VERSION_4_6 -DQT_MIN_VERSION_4_7 -DDEBUG -DQVSFM -DQVGEA_AVAILABLE -DQT_DLL -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\include\QtOpenGL" -I"c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\include\QtXml" -I"c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\include" -I"src" -I"src" -I"src" -I"src" -I"src" -I"c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\include\ActiveQt" -I"build\moc" -I"src\ui" -I"c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\mkspecs\win32-msvc2008" -Fobuild\obj\ @C:\Users\reavesdc\AppData\Local\Temp\qvmath.obj.1032.125.jom
    qvmath.cpp

    jom 1.0.3 - empower your cores

    src\ui\qvvideoreaderblockwidget.ui: Warning: Z-order assignment: '' is not a valid widget.
    qvdisjointset.cpp
    cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_MIN_VERSION_4_0 -DQT_MIN_VERSION_4_1 -DQT_MIN_VERSION_4_2 -DQT_MIN_VERSION_4_3 -DQT_MIN_VERSION_4_4 -DQT_MIN_VERSION_4_5 -DQT_MIN_VERSION_4_6 -DQT_MIN_VERSION_4_7 -DDEBUG -DQVSFM -DQVGEA_AVAILABLE -DQT_DLL -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\include\QtOpenGL" -I"c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\include\QtXml" -I"c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\include" -I"src" -I"src" -I"src" -I"src" -I"src" -I"c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\include\ActiveQt" -I"build\moc" -I"src\ui" -I"c:\QtSDK\Desktop\Qt\4.7.3\msvc2008_64\mkspecs\win32-msvc2008" -Fobuild\obj\ @C:\Users\reavesdc\AppData\Local\Temp\qvip.obj.1032.312.jom
    qvip.cpp
    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(225) : error C2146: syntax error : missing ')' before identifier 'or'
    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(225) : error C2059: syntax error : ')'
    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(226) : error C2143: syntax error : missing ';' before '{'
    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(225) : error C3861: 'or': identifier not found
    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(290) : error C2146: syntax error : missing ')' before identifier 'or'
    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(290) : error C2065: 'or' : undeclared identifier
    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(290) : error C2146: syntax error : missing ';' before identifier 'majorRow'
    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(290) : error C2146: syntax error : missing ';' before identifier 'or'
    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(290) : warning C4552: '>=' : operator has no effect; expected operator with side-effect
    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(290) : error C2065: 'or' : undeclared identifier
    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(290) : error C2146: syntax error : missing ';' before identifier 'majorCol'
    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(290) : error C2146: syntax error : missing ';' before identifier 'or'
    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(290) : warning C4552: '<' : operator has no effect; expected operator with side-effect
    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(290) : error C2065: 'or' : undeclared identifier
    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(290) : error C2146: syntax error : missing ';' before identifier 'majorCol'
    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(290) : error C2059: syntax error : ')'
    ect.

    Thanks in advance for your help.  The project really looks interesting.

    DCR

    ######## Compilation mode ##########
    #    Uncomment this line if you want to significantly speed up QVision applications by
    #    de-activating Qt's assert checking and debug information printing.
    #
    #CONFIG += release

    ######## Debug printing ##########
    #    Comment this line if you want to enable debug information printing.
    #
    #DEFINES += QT_NO_DEBUG_OUTPUT

    ##################### Interoperability with other libraries ###############################

    ############ GSL ############
    #    GSL is optional. Notice that some of the mathematical functionallity contained
    #    in the qvmath module will not be included in the QVision if the GSL is not present.
    #       The GSL library includes a Blas implementation which will be used by the QVision to
    #       speed up matrix and vector operations.
    #CONFIG += qvgsl

    # Specify GSL install path for the Windows version of the GSL library, which can be found at:
    #
    #   <a href="http://gnuwin32.sourceforge.net/packages/gsl.htm">http://gnuwin32.sourceforge.net/packages/gsl.htm</a>
    #
    # Uncomment this line only when compiling for Windows.
    #
    GSL_PATH=C:/GnuWin32

    ######## MPlayer ######
    #    Uncomment this line to enable MPlayer compatibility. This add MPlayer related
    #    functionallity in the QVision, that uses the MPlayer as a back-end application
    #    to read from a wide set of video sources.
    #    The MPlayer requires the IPP library compatibility enabled.
    #       NOTE: Unfortunately QVision cannot use the MPlayer for video input on Windows
    # due to some portability problems found with certain Linux functionality.
    #CONFIG += qvmplayer

    #    The varible MPLAYER_BINARY_PATH should contain the full path to the mplayer
    #    binary file in the system.
    #
    #MPLAYER_BINARY_PATH=/usr/bin/mplayer

    ######## QWT ##########
    #    Uncomment this line to enable QWT compatibility.
    #    Also, it adds several widgets based on the QWT, the Designer amongst them.
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvqwt

    #    The variable QWT_INCLUDE must contain the path to the include files for QWT
    #    the library. The variable QWT_LIB_BINARY must be set to the path to the    QWT
    #    library binary file (generally named 'lib&lt;qwt and version identifier&gt;.so').
    #
    #QWT_INCLUDE=/usr/include/qwt-qt4/
    #QWT_LIB_BINARY=/usr/lib/libqwt-qt4.so

    ######## OpenCV compatibility #######
    #    Uncomment this line to enable OpenCV compatibility.
    #CONFIG += qvopencv

    #    Uncomment the following lines if you want to manually provide the installation
    #    path for the OpenCV library. Set the content of the following variable with
    #    the path to the OpenCV library.
    #    If this line is leaved commented, the QVision will try to automatically configure
    #    the OpenCV through the 'pkg-config' application (Linux only).
    #
    #OPENCV_PATH=D:\OpenCV2.1

    # Depending on your operative system, maybe you should uncomment one of the following
    # lines:
    #OPENCV_VERSION_PREFIX=210    # Windows, OpenCV version 2.1
    #OPENCV_VERSION_PREFIX=200    # Windows, OpenCV version 2.0
    #OPENCV_VERSION_PREFIX=       # Linux.

    ######## Octave lib ##########
    #    Uncomment this line to enable Octave lib compatibility.
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvoctave

    #    Path to the octave library binary
    #OCTAVELIB_PATH = /usr/lib/octave-3.0.1

    ######## CGAL compatibility #########
    #    Uncomment this line to enable CGAL compatibility.
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvcgal

    ######## LAPACK linear algebra package ########
    #    Uncomment this line to enable compatibility with LAPACK linear algebra package.
    #       This enables the matrix algebra functionallity for the QVision.
    #       NOTE: this option is only available for Linux.
    #CONFIG += qvlapack

    #    Uncomment one of the following line. Uncomment DYNAMIC if you want to compile against the
    #    dynamic version of LAPACK. If you want to compile against the ATLAS implementations of
    #    BLAS/LAPACK, you should uncomment STATIC-ATLAS:
    #LAPACK_VERSION = DYNAMIC
    #LAPACK_VERSION = STATIC-ATLAS

    # Specify in this variable the absolute path to the binary file 'libatlas.a'.
    # (Only in case of compiling against the ATLAS library):
    #ATLAS_LIBRARY_PATH = /usr/lib/

    ######## Intel Composer ################
    # Uncomment this line if you have installed 'composer' in your system.
    # This will automatically link to the IPP and the MKL libraries if they are
    # included in the Composer installation.
    #
    # The Composer can include the IPP and/or MKL libraries. Thus this option is not
    # compatible with 'qvipp' and 'qvmkl' options below. You should include the IPP
    # or MKL libraries either from the 'composer', or from a standalone installation.
    #CONFIG += qvcomposer

    # Uncomment the following line to link against the 64 bits library binaries.
    # If commented, the QVision will link against the 32 bits library binaries of the
    # Intel Composer (IPP and MKL libraries also).
    #CONFIG += arch64

    # Specify in the following variable the install path of the 'composer' package.
    #
    #COMPOSER_PATH=/opt/c_studio/composerxe

    ######## Intel's IPP ########
    #    Uncomment this line to enable standalone compatibility with Intel's IPP library.
    #    Also the wrapper functions for the IPP will be included in the QVision.
    #CONFIG += qvipp

    #    The variable IPP_PATH should contain the IPP library installation path, up
    #    to the version number of the IPP library version.
    #
    #IPP_PATH=/opt/intel/ipp/5.3/ia32/

    ######## Intel's MKL ########
    #    Uncomment this line to enable standalone compatibility with Intel's MKL library.
    #       The MKL library includes a BLAS implementation which will be used by the QVision to
    #       speed up matrix and vector operations. It also includes a LAPACK implementation, which
    #       enables the matrix algebra functionallity for the QVision.
    #    NOTE: enabling the MKL compatibility overrides any other LAPACK / ATLAS compatibility.
    #CONFIG += qvmkl

    #    The variable MKL_PATH should contain the MKL installation path, up
    #    to the version number of the MKL library version.
    #    The variable MKL_LIB_PATH should contain the MKL library installation path, up
    #    to the place where the correct library files (32 or 64 bits) are located.
    #
    #MKL_PATH=/opt/intel/mkl/10.0.1.014/
    #MKL_LIB_PATH=/opt/intel/mkl/10.0.1.014/lib/32/

    ######## Intel C++ Compiler #########
    #    Uncomment this line to compile using the Intel C++ Compiler
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvicc

    ######## ROS ###################
    # Uncomment this line to enable compatibility with the ROS libraries:
    # ROS (Robot Operating System) provides libraries and tools to help
    # software developers create robot applications. It provides hardware
    # abstraction, device drivers, libraries, visualizers, message-passing,
    # package management, and more.
    # QVision was tested with the cturtle distribution of ROS.
    #
    #CONFIG += qvros

    # Specify the path to the ROS library.
    #ROS_PATH = /opt/ros/cturtle

    ######## CHOLMOD ##########
    #    Uncomment this line to enable compatibility with the CHOLMOD library.
    # CHOLMOD is a set of ANSI C routines for sparse Cholesky factorization
    # and update/downdate:
    # http://www.cise.ufl.edu/research/sparse/cholmod/
    #
    #    Note: ROS incorporates its own distribution of CHOLMOD. If ROS compatibility is enabled,
    #          QVision will automatically use it, so it is not necessary to uncomment this line.
    #CONFIG += qvcholmod

    # Path to the CHOLMOD library.
    #CHOLMOD_PATH=/opt/ros/cturtle/stacks/vslam/suitesparse

    ######## CUDA Toolkit ##########
    #    Uncomment the following line to enable compatibility with the CUDA Toolkit.
    #    You can download version 3.2 of the toolkit here:
    #       http://developer.nvidia.com/object/cuda_3_2_downloads.html
    #CONFIG += qvcudatoolkit

    # Instalation path for the CUDA Toolkit.
    CUDA_TOOLKIT_PATH=C:/CUDA

    ######## CUDA #########
    #    Uncomment this line to enable CUDA compatibility. Actually this is an
    #    experimental feature, not fully operational.
    #       NOTE: this compatibility is only available for Linux.
    #CONFIG += qvcuda

    #    Path to CUDA and to CUDA SDK (this last one to use cutil library).
    #
    #CUDA_DIR = $$system(which nvcc | sed 's,/bin/nvcc$,,')
    #CUDA_UTIL_DIR=/usr/local/NVIDIA_CUDA_SDK

     
  • alrl1

    alrl1 - 2011-07-22

    Hello:

    It seems that the MS compiler does not accept alternative tokens 'or', 'and' and 'not' for the C++ operators '||', '&&', and '!'.

    I have eliminated these operators from the file 'qvsparseblockmatrix.h'. Please, update the QVision with the most recent version from the svn repository, then try to check whether the compilation still fails at the file 'qvsparseblockmatrix.h' or not.

     
  • alrl1

    alrl1 - 2011-07-23

    This way, I can look for a solution to the problem. I've already tested the compilation on a 64 bits version of Windows, and that does not seems to be the problem.

     
  • alrl1

    alrl1 - 2011-10-10

    Hi:

    The error corresponding to the following output messages:

    E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(225) : error C2146: syntax error : missing ')' before identifier 'or' E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(225) : error C2059: syntax error : ')' E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(226) : error C2143: syntax error : missing ';' before '{' E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(225) : error C3861: 'or': identifier not found E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(290) : error C2146: syntax error : missing ')' before identifier 'or' E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(290) : error C2065: 'or' : undeclared identifier E:\Development\qvision\trunk\src\qvmath/qvsparseblockmatrix.h(290) : error C2146: syntax error : missing ';' before identifier 'majorRow'
    

    seems to be due to a problem with the MS Visual compiler. We have developed a possible solution for this problem and uploaded it to the svn repository. If the bug persists please post in this thread your compilation error messages.

     

Log in to post a comment.