Are you trying to add some new functionality to WebKit? To be more specific, to WebCore? Moreover, are you adding new files to the project to do your work?

If this is what you are doing, and you are having some problems using the new and delete operator and building under debug mode(in visual studio), you might find your answer to your question here.

So the problem is...(at least my problem was)
The project does not build under debug mode because of compile errors related to the new and delete operator.

If you are keep getting compile error messages like the following on the lines using the new or delete operator...

error C2064: term does not evaluate to a function taking 0 arguments

try including "config.h" in the very first line of the file. i.e. #include "config.h"

So, how did this solution come about??? The project is set to use precompiled headers when Building under debug mode in Visual Studio. The precompiled header file name is set to be WebCorePrefix.h. In WebCorePrefix.h you can see something like this...

#ifdef __cplusplus

#define new ("if you use new/delete make sure to include config.h at the top of the file"())

#define delete ("if you use new/delete make sure to include config.h at the top of the file"())

#endif

Honestly, I'm not sure what those lines mean... I mean, the words inside the parenthesis are definitely not comments... I'm not a real hard core programmer and I'm not used to using preprocessors intensively. However, those two lines gave me the clue... I just followed the instructions...

I added #include "config.h" to the files that I just added which has the new and delete operators and problem solved !!!

Thank God... I'm able to code again... this problem has been keeping me crazy for the past week...



Posted by Dansoonie