Bug #1646

PdfDraw linking issue (undefined reference to INITIALIZER)

Added by Zbigniew Rebacz about 7 years ago. Updated about 7 years ago.

Status:ApprovedStart date:02/19/2017
Priority:UrgentDue date:
Assignee:Zbigniew Rebacz% Done:

0%

Category:DrawSpent time:-
Target version:Release 2017.2

Description

Please see my discussion with BioByte in following forum thread: http://www.ultimatepp.org/forums/index.php?t=msg&goto=47636&#msg_47636

What should we do to fix compilation is remove following piece fo code from PdfDraw/PdfDraw.h (line 10):

INITIALIZE(PdfDraw);

Why we can do that? We don't have implementation of this initializer via INITIALIZER method.

In addition we should remove PdfInit.cpp file from PdfDraw package - it contains only header inclusion - so it is not need any more.

History

#1 Updated by Zbigniew Rebacz about 7 years ago

  • Subject changed from PdfDraw compilation issue to PdfDraw linking issue (undefined reference to INITIALIZER)

#2 Updated by Zbigniew Rebacz about 7 years ago

  • Target version changed from Release 2018.1 to Release 2017.2

#3 Updated by Miroslav Fidler about 7 years ago

I do not see anything wrong. INITIALIZER is in PdfReport.cpp and is really needed there. PdfInit.icpp is there to maintain backward .icpp compatibility.

My guess is that the original issue is caused by including PdfDraw.h without having PdfDraw package in the project.

#4 Updated by Miroslav Fidler about 7 years ago

  • Assignee changed from Miroslav Fidler to Zbigniew Rebacz

#5 Updated by Miroslav Fidler about 7 years ago

  • Assignee changed from Zbigniew Rebacz to Miroslav Fidler

The real problem is in RepGen. RepGen.cpp includes PdfDraw.h, but RepGen does not have it in uses.

Now things become quite tricky: PdfDraw is in workspace because it is conditionally used by CtrlLib - but the condition is that target is LINUX. This is because in Linux, we are using PdfDraw for printing (as Linux printing system accepts Pdf as input). In Win32, it is not included because it is not required (printing is done some other way, through GDI).

Therefore it compiles in Linux but not in Win32.

So the correct fix is to add PdfDraw to uses of RepGen. Done and commited.

#6 Updated by Miroslav Fidler about 7 years ago

  • Status changed from Patch ready to Ready for QA
  • Assignee changed from Miroslav Fidler to Zbigniew Rebacz

#7 Updated by Zbigniew Rebacz about 7 years ago

  • Status changed from Ready for QA to Approved

Also available in: Atom PDF