<br><font size=2 face="Verdana">Hi all,</font>
<br>
<br><font size=2 face="Verdana">I'm trying to build a simple project with
Visual Studio Team System 2008. The project has one dll and one exe.</font>
<br><font size=2 face="Verdana">On Linux the project compiles well. On
Windows I get this output:</font>
<br>
<br><font size=2 face="Verdana">C:\Jos\pd-3.1\test\build>devenv test.sln
/rebuild</font>
<br>
<br><font size=2 face="Verdana">Microsoft (R) Visual Studio Version 9.0.21022.8.</font>
<br><font size=2 face="Verdana">Copyright (C) Microsoft Corp. All rights
reserved.</font>
<br><font size=2 face="Verdana">------ Rebuild All started: Project: ZERO_CHECK,
Configuration: Debug Win32 ----</font>
<br><font size=2 face="Verdana">--</font>
<br><font size=2 face="Verdana">Deleting intermediate and output files
for project 'ZERO_CHECK', configuration '</font>
<br><font size=2 face="Verdana">Debug|Win32'</font>
<br><font size=2 face="Verdana">Checking Build System</font>
<br><font size=2 face="Verdana">CMake does not need to re-run because CMakeFiles/generate.stamp
is up-to-date.</font>
<br><font size=2 face="Verdana">CMake does not need to re-run because lib/CMakeFiles/generate.stamp
is up-to-dat</font>
<br><font size=2 face="Verdana">e.</font>
<br><font size=2 face="Verdana">CMake does not need to re-run because exe/CMakeFiles/generate.stamp
is up-to-dat</font>
<br><font size=2 face="Verdana">e.</font>
<br><font size=2 face="Verdana">Build log was saved at "file://c:\Jos\pd-3.1\test\build\ZERO_CHECK.dir\Debug\Bui</font>
<br><font size=2 face="Verdana">ldLog.htm"</font>
<br><font size=2 face="Verdana">ZERO_CHECK - 0 error(s), 0 warning(s)</font>
<br><font size=2 face="Verdana">------ Rebuild All started: Project: mylib,
Configuration: Debug Win32 ------</font>
<br><font size=2 face="Verdana">Deleting intermediate and output files
for project 'mylib', configuration 'Debug</font>
<br><font size=2 face="Verdana">|Win32'</font>
<br><font size=2 face="Verdana">Building Custom Rule C:/Jos/pd-3.1/test/lib/CMakeLists.txt</font>
<br><font size=2 face="Verdana">CMake does not need to re-run because CMakeFiles/generate.stamp
is up-to-date.</font>
<br><font size=2 face="Verdana">Compiling...</font>
<br><font size=2 face="Verdana">mylib.cpp</font>
<br><font size=2 face="Verdana">Compiling manifest to resources...</font>
<br><font size=2 face="Verdana">Microsoft (R) Windows (R) Resource Compiler
Version 6.0.5724.0</font>
<br><font size=2 face="Verdana">Copyright (C) Microsoft Corporation. All
rights reserved.</font>
<br><font size=2 face="Verdana">Linking...</font>
<br><font size=2 face="Verdana">Embedding manifest...</font>
<br><font size=2 face="Verdana">Microsoft (R) Windows (R) Resource Compiler
Version 6.0.5724.0</font>
<br><font size=2 face="Verdana">Copyright (C) Microsoft Corporation. All
rights reserved.</font>
<br><font size=2 face="Verdana">Build log was saved at "file://c:\Jos\pd-3.1\test\build\lib\mylib.dir\Debug\Buil</font>
<br><font size=2 face="Verdana">dLog.htm"</font>
<br><font size=2 face="Verdana">mylib - 0 error(s), 0 warning(s)</font>
<br><font size=2 face="Verdana">------ Rebuild All started: Project: myexe,
Configuration: Debug Win32 ------</font>
<br><font size=2 face="Verdana">Deleting intermediate and output files
for project 'myexe', configuration 'Debug</font>
<br><font size=2 face="Verdana">|Win32'</font>
<br><font size=2 face="Verdana">Building Custom Rule C:/Jos/pd-3.1/test/exe/CMakeLists.txt</font>
<br><font size=2 face="Verdana">CMake does not need to re-run because CMakeFiles/generate.stamp
is up-to-date.</font>
<br><font size=2 face="Verdana">Compiling...</font>
<br><font size=2 face="Verdana">exe.cpp</font>
<br><font size=2 face="Verdana">Compiling manifest to resources...</font>
<br><font size=2 face="Verdana">Microsoft (R) Windows (R) Resource Compiler
Version 6.0.5724.0</font>
<br><font size=2 face="Verdana">Copyright (C) Microsoft Corporation. All
rights reserved.</font>
<br><font size=2 face="Verdana">Linking...</font>
<br><font size=2 face="Verdana">LINK : fatal error LNK1104: cannot open
file '..\lib\Debug\mylib.lib'</font>
<br><font size=2 face="Verdana">Build log was saved at "file://c:\Jos\pd-3.1\test\build\exe\myexe.dir\Debug\Buil</font>
<br><font size=2 face="Verdana">dLog.htm"</font>
<br><font size=2 face="Verdana">myexe - 1 error(s), 0 warning(s)</font>
<br><font size=2 face="Verdana">------ Skipped Rebuild All: Project: ALL_BUILD,
Configuration: Debug Win32 -----</font>
<br><font size=2 face="Verdana">-</font>
<br><font size=2 face="Verdana">Project not selected to build for this
solution configuration</font>
<br><font size=2 face="Verdana">========== Rebuild All: 2 succeeded, 1
failed, 1 skipped ==========</font>
<br>
<br><font size=2 face="Verdana">So even though I use add_library(mylib
mylib.cpp) and the dll is built, the linker want to have a .lib file for
building the dll.</font>
<br>
<br><font size=2 face="Verdana">== CMakeLists.txt ==</font>
<br><font size=2 face="Verdana">cmake_minimum_required(VERSION 2.6)</font>
<br><font size=2 face="Verdana">project(test)</font>
<br><font size=2 face="Verdana">add_subdirectory(lib)</font>
<br><font size=2 face="Verdana">add_subdirectory(exe)</font>
<br><font size=2 face="Verdana">== lib/CMakeLists.txt ==</font>
<br><font size=2 face="Verdana">add_library(mylib SHARED mylib.cpp)</font>
<br><font size=2 face="Verdana">include_directories(../lib)</font>
<br><font size=2 face="Verdana">== exe/CMakeLists.txt ==</font>
<br><font size=2 face="Verdana">add_executable(myexe exe.cpp)</font>
<br><font size=2 face="Verdana">target_link_libraries(myexe mylib)</font>
<br>
<br><font size=2 face="Verdana">In CMake I select ''Visual Studio 9 2008''
as the target.</font>
<br>
<br><font size=2 face="Verdana">Cheers,</font>
<br><font size=2 face="Verdana">Jos<br>
<br>
<b><br>
Jos van den Oever </b>- SW Engineering <br>
</font>
<table width=100%>
<tr valign=top>
<td width=32%><font size=1 face="Verdana">PANalytical <br>
Lelyweg 1 <br>
7602 EA Almelo <br>
The Netherlands </font>
<td width=67%><font size=1 face="Verdana">T +31 (0)546 528<br>
F +31 (0)546 534598<br>
Jos.van.den.Oever@panalytical.com<br>
www.PANalytical.com</font></table>
<br><font size=2 face="Verdana"><br>
</font>
<table width=100%>
<tr>
<td width=48% bgcolor=#ff8d40><font size=2 face="Verdana"> </font><font size=2 color=white face="Verdana"><b>PANalytical</b></font>
<td width=51% bgcolor=#ff8d40>
<div align=right><font size=2 color=white face="Verdana"><b>The Analytical
X-ray Company </b></font><font size=3> </font></div>
<tr valign=top>
<td colspan=2><font size=1 color=#808080 face="Verdana"><br>
The information contained in this message is confidential and may be legally
privileged. The message is intended solely for the addressee(s). If you
are not the intended recipient, you are hereby notified that any use, dissemination,
or reproduction is strictly prohibited and may be unlawful. If you are
not the intended recipient, please contact the sender by return e-mail
and destroy all copies of the original message.</font></table>
<br>