[Paraview] Symbol WinMain missing when compiling with Visual Studio

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Thu Jun 30 15:27:19 EDT 2016


Ben, do you have any insight? I remember this was something to do with
CMake and Qt.

FWIW, our dashboards to test with ninja so that's not the issue.

On Thu, Jun 30, 2016 at 3:10 PM, Moreland, Kenneth <kmorel at sandia.gov> wrote:
> I’m trying to build ParaView for the first time in many years on a Windows
> machine with Visual Studio (using the ninja build program), and I am running
> into the following linker error. It appears that the link command for
> paraview.exe is failing because the symbol WinMain is not defined. (I am
> listing the verbose error below at the end if this email for reference.)
>
>
>
> The ParaView GUI should be a “windows” program (vs. a “console” program), so
> defining WinMain sounds like the right thing. But I do not see where WinMain
> is defined in the code. Looking at the paraview_main.cxx source file that is
> generated, sure enough it defines main instead of WinMain. Am I missing
> something when configuring the build?
>
>
>
> -Ken
>
>
>
> [124/124 0.0/sec] Linking CXX executable bin\paraview.exe
>
> FAILED: bin/paraview.exe
>
> cmd.exe /C "cd . && "C:\Program Files (x86)\CMake\bin\cmake.exe" -E
> vs_link_exe --intdir=Applications\ParaView\CMakeFiles\paraview.dir
> --manifests -- C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\link.exe /nologo
> Applications\ParaView\CMakeFiles\paraview.dir\paraview_main.cxx.obj
> Applications\ParaView\CMakeFiles\paraview.dir\Icon.rc.res
> Applications\ParaView\CMakeFiles\paraview.dir\pqparaviewInitializer.cxx.obj
> Applications\ParaView\CMakeFiles\paraview.dir\qrc_paraview_generated.cxx.obj
> Applications\ParaView\CMakeFiles\paraview.dir\qrc_paraview_configuration.cxx.obj
> Applications\ParaView\CMakeFiles\paraview.dir\ParaViewMainWindow.cxx.obj
> Applications\ParaView\CMakeFiles\paraview.dir\moc_ParaViewMainWindow.cxx.obj
> /out:bin\paraview.exe /implib:lib\paraview.lib /pdb:bin\paraview.pdb
> /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:windows
> -LIBPATH:C:\Qt\Qt4.8.6\lib lib\vtkpqApplicationComponents-pv5.1.lib
> lib\vtkParaViewDocumentation.lib lib\vtkUtilitiesPythonInitializer-pv5.1.lib
> lib\vtkpqComponents-pv5.1.lib lib\vtkpqPython-pv5.1.lib
> lib\vtkpqCore-pv5.1.lib lib\vtkPVServerManagerApplication-pv5.1.lib
> lib\vtkpqWidgets-pv5.1.lib lib\QtTesting.lib C:\Qt\Qt4.8.6\lib\QtHelpd4.lib
> C:\Qt\Qt4.8.6\lib\QtCLucened4.lib C:\Qt\Qt4.8.6\lib\QtXmld4.lib
> C:\Qt\Qt4.8.6\lib\QtSqld4.lib lib\vtkPVServerManagerCore-pv5.1.lib
> lib\vtkPVServerImplementationCore-pv5.1.lib lib\protobuf.lib
> lib\vtkPVClientServerCoreCore-pv5.1.lib lib\vtkFiltersProgrammable-pv5.1.lib
> lib\vtkGUISupportQt-pv5.1.lib lib\vtkPVVTKExtensionsCore-pv5.1.lib
> lib\vtkPVCommon-pv5.1.lib lib\vtkClientServer-pv5.1.lib
> lib\vtkPythonInterpreter-pv5.1.lib lib\vtkFiltersParallel-pv5.1.lib
> lib\vtkRenderingOpenGL2-pv5.1.lib lib\vtkParallelCore-pv5.1.lib
> lib\vtkIOLegacy-pv5.1.lib lib\vtkIOXMLParser-pv5.1.lib
> lib\vtkInteractionStyle-pv5.1.lib lib\vtkFiltersExtraction-pv5.1.lib
> lib\vtkFiltersStatistics-pv5.1.lib lib\vtkImagingFourier-pv5.1.lib
> lib\vtkalglib-pv5.1.lib lib\vtkFiltersModeling-pv5.1.lib
> lib\vtkIOCore-pv5.1.lib lib\vtkRenderingCore-pv5.1.lib
> lib\vtkCommonColor-pv5.1.lib lib\vtkFiltersGeometry-pv5.1.lib
> lib\vtkFiltersSources-pv5.1.lib lib\vtkFiltersGeneral-pv5.1.lib
> lib\vtkFiltersCore-pv5.1.lib lib\vtkCommonComputationalGeometry-pv5.1.lib
> lib\vtkImagingCore-pv5.1.lib lib\vtkCommonExecutionModel-pv5.1.lib
> lib\vtkCommonDataModel-pv5.1.lib lib\vtkCommonMisc-pv5.1.lib
> lib\vtkCommonSystem-pv5.1.lib lib\vtkCommonTransforms-pv5.1.lib
> lib\vtkCommonMath-pv5.1.lib C:\Qt\Qt4.8.6\lib\QtGuid4.lib
> C:\Qt\Qt4.8.6\lib\QtNetworkd4.lib C:\Qt\Qt4.8.6\lib\QtCored4.lib
> lib\vtkWrappingPython27Core-pv5.1.lib lib\vtkCommonCore-pv5.1.lib
> lib\vtksys-pv5.1.lib ws2_32.lib Psapi.lib "C:\Program
> Files\tbb44_20160526oss\lib\intel64\vc12\tbb_debug.lib"
> C:\Users\kmorel\AppData\Local\Continuum\Anaconda2\libs\python27.lib
> kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
> oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
>
> MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol WinMain
> referenced in function __tmainCRTStartup
>
>
>
>
>
> bin\paraview.exe : fatal error LNK1120: 1 unresolved externals
>
>
>
>
>
> LINK Pass 1 failed. with 1120
>
>
>
>
>
>
>
>    ****      Kenneth Moreland
>
>     ***      Sandia National Laboratories
> ***********
> *** *** ***  email: kmorel at sandia.gov
>
> **  ***  **  phone: (505) 844-8919
>     ***      web:   http://kennethmoreland.com
>
>
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>


More information about the ParaView mailing list