<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
William A. Hoffman wrote:
<blockquote cite="mid6.2.3.4.2.20060726081133.0d983a30@pop.nycap.rr.com"
 type="cite">
  <pre wrap="">At 05:40 AM 7/26/2006, <a class="moz-txt-link-abbreviated" href="mailto:che-ranking@arcor.de">che-ranking@arcor.de</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi everyone,

I want to build a Project on windows. This poject uses CMAKE when built on windows (it uses another system on unix/linux systems). I cannot build the project with CMAKE cause it fails to build a "simple test program". The reason for that is that the Linker can't find 'user32.lib'. In my case this file is located in a directory different than MSVC++ because I am using the free MSVC++ Express Edition (so user32.lib is in the directory of the MS Platform SDK). So I thought "No problem, just use LINK_DIRECTORIES to add the SDK directory to the search path for libraries". But this doesn't work. The "simple test program", which seems to be needed by the PROJECT command, is still linked without the SDK directories.

Does anyone have a clue how to fix that?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
You have not installed the Express Edition correctly.  Please look at the installation instructions
for MS SDK and MSVC Express.
  </pre>
</blockquote>
<br>
This problem is not unique to Express Edition.&nbsp; I recently removed my
Platform SDK and VS .NET 2003 installations, then reinstalled VS .NET
2003.&nbsp; So, VS .NET 2003 is the only source of files on my system, there
is no Platform SDK to interfere with anything.&nbsp; CMake dies on even a
trivial CMakeLists.txt, says it can't find user32.lib.&nbsp; It and similar
files are canonically installed in C:\Program Files\Microsoft Visual
Studio .NET 2003\Vc7\PlatformSDK\Lib .<br>
<br>
So whose fault is this, CMake's or VS .NET 2003's?&nbsp; Looking at Options
--&gt; Projects --&gt; VC++ Directories --&gt; Library Files, I see
only:<br>
$(VCInstallDir)lib<br>
$(VCInstallDir)atlmfc\lib<br>
$(FrameworkSDKDir)lib<br>
<br>
The problem goes away when I add:<br>
$(VCInstallDir)PlatformSDK\lib<br>
<br>
Now, regardless of fault, what should CMake be doing?&nbsp; Since it relies
on user32.lib to perform even the most trivial of operations in
CMakeLists.txt, and I didn't put "user32.lib" anywhere in my
CMakeList.txt, and there are no installation instructions for VS .NET
2003 that I was a bad boy about not reading... I say that CMake should
make more effort to find out about the library directories.&nbsp; Or, it
should give an error telling the user what to do to fix the problem in
VS, rather than a screenful of gobbledygoo.&nbsp; The effect of the latter
is to make CMake look quite broken and unreliable.<br>
<br>
The bad appearance probably doesn't happen so much in practice with VS
.NET 2003, because people typically install a Platform SDK somewhere
along the way, for whatever reason they need it.&nbsp; The PSDK provides
pathnames and a user32.lib and configures VS appropriately.&nbsp; The bad
appearance is going to happen anytime someone just installs a compiler
and then just tries to use it right away, sans PSDK.&nbsp; True of people
trying out Express Edition, and also true of multi-compiler Windows
developers trying to keep their MinGW, MSVC, and Cygwin installations
separate.<br>
<br>
<br>
Cheers,<br>
Brandon Van Every<br>
<br>
</body>
</html>