Skip to main content
Known Participant
July 15, 2009
Question

ATE Namespace

  • July 15, 2009
  • 2 replies
  • 2057 views

I am having the worse time getting my app to compile using the ATE namespace.  I have included all *ATE*.h include files put "using namespace ATE" at the top.  No matter what I do, I get these compile errors:

Tutorial.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall ATE::ITextRanges::~ITextRanges(void)" (??1ITextRanges@ATE@@UAE@XZ) referenced in function "long __cdecl GoFilter(struct AIFilterMessage *)" (?GoFilter@@YAJPAUAIFilterMessage@@@Z)

Tutorial.obj : error LNK2019: unresolved external symbol "public: __thiscall ATE::ITextRanges::ITextRanges(struct ATE::_TextRanges *)" (??0ITextRanges@ATE@@QAE@PAU_TextRanges@1@@Z) referenced in function "long __cdecl GoFilter(struct AIFilterMessage *)"

Surely it cannot be this complicated to use the ATE namespace with AI SDK. . . . or maybe it is??

2 replies

tony_bellAuthor
Known Participant
July 17, 2009

I added IText.cpp into my project and have included every ATE include file I could find.  I am now getting 87 link errors, some listed below.

IText.obj : error LNK2001: unresolved external symbol _sApplicationPaint

IText.obj : error LNK2001: unresolved external symbol _sCompFont

IText.obj : error LNK2019: unresolved external symbol "void __cdecl ATE::Throw_ATE_Exception(enum ATE::ATEErr)" (?Throw_ATE_Exception@ATE@@YAXW4ATEErr@1@@Z) referenced in function "public: __thiscall ATE::ICompFont::ICompFont(class ATE::ITextResources)" (??0ICompFont@ATE@@QAE@VITextResources@1@@Z)

IText.obj : error LNK2001: unresolved external symbol _sCompFontClass

IText.obj : error LNK2001: unresolved external symbol _sCompFontClassSet

Why it this so difficult to get the ATE namespace imported into my project.  I created a simple project with File->New-Project->IllustratorPlugin which gave me my plugin file to start with.  At the top I have the ATE includes and the line "using namespaceATE:'  I just don't get it.

A. Patterson
Inspiring
July 17, 2009

I added IText.cpp into my project and have included every ATE include file I could find.  I am now getting 87 link errors, some listed below.

IText.obj : error LNK2001: unresolved external symbol _sApplicationPaint

IText.obj : error LNK2001: unresolved external symbol _sCompFont

IText.obj : error LNK2001: unresolved external symbol _sCompFontClass

IText.obj : error LNK2001: unresolved external symbol _sCompFontClassSet

There are some macros that you can add to clear this stuff up. Take a look at ATETextSuitesDeclare.h, ATETextSuitesExtern.h, ATETextSuitesImplement.h & ATETextSuitesImportHelper.h. Unfortunately I haven't used these so I don't know -- we alreayd include all the stuff IText uses. Basically, its expecting to use suites that aren't there. You can either add all the ones specified in your link errors to your suite list (as if you were going to use them yourself) or you can attempt to use the macros in the headers I mentioned.

IText.obj : error LNK2019: unresolved external symbol "void __cdecl ATE::Throw_ATE_Exception(enum ATE::ATEErr)" (?Throw_ATE_Exception@ATE@@YAXW4ATEErr@1@@Z) referenced in function "public: __thiscall ATE::ICompFont::ICompFont(class ATE::ITextResources)" (??0ICompFont@ATE@@QAE@VITextResources@1@@Z)

This sounds like you need to add IThrowException.cpp.

Why it this so difficult to get the ATE namespace imported into my project.  I created a simple project with File->New-Project->IllustratorPlugin which gave me my plugin file to start with.  At the top I have the ATE includes and the line "using namespaceATE:'  I just don't get it.

This has nothing to do with the ATE namespace, it has to do with using the IText helper code. If you drop IText completely form your project and talk to the ATE suites yourself directly (adding the suites you use as you would any other AI suite) you won't run into these problems. Frankly though, I find the IText helper objects very helpful so if you're going to be doing much with text I'd reccommend just enduring the pain to get IText up & running. At any rate, I can sympathize, as its definitely a sample project that needs to be added to the SDK.

A. Patterson
Inspiring
July 15, 2009

Those aren't compile errors, those are link errors. It looks like you're missing a .cpp, probably IText.cpp?