"../../UI/Console/ConsoleClose.cpp", line 21.13: CCN5400 (S) "NConsoleClose::HandlerRoutine(int)" has a conflicting declaration.
"../../UI/Console/ConsoleClose.cpp", line 16.18: CCN5424 (I) "HandlerRoutine" is declared on line 16 of "../../UI/Console/ConsoleClose.cpp".
If I remove "static" in line 21, I get :
"../../UI/Console/ConsoleClose.cpp", line 44.25: CCN5216 (S) An expression of type "extern "C" void (*)(int)" cannot be converted to type "void (*)(int)".
"../../UI/Console/ConsoleClose.cpp", line 45.8: CCN5207 (S) No common type found for operands with type "void (*)(int)" and "extern "C" void (*)(int)".
"../../UI/Console/ConsoleClose.cpp", line 47.26: CCN5216 (S) An expression of type "extern "C" void (*)(int)" cannot be converted to type "void (*)(int)".
Regards,
Nenad
Re: "extern "C" void (*)(int)" cannot be converted to type "void (*)(int)"
C language doesn't support namespaces, so extern "C" and namespaces are incompatible. Function defined inside of a namespace cannot be declared as extern "C".
Re: "extern "C" void (*)(int)" cannot be converted to type "void (*)(int)"
Originally Posted by Alex F
C language doesn't support namespaces, so extern "C" and namespaces are incompatible. Function defined inside of a namespace cannot be declared as extern "C".
Hello,
thank you for the reply - this code compiles successfully on cygwin unix emulator. Looks like it's up to compiler (IBM XL C/C++ in my case). What can be done in code to resolve this ?
"../../UI/Console/ConsoleClose.cpp", line 42.33: CCN5256 (S) A parameter of type "extern "C" void (*)(int)" cannot be initialized with an expression of type "void (int)".
"../../UI/Console/ConsoleClose.cpp", line 42.33: CCN6205 (I) The error occurred while converting to parameter 2 of "signal(int, extern "C" void (*)(int))".
"../../UI/Console/ConsoleClose.cpp", line 43.8: CCN5207 (S) No common type found for operands with type "void (*)(int)" and "extern "C" void (*)(int)".
"../../UI/Console/ConsoleClose.cpp", line 45.35: CCN5256 (S) A parameter of type "extern "C" void (*)(int)" cannot be initialized with an expression of type "void (int)".
"../../UI/Console/ConsoleClose.cpp", line 45.35: CCN6205 (I) The error occurred while converting to parameter 2 of "signal(int, extern "C" void (*)(int))".
"../../UI/Console/ConsoleClose.cpp", line 46.8: CCN5207 (S) No common type found for operands with type "void (*)(int)" and "extern "C" void (*)(int)".
"../../UI/Console/ConsoleClose.cpp", line 52.18: CCN5256 (S) A parameter of type "extern "C" void (*)(int)" cannot be initialized with an expression of type "void (*)(int)".
"../../UI/Console/ConsoleClose.cpp", line 52.18: CCN6205 (I) The error occurred while converting to parameter 2 of "signal(int, extern "C" void (*)(int))".
"../../UI/Console/ConsoleClose.cpp", line 53.19: CCN5256 (S) A parameter of type "extern "C" void (*)(int)" cannot be initialized with an expression of type "void (*)(int)".
"../../UI/Console/ConsoleClose.cpp", line 53.19: CCN6205 (I) The error occurred while converting to parameter 2 of "signal(int, extern "C" void (*)(int))".
CCN0793(I) Compilation failed for file ../../UI/Console/ConsoleClose.cpp. Object file not created.
FSUM8226 make: Error code 12
FSUM8226 make: Error code 255
Bookmarks