C/C++ problem.
-
I have head file and cpp file are written in C++. There is a GetItem() in it. I used it in a C file to create a lib file. The compile is fine. Then I use this lib file in a C++ application and got a Link2001 link error which says "unresolved external symbol _GetItem". Anyone knows how to fix this problem? Thanks. mIchAel Liu __________________________________________________________ The secret of business is to know something that nobody else knows. ;)
-
I have head file and cpp file are written in C++. There is a GetItem() in it. I used it in a C file to create a lib file. The compile is fine. Then I use this lib file in a C++ application and got a Link2001 link error which says "unresolved external symbol _GetItem". Anyone knows how to fix this problem? Thanks. mIchAel Liu __________________________________________________________ The secret of business is to know something that nobody else knows. ;)
You need to reference the library where the _GetItem function is implemented.
-
I have head file and cpp file are written in C++. There is a GetItem() in it. I used it in a C file to create a lib file. The compile is fine. Then I use this lib file in a C++ application and got a Link2001 link error which says "unresolved external symbol _GetItem". Anyone knows how to fix this problem? Thanks. mIchAel Liu __________________________________________________________ The secret of business is to know something that nobody else knows. ;)
-
I have head file and cpp file are written in C++. There is a GetItem() in it. I used it in a C file to create a lib file. The compile is fine. Then I use this lib file in a C++ application and got a Link2001 link error which says "unresolved external symbol _GetItem". Anyone knows how to fix this problem? Thanks. mIchAel Liu __________________________________________________________ The secret of business is to know something that nobody else knows. ;)
Also, if the GetItem implementation is in a C file do not forget the extern "C" stuff:
extern "C"
{
#include "Header_in_C_That_Contains_GetItem.h"
}Best regards, Alexandru Savescu