Author Topic: My CB doesn't build anymore (wxPdfDocument), too crazy ...  (Read 6431 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5239
My CB doesn't build anymore (wxPdfDocument), too crazy ...
« on: August 15, 2007, 09:56:21 pm »
Where on my linux boxes everything builds fine, my windows laptop (aka the nightly build machine) fails to build, seems rather serious :

Quote
-------------- Build: wxPdfDocument in Exporter ---------------
[  5.6%] Compiling: wxPdfDocument\src\pdfannotation.cpp
C:\Projects\CodeBlocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfannotation.cpp: In constructor `wxPdfLink::wxPdfLink(int)':
C:\Projects\CodeBlocks\src\plugins\contrib\source_exporter\wxPdfDocument\src\pdfannotation.cpp:36: internal compiler error: in rest_of_handle_final, at toplev.c:2067
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.mingw.org/bugs.shtml> for instructions.
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 0 warnings
Build log saved as: C:\Projects\CodeBlocks\src\plugins\contrib\source_exporter\Exporter_build_log.html
 

All ideas are welcome ....

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: My CB doesn't build anymore (wxPdfDocument), too crazy ...
« Reply #1 on: August 15, 2007, 10:15:43 pm »
1. Try another GCC version.
2. Try different compilation flags.
3. Downgrade to a previous version of wxPdfDocument.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9595
Re: My CB doesn't build anymore (wxPdfDocument), too crazy ...
« Reply #2 on: August 15, 2007, 11:15:26 pm »
Where on my linux boxes everything builds fine, my windows laptop (aka the nightly build machine) fails to build, seems rather serious :
Welcome to the club...:
http://forums.codeblocks.org/index.php/topic,6656.msg51511.html#msg51511
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5239
Re: My CB doesn't build anymore (wxPdfDocument), too crazy ...
« Reply #3 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

Online stahta01

  • Lives here!
  • ****
  • Posts: 6940
    • My Best Post
Re: My CB doesn't build anymore (wxPdfDocument), too crazy ...
« Reply #4 on: August 16, 2007, 04:34:58 am »
Was wxPDFDoc just upgraded to 8.0 in the last few days?

Yes, it looks like it was, it has the same problem as wxPropertyGrid had. Working on patch to get it to compile and link.

Tim S
« Last Edit: August 16, 2007, 04:55:41 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: My CB doesn't build anymore (wxPdfDocument), too crazy ...
« Reply #5 on: August 16, 2007, 05:02:44 am »
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

I faced both the errors you reported. :(
Be a part of the solution, not a part of the problem.

Online stahta01

  • Lives here!
  • ****
  • Posts: 6940
    • My Best Post
Re: My CB doesn't build anymore (wxPdfDocument), too crazy ...
« Reply #6 on: August 16, 2007, 05:12:25 am »
Patch to fix issue in windows, you most likely will need to add WXMAKINGLIB_WXPDFDOC to Linux and Mac builds.

Tim S


Code: [Select]
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)" />
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Online stahta01

  • Lives here!
  • ****
  • Posts: 6940
    • My Best Post
Re: My CB doesn't build anymore (wxPdfDocument), too crazy ...
« Reply #7 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.

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
« Last Edit: August 16, 2007, 05:21:34 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9595
Re: My CB doesn't build anymore (wxPdfDocument), too crazy ...
« Reply #8 on: August 16, 2007, 08:11:24 am »
The patch needs tested, I have never used the exporter so I am not a good person to do any testing.
Great one! It compiles again... doing now some testing... Thanks!!!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ