Cannot Read Type Library File Error Loading Type Library/dll
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up fatal error C1084: Cannot read type library file: 'Smegui.tlb': Error loading type library/DLL up vote 2 down vote favorite I am trying to build an old version of an application which consists of VC++ projects that were written in Visual Studio 2003. My OS is Windows 7 Enterprise (64-bit). When I try and build the solution I get the following errors: error C4772: #import referenced a type from a missing type library; '__missing_type__' used as a placeholder fatal error C1084: Cannot read type library file: 'Smegui.tlb': Error loading type library/DLL. They both complain about the following import statement: #import "Smegui.tlb" no_implementation This is not a case of the file path being incorrect as renaming the Smegui.tlb file causes the compiler to throw another error saying it cannot find the library. Smegui is from another application that this one depends on. I thought perhaps I was missing a dll but there is no such thing as Smegui.dll. All I know about .tlb files is that they are a type library and you can create them from an assembly using tlbexp.exe or regasm.exe (the later also registers the assembly with COM) There is also an Apache Ant build script which uses a custom task to invoke devenv.com to build the projects. This is the same script that the build server originally used to build the application. It gives me the same errors when I try and run it. The strangest thing a
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Fatal error C1804. cannot read type library file up vote 1 down vote favorite I have a c++ project that is importing two .tlbs http://stackoverflow.com/questions/3050057/fatal-error-c1084-cannot-read-type-library-file-smegui-tlb-error-loading-ty in a header file. #import "..\bin\derived.tlb" named_guids raw_interfaces_only #import "..\bin\base.tlb" named_guids raw_interfaces_only Now derived.tlb is dependent on base.tlb. There are base classes in base.tlb that classes in derived.tlb are based on. When I compile, I get "fatal error c1084: cannot read type library file '..\derived.tlb': Error loading type library/DLL." Now it's complaining about derived.tlb but the problem seems to really be in not being able to find base.tlb. base.tlb comes from a C# Com interop http://stackoverflow.com/questions/22618085/fatal-error-c1804-cannot-read-type-library-file project. If I check the "register for com interop" in the build tab of the c# project, this problem goes away in the c++ project. But I don't want to register it. This gets built on a build machine which shouldn't have anything registered on it. So I create the .tlb with a post build step to tlbexport. The tlb gets created in the correct folder but it appears that without the registration, #import can't find the base.tlb when importing derived.tlb. I see in process monitor, it's trying a hell of a lot of places to find base.tlb but not the correct folder that equates to ..\bin\. What can I do to get it searching in the right place? Adding an entry for it in "Additional Include Directories" in the c++ project doesn't seem to help. c++ visual-studio-2010 type-library tlbimp share|improve this question edited Nov 25 '14 at 17:47 VividD 6,63742674 asked Mar 24 '14 at 18:48 Dan G 195320 Maybe I just need to copy the appropriate tlbs to a directory I'm sure the c++ code will be able to reach it? I can see from proc monitor all the places it's trying. I can just select one of those directories to copy the tlb to with a prebuild step –Dan G Mar 24 '14 at 19:03
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help https://www.experts-exchange.com/questions/23987655/fatal-error-C1084-Cannot-read-type-library-file-Error-loading-type-library-DLL.html Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > fatal error C1084: Cannot read type library file, Error loading type library/DLL. cannot read Want to Advertise Here? Solved fatal error C1084: Cannot read type library file, Error loading type library/DLL. Posted on 2008-12-15 C++ 1 Verified Solution 9 Comments 2,895 Views Last Modified: 2012-06-21 I am developing on Vista and Visual Studion 2008. I have a simple ATL application which imports one COM dll "xyz.dll" #import "C:\abc\xyz\xyz.dll" named_guids cannot read type rename_namespace("UTL") rename("DeleteFile", "XYZDeleteFile") But I get an error : 1>d:\test\temp\temp\stdafx.h(25) : fatal error C1084: Cannot read type library file: 'C:\abc\xyz\xyz.dll': Error loading type library/DLL. I am able to open 'xyz.dll' in OLE Viewer. It opens fine and shows all interfaces and coclasses. 0 Question by:aossdev Facebook Twitter LinkedIn Google Best Solution byaossdev 1. One of the dependecy (*.tlb) for xyz..tlb was registered in Administrator(User) log in. 2. Then xyz.dll was built again in normal user. 3. Now OLEViewer was open in Admin mode and it was able to open Go to Solution 9 Comments LVL 11 Overall: Level 11 C++ 10 Message Expert Comment by:DeepuAbrahamK2008-12-15 check your dll is registered using Regsvr32? 0 LVL 11 Overall: Level 11 C++ 10 Message Expert Comment by:DeepuAbrahamK2008-12-15 Follow this link: http://www.codeguru.com/forum/showthread.php?t=301071 0 Message Author Comment by:aossdev2008-12-15 I had tried registering/build that COM dll. It did not help. I had seen the above link, It did not help. 0 LVL 11 Overall: Level