[Paraview] Symbol WinMain missing when compiling with Visual Studio

Moreland, Kenneth kmorel at sandia.gov
Thu Jun 30 15:10:50 EDT 2016


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<mailto:kmorel at sandia.gov>
**  ***  **  phone: (505) 844-8919
    ***      web:   http://kennethmoreland.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160630/dcb0950a/attachment.html>


More information about the ParaView mailing list