In order to test C + + middleware, need to do some public test functions, before testing the C # interface to write a number of common test class, this thought transplanted over the sorta, the results of the middle or some of the problems, debugging for a while, the edge of the internet to solve the problem, the end of the grammar The result is a link error after compilation:
Error LNK2005: "Void __cdecl operator delete (void *)" (?? 3@YAXPAX@X) already defined in Libcpmt.lib (delop.obj)
Long time no VC6, vaguely remember that this error may be because the header file path is not set up, so began my error screening project:
1, first check the Project->settings->c/c++,preprocessor additional Include directories, the result of the specified include path is set.
2, will not be repeatedly linked to the header file. The *.h and *.cpp #include between the test classes are then sorted out sequentially, and the duplicate definition include is removed and consolidated. Clean and then build again, errors still exist.
3, continue to check, the Internet has said, may be some of the basis of the library header file order errors, which mentioned a library name Libcpmt.lib, my heart Suddenly a bright "1." As with the library in the link error, there is a chance. "Modified by someone else's method, 2 static libraries were added to the front of the project->settings->c/c++,general object/library modules: Nafxcw.lib libcpmt.lib. The internet also mentions the need in the input of the Ignore libraries first ignore these 2 libraries, I did not make this change. Compiled, passed out.
Now code compilation has no problem, but the estimated implementation will also appear a lot of conditions, today only completed a Long March road in a step, still need to continue efforts ah.