[CMake] windows link error

Simmons, Aaron asimmons at rosettastone.com
Thu Mar 4 17:27:56 EST 2010


You're right-- msvc uses "link"; I was thinking of gcc's "ld".  I guess the question is why is it trying to use "ld" at all?  Cmake successfully detects that its using msvc/nmake, as it compiles all of the .c files with "cl".  It's the lib-linking step that falls down.

Here is my "set" output:

    ALLUSERSPROFILE=C:\Documents and Settings\All Users
    APPDATA=C:\Documents and Settings\asimmons\Application Data
    ARTISYNTH_HOME=C:\artisynth_2.2
    ARTISYNTH_PATH=.;C:\artisynth_2.2
    CLASSPATH=.;C:\artisynth_2.2\classes;C:\artisynth_2.2\lib\jogl.jar;C:\artisynth_2.2\lib\argparser.jar;C:\artisynth_2.2\lib\jass.jar;C:\artisynth_2.2\lib\quickhull3d.jar;C:\artisynth_2.2\lib\jmf.jar;C:\Program Files\Java\jre6\lib\ext\QTJava.zip
    CLIENTNAME=Console
    CommonProgramFiles=C:\Program Files\Common Files
    COMPUTERNAME=ASIMMONS-WIN
    ComSpec=C:\WINDOWS\system32\cmd.exe
    DevEnvDir=C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE
    FP_NO_HOST_CHECK=NO
    Framework35Version=v3.5
    FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework
    FrameworkVersion=v2.0.50727
    FTP_PASSIVE=1
    HOMEDRIVE=C:
    HOMEPATH=\Documents and Settings\asimmons
    INCLUDE=C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include;
    JAVA_HOME=C:\Program Files\Java\jdk1.6.0_10\
    LIB=C:\Program Files\Microsoft Visual Studio 9.0\VC\LIB;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib;
    LIBPATH=C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 9.0\VC\LIB;
    LOGONSERVER=\\RSBLDRDC1
    NUMBER_OF_PROCESSORS=2
    OS=Windows_NT
    Path=C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN;C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 9.0\VC\VCPackages;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin;C:\Program Files\CollabNet Subversion;C:\Program Files\PHP\;c:\ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\artisynth_2.2\lib\Windows;C:\Program Files\CollabNet Subversion;C:\Program Files\Notepad++\;C:\ant\bin\;C:\Program Files\lynx\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;\;C:\Program Files\PHP\;C:\Program Files\Java\jdk1.6.0_10\bin;C:\Program Files\GnuWin32\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\CollabNet Subversion;C:\ffmpeg\bin;C:\sox;C:\lame;C:\MinGW\bin;C:\Program Files\netcat;C:\Program Files\010 Editor v3;C:\Program Files\SWFTools;C:\Program Files\WinMerge;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\CMake 2.8\bin
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.RB;.RBW;.PSC1
    PHPRC=C:\Program Files\PHP\
    PROCESSOR_ARCHITECTURE=x86
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 6 Stepping 4, GenuineIntel
    PROCESSOR_LEVEL=15
    PROCESSOR_REVISION=0604
    ProgramFiles=C:\Program Files
    PROMPT=$G
    QTJAVA=C:\Program Files\Java\jre6\lib\ext\QTJava.zip
    RUBYOPT=-rubygems
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:\WINDOWS
    TEMP=C:\DOCUME~1\asimmons\LOCALS~1\Temp
    TERM=dumb
    TMP=C:\DOCUME~1\asimmons\LOCALS~1\Temp
    USERDNSDOMAIN=ROSETTASTONE.LOCAL
    USERDOMAIN=ROSETTASTONE
    USERNAME=asimmons
    USERPROFILE=C:\Documents and Settings\asimmons
    VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio 9.0\VC
    VS90COMNTOOLS=C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\
    VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio 9.0
    windir=C:\WINDOWS
    WindowsSdkDir=C:\Program Files\Microsoft SDKs\Windows\v6.0A\

-----Original Message-----
From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of Andreas Pakulat
Sent: Thursday, March 04, 2010 15:23
To: cmake at cmake.org
Subject: Re: [CMake] windows link error

On 04.03.10 17:08:32, Simmons, Aaron wrote:
> I am trying to use cmake v2.8.0 on Windows XP to link a library.  On Mac OS X and Linux, it works.  But on Windows I get a very strange error:
> 	C:\strawberry\c\bin\ld.exe: /lib: No such file: No such file or directory
> 
> The only thing I can think of is that this is some kind of reference to "Strawberry Perl", which I don't even have installed.  My project, btw, has nothing to do with Pearl-- its C++.
> 
> Why isn't it using the path to the MSVC ld?  It does so for the cl tool.

MSVC has no ld, MSVC's compiler is "cl.exe", the linker is called
"link.exe". So it looks like your environment is somehow strange. Can
you post the output of set? 

Andreas

-- 
You will lose your present job and have to become a door to door mayonnaise
salesman.
_______________________________________________
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


More information about the CMake mailing list