[Paraview] [vtkusers] release/debug modes in MSVC

Dominik Szczerba dominik at itis.ethz.ch
Wed Nov 5 04:38:28 EST 2008


Thanks a lot!

Dominik

John Biddiscombe wrote:
> Dominik
> 
> To save you some time experimenting if you try it... I always use 
> RelWithDebInfo for my builds on windows and here is my setup. the reason 
> I use it is because we link against a 3rd party library (for a plugin) 
> that was supplied as a Release build. We can't link against debug 
> version of the msvcrt runtime libs for the reasons mentioned by others 
> (heap memory allocation etc). Therefore I build as release libs, but 
> turn on debugging.
> It looks like this, ones to look out for are
> CMAKE_CONFIGURATION_TYPES, CXX_FLAGS_RELWITHDEBINFO and 
> C_FLAGS_RELWITHDEBINFO, LINKER_FLAGS_RELWITHDEBINFO, also note that Qt 
> is still release, and no debug info will be available if you step into 
> Qt code. (Not tried rebuilding Qt as relwithdebinfo too)
> 
> JB
> 
>> Thanks a lot, no I never have on Windows. On linux I used to have 
>> debugging problems with both the optimization AND debugging, with the 
>> stack pointer leading into bushes, so I guess on Windows it will not 
>> be better... will it?
>>
>> Dominik
>>
>> Renato N. Elias wrote:
>>>
>>> How about using a mid term option!? Have you tried the RelWithDebInfo 
>>> project?
>>>
>>> Renato.
>>>
>>> Dominik Szczerba wrote:
>>>> Thanks a lot David for the clarifications,
>>>> Dominik
>>>>
>>>> David Cole wrote:
>>>>> If you want to debug things with the Microsoft compiler on Windows, 
>>>>> you have to build *everything* loaded into the process as a "Debug" 
>>>>> configuration. It is worth the extra time taken to do this. 
>>>>> Otherwise, you will simply have mysteries on your hands and you 
>>>>> will spend countless hours pulling your hair out trying to figure 
>>>>> out why something is crashing when there is clearly nothing wrong 
>>>>> with the source code...
>>>>>
>>>>> Mismatches between Debug and Release are just simply not a good 
>>>>> idea with the Microsoft compiler. (Because the Debug/Release 
>>>>> variants of the runtime libraries have different structures 
>>>>> associated with memory allocations and allocating in one while 
>>>>> deallocating in the other frequently leads to disaster...)
>>>>>
>>>>> HTH,
>>>>> David
>>>>>
>>>>> On Tue, Nov 4, 2008 at 8:33 AM, Dominik Szczerba 
>>>>> <dominik at itis.ethz.ch <mailto:dominik at itis.ethz.ch>> wrote:
>>>>>
>>>>>     Configuring with cmake, is it possible - other than hacking - 
>>>>> to use
>>>>>     Release builds for VTK or PV *and* Debug mode for my own stuff? On
>>>>>     linux I can easily do that (with different CMAKE_BUILD_TYPE's), 
>>>>> but
>>>>>     on Windows it seems in order to debug my own stuff I have to 
>>>>> compile
>>>>>     the whole VTK / PV in debug mode, which I dont need/want - this is
>>>>>     particularly annoying with PV long compilation times. Selecting
>>>>>     'Debug' as the build mode looks for libraries in bin\Debug.
>>>>>     Unfortunately, just copying is not smart enough - I get mysterious
>>>>>     crashes tracing back nowhere.
>>>>>
>>>>>     Thanks for any hints,
>>>>>     Dominik
>>>>>     _______________________________________________
>>>>>     ParaView mailing list
>>>>>     ParaView at paraview.org <mailto:ParaView at paraview.org>
>>>>>     http://www.paraview.org/mailman/listinfo/paraview
>>>>>
>>>>>
>>>> _______________________________________________
>>>> ParaView mailing list
>>>> ParaView at paraview.org
>>>> http://www.paraview.org/mailman/listinfo/paraview
>>>>
>>>
>> _______________________________________________
>> This is the private VTK discussion list.
>> Please keep messages on-topic. Check the FAQ at: 
>> http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 
> -- 
> John Biddiscombe,                            email:biddisco @ cscs.ch
> http://www.cscs.ch/
> CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
> Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82
> 


More information about the ParaView mailing list