Ansi-C++-Errors

Marc Michalewicz Marc.Michalewicz at ascom.ch
Thu Dec 9 17:14:00 GMT 1999


Hi, developpers of kdevelop,

i have dared to try to replace some code without really knowing what it
does, but my compiler was very pedantic (though this option was NOT
enabled) so he gave me errors (last mail from me) when compiling lines 77..
of kdlgloader.h. I did not see another possibility as replacing the lines
by lines without using a macro and succeeded:
Maybe now it is more ANSI-compliant and you want to do this also in the
original sources ? I do not want to modify something in the official
sources. One example of the 6 changed lines:

former:
"
  LOAD_LIB_FNC(FNC_KDLGLDR_INIT,              KDlgLdr_Init)
"

-> resulted in the compiler ERROR
"
ANSI C++ forbids cast to non-reference type used as lvalue
"

now (i simply expanded the macro manually):

"
  KDlgLdr_Init = (KDlgLdr * (*)(QWidget *))dlsym(KDlgLdr_Library,
FNC_KDLGLDR_INIT);
"
gives neither an error nor a warning anymore.

Cheers,
Marc






More information about the KDevelop mailing list