This section describes common errors you may experience when compiling C-language components.
If you are using MS Visual Studio and get the following error when you try to Build/Rebuild the project or link the .DLL file:
LNK2005: _DllMain@12 already defined in MSVCRTD.lib(dllmain.obj)
delete the .cpp file from the project and then add it back to the project.
To delete the file from the project, first open the solution explorer window by going to the menu and clicking on "View", then on "Solution Explorer"). The Solution Explorer window will open on the right-hand side of the MS Visual C IDE window. Click on the .cpp file (for example, MyUDF.cpp) and press the delete key.
To add the file back to the project, go to the menu and click on the menu item "Project" and then "Add Existing Item", and then specify the .cpp file.
Compile/link error "Error LNK2019: unresolved external symbol __imp__xmlFree"
You need to include the library libxml2 in the list of dependencies. See Compiling an RPC Plugin.