Question and Answer Database FAQ3718C.txt Ambiguities with Windows when importing msword8.olb Category : ActiveX/OLE/COM/ActiveForm Platform : Win95/NT Product : C++Builder3.x Question: I imported msword8.olb as described in BCB3-Patch in my project. I just included the the Word_TLB.h into my program.cpp and compiled the project. The compiler gives me a lot of errors: [C++Error] RichEdit.hpp(64): Ambiguity between 'Windows' and 'Word_tlb::Windows'. [C++Error] ComCtrls.hpp(42): Ambiguity between 'Windows' and 'Word_tlb::Windows'. [C++Error] Buttons.hpp(192): Ambiguity between 'Windows' and 'Word_tlb::Windows'. [C++Error] Bde.hpp(3672): Ambiguity between 'Windows' and 'Word_tlb::Windows'. Has anyone an ide on how to solve this problem ??? Answer: It's fairly common that there are name conflicts when importing a type library. For example, some typeLibraries even use identifier names that are reserved keywords in C++. To address this issue we have an undocumented hack: The code generator looks for a file by the name of TLIBIMP.SYM. This file is a text file that simply list a bunch of identifiers that the Code generator should treat as C++ reserved words. It sounds like you'll need to add 'Windows' to this file. Most likely we never encountered the problem because we never mixed WORD_TLB.H and RICHEDIT.HPP. However, you'll find out that there are already a bunch of identifiers in that file and they were the result of importing several well-known typelibraries. Note: This workaround only applies to C++Builder 3 and C++Builder 4 8/26/98 2:26:52 PM
Last Modified: 28-DEC-99