views:

76

answers:

1

In my main project directory, there is a .TLB file. It has old information in it, and it is compiled into the binary -- which I can tell from looking at the compiled binary in a hex editor.

What's weird is that I updated my .IDL in the main VC++ directory and that's compiled into a .TLB in the project build directory (\Debug), but it's not included into the binary.

I resolved the problem by copying \Debug\Project.TLB into the main directory, but why is the newly compiled .TLB not automatically used for the binary?

+1  A: 

The TLB is included via the resource script, so if the .rc file points to the TLB in the main project dir, that's the one that will be used.

Was this project upgraded from an older version of Visual Studio? I seem to recall they changed the default output location at some point.

What you should do is go into the .rc file and adjust the path so it points to the actual output location. It can get a little tricky with separating Debug/Release configurations, though...

Another idea is to change MIDL's output to place the TLB in the main project dir, so that the .rc path points to the right thing.

Kim Gräsman
Good thought, that was the problem -- indeed it was upgraded from a previous version of VS.
known