Hi.
I'm facing some odd problem with my application. I tried this main.cpp
#if ! defined __cplusplus
# error "Not C++!"
#endif
#include <iostream>
int main()
{
std::cout << "Hello" << std::endl;
return 0;
}
#if ! defined __cplusplus
# error "Not C++!"
#endif
#include <iostream>
int main()
{
std::cout << "Hello" << std::endl;
return 0;
}
To copy to clipboard, switch view to plain text mode
Then I open the Qt for Symbian prompt, run qmake and run make release-gcce. Then compilation stops due to "Not C++!" error message.
I use some libraries which have such checks, I found a workaround by adding DEFINES *= __cplusplus in the project file, then everything compiles correctly (so the C++ compiler is actually used, not the C one). Obviously I'm not quite satisfied with this, that macro should be defined automatically by the compiler.
Any idea what I'm doing wrong?
Bookmarks