From issue 12909: (rc.exe cannot find generated type library, Visual Studio 10 builder)

I have an IDL file that generates a type library, and an RC file that wants to embed it.

The .tlb is emitted here:

C:\build\easyrtd.vs10\EasyRTD\easyrtd.dir\Debug>dir *.tlb
  Volume in drive C has no label.
  Volume Serial Number is 5AB0-0B44

 Directory of C:\build\easyrtd.vs10\EasyRTD\easyrtd.dir\Debug

23/01/2012 18:52 2,612 EasyRTD.tlb
                1 File(s) 2,612 bytes
                0 Dir(s) 171,651,473,408 bytes free

there is no obvious sign of the rc file (easyrtd.rc) in the working build directory, but if I insert a #error statement I get:

1>C:\src\easyrtd\EasyRTD\easyrtd.src\EasyRTD.rc(21): error RC2188: C:\build\easyrtd.vs10\EasyRTD\EasyRTD.dir\Debug\RCa03492(25) : fatal error RC1116: RC terminating after preprocessor errors
 1>

which suggests that the file was copied over, if temporarily.

Unfortunately I cannot say:

2 TYPELIB "EasyRTD.tlb"

since rc.exe fails to find the file.

I can say:

2 TYPELIB "c:\build\easyrtd.vs10\EasyRTD\easyrtd.dir\Debug\EasyRTD.tlb"

or, I can say:

2 TYPELIB "EasyRTD.tlb"

if I also (don't laugh!) say in CMakeLists.txt:

include_directories(. c:/build/easyrtd.vs10/EasyRTD/easyrtd.dir/Debug)

before the source definition.


This seems to me a fundamental part of COM server development. Is there a sane recipe I can use? (Even something that will get the correct build dir name into the include_directories command? Tho I'm concerned the dependency settings might not be quite right if the RC scanner doesn't treat TYPELIB as a resource search and embedding operation.)

Thanks
James

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to