[CMake] Visual Studio 2008 and IDL issues

Julian Lim jlim at tradebotsystems.com
Mon Oct 11 14:18:13 EDT 2010


Hi,

 

We are working on Visual Studio 2008 COM project which has IDL files and
need MIDL to generate the .TLB and header and source files, and we faced
with 2 issues.   We made changes from the attached patch and the diff to
2.8.2 cmLocalVisualStudio7Generator.cxx and finally it works.  

 

The purpose of this email is, see whether there is a better solution or
share what we have done with the community.

 

1.       Looking at 2.8.2 code, the "cm2.8.0 patch" (attached) hasn't
been applied.  After we manually apply it, we faced with issue #2.

 

http://www.vtk.org/Bug/view.php?id=8165
<http://www.vtk.org/Bug/view.php?id=8165> 

 

1>------ Build started: Project: vbabc, Configuration: Release Win32
------

1>Creating Type Library...

1>midl : command line warning MIDL1009 : unknown argument ignored
"..\..\..\..\source\libvbabc\vbabc.idl"

1>Processing Release\""

1>Release""

1>c1 : fatal error C1083: Cannot open source file: 'Release""': Invalid
argument

1>midl : command line error MIDL1003 : error returned by the C
preprocessor (2)

1>Build log was saved at "
file://c:\source\build\msvc\vc\libvbabc\vbabc.dir\Release\BuildLog.htm
<file:///c:\source\build\msvc\vc\libvbabc\vbabc.dir\Release\BuildLog.htm
> "

1>vbabc - 2 error(s), 1 warning(s)

========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped
==========

 

2.       After issue #1 resolved, we could finally MIDL tools ran
against IDL files.  There were 2 issues we face when issue #1 is
resolved.  

a.       The .TLB files are generated inside build directory (example,
vbabc.dir/Release) but Visual Studio is still looking for it in the
CMAKE Source directory.  Yes, we do want these files to be generated in
vbabc.dir/Release which is the object directory because this will enable
us to build from multiple processes and do not interfere with each
build.

b.      The generated headers is not in any Include path that when our
source include it an error occurs.

 

-Julian Lim

Tradebot Systems

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101011/3983bf2d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmLocalVisualStudio7Generator.cxx.2.8.0.patch
Type: application/octet-stream
Size: 2128 bytes
Desc: cmLocalVisualStudio7Generator.cxx.2.8.0.patch
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101011/3983bf2d/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cmake_2_8_2_diff.txt
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101011/3983bf2d/attachment.txt>


More information about the CMake mailing list