This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about link.exe?


Chris Howell wrote:
What I want is link to be the path that is found under my BIN directory of my DevStudio install. However possibily because they're the same name when I query link, or try and use it to make a dll. Bash thinks I am using link to make a symbolic link as opposed to a dll.

Your PATH evidently has the Cygwin tools before the VC++ tools, so it's finding /usr/bin/link before VC++'s link.exe.


Instead of using the VC++ Command Shell, I always start from the Cygwin shell. Then when I need to use the VC++ command line tools, I use the following script to create a VC++ subshell, which I call vcvars9:

---------------- 8< --------- cut here ---------- 8< ------------

#!/bin/sh
export VSDIR="c:\Program Files\Microsoft Visual Studio 9.0"
export VCDIR="$VSDIR\VC"

WSDKDIR="c:\Program Files\Microsoft SDKs\Windows\v6.0A"
PSDKDIR="$VCDIR\PlatformSDK"
ATLDIR="$VCDIR\ATLMFC"
COMDIR="$VSDIR/Common7"

export INCLUDE=\
"$ATLDIR\include;$VCDIR\include;$PSDKDIR\include;$WSDKDIR\include"
export LIB="$ATLDIR\lib;$VCDIR\lib;$PSDKDIR\lib;$WSDKDIR\lib"
export LIBPATH="$ATLDIR\lib"

export PATH=\
"$VCDIR/bin:$PSDKDIR/bin:$COMDIR/ide:$COMDIR/Tools:$COMDIR/Tools/bin":$PATH

echo "Say 'exit' to leave VS2008 shell and restore Cygwin environment."
/usr/bin/bash --rcfile ~/.vcvars9rc

---------------- 8< --------- cut here ---------- 8< ------------

In ~/.vcvars9rc, I have just a single line to change the prompt string to remind myself that I'm in a subshell:

PS1='VS2008: \W \$ '

On exiting the shell, your previous Cygwin environment is restored.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]