Author Topic: The 21 May 2007 build is out.  (Read 39936 times)

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: The 21 May 2007 build is out.
« Reply #30 on: May 26, 2007, 02:05:00 pm »
The problem is not that it's about a virtual function but probably because of the size of the arguments (sizeof)...
I don't have the time to look into it atm but check what args these functions take. If the number of args is different between versions or the args themselves are different, then this could be the problem.

Hmm, but wxPieChartPoints and wxBar3DChartPoints are names of classes, not functions. And the problem is not any particular virtual function but virtual table.

I'll try to preprocess the source and see what's generated since some badly named macro could be responsible for this.

Regards
   BYO

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: The 21 May 2007 build is out.
« Reply #31 on: May 31, 2007, 01:20:02 am »
The problem is not that it's about a virtual function but probably because of the size of the arguments (sizeof)...
I don't have the time to look into it atm but check what args these functions take. If the number of args is different between versions or the args themselves are different, then this could be the problem.

Hmm, but wxPieChartPoints and wxBar3DChartPoints are names of classes, not functions. And the problem is not any particular virtual function but virtual table.

I'll try to preprocess the source and see what's generated since some badly named macro could be responsible for this.

Regards
   BYO

Ok, found the reason, it took me almost a week of searching :? The reason: typo in filename used inside #pragma interface directive. I don't know why it triggered now, probably some flag set by wx2.8. Conclusion: do not use #pragma interface / #pragma implementation directives. AFAIK it was needed by GCC 2 so it it really useless now and may cause only problems.

Regards
   BYO

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: The 21 May 2007 build is out.
« Reply #32 on: May 31, 2007, 03:03:32 am »
#pragma interface / #pragma implementation? Really, you shouldn't use those. That's the reason the exporter plugin wasn't loading on Linux (because the PDF library had those).

So, that was the reason wxSmith had problems loading the other shared objects on Linux?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: The 21 May 2007 build is out.
« Reply #33 on: May 31, 2007, 07:57:01 am »
Ok, found the reason, it took me almost a week of searching :? The reason: typo in filename used inside #pragma interface directive.
Right... happened to me, too and took me hours of searching as well! I hate those #pragma stuff. It's just pointless.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline byo

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 837
Re: The 21 May 2007 build is out.
« Reply #34 on: May 31, 2007, 10:08:59 am »
#pragma interface / #pragma implementation? Really, you shouldn't use those. That's the reason the exporter plugin wasn't loading on Linux (because the PDF library had those).

So, that was the reason wxSmith had problems loading the other shared objects on Linux?

Yup, I don't use them in my code. But wxSmithContribItems uses some external sources (like wxChart) still having those #pragmas. Next time I'll just remove them right after adding into plugin ;)

Anyway, it's good to know this kind of problems since it may happen in future.

Regards
  BYO