Linker error - unresolved external symbol GetClassInfo
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-04-14
02:57 PM
- last edited on
2023-08-03
05:18 PM
by
Doreena Deng
2009-04-14
02:57 PM
Hi!
I got linker error:
error LNK2001: unresolved external symbol "public: virtual class GS::ClassInfo * __thiscall GS::Object::GetClassInfoW(void)const " (?GetClassInfoW@Object@GS@@UBEPAVClassInfo@2@XZ)
after that as added following code
GS::Array<GS::ArrayFB<GS::UniString, 3>> autotexts;
This is a peace of sample from API Development Kit help
See the "APIAny_GetAutoTextsID" topic
Example:
#include "UniString.hpp"
#include "Array.hpp"
GS::Array<GS::ArrayFB<GS::UniString, 3> > autotexts;
API_AutotextType type = APIAutoText_Fixed;
GSErrCode err = ACAPI_Goodies (APIAny_GetAutoTextsID, &autotexts, (void *) (long) type);
if (err == NoError) {
for (ULong i = 0; i < autotexts.GetSize (); i++) {
DBPrintf ("AutoText[%03d] \"%s\" (\"%s\") = \"%s\"\n", i,
(const char *) autotexts[0].ToCStr (), (const char *) autotexts[1].ToCStr (), (const char *) autotexts[2].ToCStr ());
}
}
Here is list of my libs:
acap_stat.lib
libcmtd.lib
LIBCPMTD.LIB
kernel32.lib
advapi32.lib
user32.lib
GSRootImp.lib
dgimp.lib
InputOutputImp.lib
libxml2.lib
iconv.lib
I tried include others libs that have GetClassInfo symbol, but it did not help.
Hope to your help!
Thanks in advance.
AT
I got linker error:
error LNK2001: unresolved external symbol "public: virtual class GS::ClassInfo * __thiscall GS::Object::GetClassInfoW(void)const " (?GetClassInfoW@Object@GS@@UBEPAVClassInfo@2@XZ)
after that as added following code
GS::Array<GS::ArrayFB<GS::UniString, 3>> autotexts;
This is a peace of sample from API Development Kit help
See the "APIAny_GetAutoTextsID" topic
Example:
#include "UniString.hpp"
#include "Array.hpp"
GS::Array<GS::ArrayFB<GS::UniString, 3> > autotexts;
API_AutotextType type = APIAutoText_Fixed;
GSErrCode err = ACAPI_Goodies (APIAny_GetAutoTextsID, &autotexts, (void *) (long) type);
if (err == NoError) {
for (ULong i = 0; i < autotexts.GetSize (); i++) {
DBPrintf ("AutoText[%03d] \"%s\" (\"%s\") = \"%s\"\n", i,
(const char *) autotexts[0].ToCStr (), (const char *) autotexts[1].ToCStr (), (const char *) autotexts[2].ToCStr ());
}
}
Here is list of my libs:
acap_stat.lib
libcmtd.lib
LIBCPMTD.LIB
kernel32.lib
advapi32.lib
user32.lib
GSRootImp.lib
dgimp.lib
InputOutputImp.lib
libxml2.lib
iconv.lib
I tried include others libs that have GetClassInfo symbol, but it did not help.
Hope to your help!
Thanks in advance.
AT
Labels:
- Labels:
-
Add-On (C++)
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-04-14 06:25 PM
2009-04-14
06:25 PM
Hi,
Just guessing.
I think this is not "library" or linker issue.
It looks like preprocesor substitue GetClassInfo to GetClassInfoW in windows.h
I guess, may be you didnt define WINDOWS directive. Read docs closely.
"Compilation and Linking Issues" subject.
So WINDOWS an ACExtension directives are required.
PS:
And strange, why you have GetClassInfoW but not GetClassInfoA.
It seems you have UNICODE directive defined (Use Unicode character set).
Actually I am not sure - is it correct or wrong.
May be you will need to change it to "Use Multi-Byte Character Set".
May be not...
Oleg
Just guessing.
I think this is not "library" or linker issue.
It looks like preprocesor substitue GetClassInfo to GetClassInfoW in windows.h
I guess, may be you didnt define WINDOWS directive. Read docs closely.
"Compilation and Linking Issues" subject.
So WINDOWS an ACExtension directives are required.
PS:
And strange, why you have GetClassInfoW but not GetClassInfoA.
It seems you have UNICODE directive defined (Use Unicode character set).
Actually I am not sure - is it correct or wrong.
May be you will need to change it to "Use Multi-Byte Character Set".
May be not...

Oleg