|
-
November 22nd, 2005, 04:51 AM
#1
How to represent variable with space in MAKEFILE
I want to include a library directory in a makefile:
C:/program file/ ../...
then How to represent the space in "program file"
I tried define ABC="C:/program file"
and add "\"after "program", but neither works.
-
November 22nd, 2005, 08:29 AM
#2
Re: How to represent variable with space in MAKEFILE
Can you post the full line, because, for instance I have the following line which is working well although it contains quotes:
Code:
LIBS = -L"C:/DEV-CPP/lib" -mwindows -lcomctl32
Edit: Maybe the problem is with the final "s" in "C:/Program Files"
Last edited by olivthill; November 22nd, 2005 at 08:31 AM.
-
November 22nd, 2005, 09:32 AM
#3
Re: How to represent variable with space in MAKEFILE
thanks for your reply ^_^
Code:
MATLAB_LIBS = \
C:\PROGRAM FILES\MATLAB704\extern\lib\win32\microsoft\msvc71\libmx.lib
error message is:
Code:
LINK: fatal error LNK1181: cannot open input file "C: \PROGRAM.OBJ"
NMAKE:fatal error u1077: 'cl': return code '0X2'
Last edited by yinkou; November 22nd, 2005 at 09:36 AM.
-
November 22nd, 2005, 10:46 AM
#4
Re: How to represent variable with space in MAKEFILE
The following should work i think:
Code:
MATLAB_LIBS = \
"C:\PROGRAM FILES\MATLAB704\extern\lib\win32\microsoft\msvc71\libmx.lib"
-
November 22nd, 2005, 12:51 PM
#5
Re: How to represent variable with space in MAKEFILE
Hi yinkou,
The following should also work (I've used it during scripting, but I like the long file names also).
Code:
C:\>dir /X
Volume in drive C has no label.
Volume Serial Number is 58AC-2403
Directory of C:\
11/04/2005 09:21 AM <DIR> CRYPTO~2.1 Crypto++ 5.2.1
10/04/2005 01:14 PM <DIR> dell
10/07/2005 08:21 AM <DIR> DOCUME~1 Documents and Settings
...
09/04/2003 12:59 PM 17,590 PkgClnup.log
11/07/2005 03:15 PM <DIR> POLICY~1 Policy Backups
11/17/2005 04:38 PM <DIR> PROGRA~1 Program Files
10/21/2005 10:53 AM <DIR> RDP5~1.2MS RDP 5.2 MSI Installer
Now that you have the short name:
Code:
MATLAB_LIBS = \ C:\PROGRA~1\MATLAB704\extern\lib\win32\microsoft\msvc71\libmx.lib
Jeff
-
November 22nd, 2005, 09:12 PM
#6
Re: How to represent variable with space in MAKEFILE
Code:
MATLAB_LIBS = \
C:\PROGRA~1\MATLAB704\extern\lib\win32\microsoft\msvc71\libmx.lib
I replaced "program files" with "PROGRA~1" and it works~~^_^
Thank you Jeffrey,Marc G and olivthill~~~~
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|