Unmanaged C ++ tlh file not updating?

I have an IDL file with some interfaces.

[
   object,
   uuid(newguid),
   dual,
   helpstring("NewInterface Interface"),
   pointer_default(unique)
]
interface INewInterface: IOldInterface
{
   [id(newid), helpstring("method NewMethod")] HRESULT NewMethod([in] BSTR bstrParam );
}

      

But when I compile my code, it doesn't see my new interface. Also when I open the .tlh file, it didn't update to reflect the new interface.

Any thoughts on what I need to do?

Edit: The import is done via

#import "File.tlb" raw_interfaces_only no_namespace

      

The tlb file doesn't seem to be updating :(

+2


source to share


1 answer


The file .tlh

and .tli

should update when the timestamp .tlb

has changed and you #import

run it. The file .tlb

is the result when the file is compiled .idl

. Therefore you should check

  • if the compilation options for the file .idl

    are correct (depends on the configuration!)
  • if the imported is .tlb

    indeed the same as the one that was compiled (check the include paths) as described in the comments as sharptooth.


Apart from that, manually cleaning / deleting all output files is sometimes meaningful. Although, I must say, a common problem with MS programming chaining using project files is that it recompiles too often and not often enough, so apart from the configuration issues I didn't have the problem you describe.

+2


source







All Articles