User forums > Help

My CB doesn't build anymore (wxPdfDocument), too crazy ...

<< < (2/2)

Biplab:

--- Quote from: killerbot on August 15, 2007, 11:53:06 pm ---I tried to build with the latest MinGW (4.2.1, the dw2 version) [man things slow down because of all those warnings ....] and pdfannotation.cpp builds, but now there's an error on pdfcolor.cpp (line 28) [I think I have had this in the past also, but then a rebuild fixed it, or maybe deleting pch's dunno anymore, but this time I started from a clean state]

So this is now the error :


--- Quote ---C:\CodeBlocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfcolor.cpp:28: error: definition of static data member 'wxPdfColour::ms_colorDatabase' of dllimport'd class
--- End quote ---

--- End quote ---

I faced both the errors you reported. :(

stahta01:
Patch to fix issue in windows, you most likely will need to add WXMAKINGLIB_WXPDFDOC to Linux and Mac builds.

Tim S



--- Code: ---Index: src/plugins/contrib/source_exporter/wxPdfDocument/include/wx/pdfdocdef.h
===================================================================
--- src/plugins/contrib/source_exporter/wxPdfDocument/include/wx/pdfdocdef.h (revision 4397)
+++ src/plugins/contrib/source_exporter/wxPdfDocument/include/wx/pdfdocdef.h (working copy)
@@ -863,7 +863,9 @@
 #ifndef _PDFDOC_DEF_H_
 #define _PDFDOC_DEF_H_
 
-#ifdef WXMAKINGDLL_WXPDFDOC
+#ifdef WXMAKINGLIB_WXPDFDOC
+    #define WXDLLIMPEXP_PDFDOC
+#elif WXMAKINGDLL_WXPDFDOC
     #define WXDLLIMPEXP_PDFDOC WXEXPORT
 #elif defined(WXUSINGDLL)
     #define WXDLLIMPEXP_PDFDOC WXIMPORT
Index: src/plugins/contrib/source_exporter/Exporter.cbp
===================================================================
--- src/plugins/contrib/source_exporter/Exporter.cbp (revision 4397)
+++ src/plugins/contrib/source_exporter/Exporter.cbp (working copy)
@@ -56,6 +56,7 @@
  <Add option="-DcbDEBUG" />
  <Add option="-DTIXML_USE_STL" />
  <Add option="-DwxUSE_UNICODE" />
+ <Add option="-DWXMAKINGLIB_WXPDFDOC" />
  <Add directory="$(#WX.include)" />
  <Add directory="$(#WX.lib)/gcc_dll$(WX_CFG)/msw$(WX_SUFFIX)" />
  <Add directory="$(#CB.include)" />

--- End code ---

stahta01:
The patch needs tested, I have never used the exporter so I am not a good person to do any testing.

After testing the patch to wxPdfDocument's pdfdocdef.h needs submitted upstream.

CB Goal is to use wxPdfDocument as Static Library inside an CB Plugin DLL.
Problem is that CB defines WXUSINGDLL.
Solution add WXMAKINGLIB_WXPDFDOC define to select Static Library build.

Tim S

MortenMacFly:

--- Quote from: stahta01 on August 16, 2007, 05:17:52 am ---The patch needs tested, I have never used the exporter so I am not a good person to do any testing.

--- End quote ---
Great one! It compiles again... doing now some testing... Thanks!!!

Navigation

[0] Message Index

[*] Previous page

Go to full version