EsoErik

Sunday, July 1, 2012

 

Intel Compiler Linker Errors with /Qprof-gen and Qt on Windows

Google yielded no helpful results for this problem.  Some experimentation yielded a workaround; hopefully others encountering the same issue will find this post and save themselves some time!

On Visual Studio 2010 SP1, building a Qt project using Intel Compiler XE 12.1 (provided by Intel Composer XE 2011 Update 9) with full optimizations and /Qprof-gen (Phase 1: Instrument for Opimization) enabled fails with the following linker errors:

NewCustomPuzzleDialog.obj : error LNK2001: unresolved external symbol "const QSpacerItem::`vftable'" (??_7QSpacerItem@@6B@)
NewRandPuzzleDialog.obj : error LNK2001: unresolved external symbol "const QSpacerItem::`vftable'" (??_7QSpacerItem@@6B@)
NewCustomPuzzleDialog.obj : error LNK2001: unresolved external symbol "const QLayoutItem::`vftable'" (??_7QLayoutItem@@6B@)
NewRandPuzzleDialog.obj : error LNK2001: unresolved external symbol "const QLayoutItem::`vftable'" (??_7QLayoutItem@@6B@)

The workaround I found is to set /Ob0 (disable inline function expansion).  This is only necessary for the instrumentation/data collection phase - /Ob2 (inline all suitable functions) may be used when building with /Qprof-use (optimize with profile data).
Comments:

Post a Comment

Subscribe to Post Comments [Atom]





<< Home

Archives

July 2009   August 2009   September 2009   October 2009   November 2009   December 2009   January 2010   September 2010   December 2010   January 2011   February 2011   April 2011   June 2011   August 2011   February 2012   June 2012   July 2012   August 2012   October 2012   November 2012   January 2014   April 2014   June 2014   August 2014   September 2014   October 2014   January 2015   March 2015   April 2015   June 2015   November 2015   December 2015   January 2016   June 2016   August 2016   January 2017   March 2017   April 2018   April 2019   June 2019   January 2020  

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]