NO

Author Topic: Long path names with /LIBPATH  (Read 5713 times)

Greg

  • Guest
Long path names with /LIBPATH
« on: August 09, 2005, 01:56:16 AM »
I was using a response file with POLINK and I noticed I could only use short path names with /LIBPATH. Is it supposed to do that? I'm using POLINK 4.00.0.

This didn't work:
Code: [Select]
/DEBUG
/DEBUGTYPE:CV
/LIBPATH:"C:\Program Files\PellesC\Lib"
/LIBPATH:"C:\Program Files\PellesC\Lib\Win"
/SUBSYSTEM:CONSOLE


This worked:
Code: [Select]
/DEBUG
/DEBUGTYPE:CV
/LIBPATH:C:\PROGRA~1\PellesC\Lib
/LIBPATH:C:\PROGRA~1\PellesC\Lib\Win
/SUBSYSTEM:CONSOLE

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Long path names with /LIBPATH
« Reply #1 on: August 09, 2005, 05:52:00 PM »
For long names with embedded spaces you have to quote the entire option:
Code: [Select]

"/LIBPATH:C:\Program Files\PellesC\Lib"

Pelle
/Pelle

Anonymous

  • Guest
Long path names with /LIBPATH
« Reply #2 on: August 09, 2005, 06:56:32 PM »
Quote from: "Pelle"
For long names with embedded spaces you have to quote the entire option:
Code: [Select]

"/LIBPATH:C:\Program Files\PellesC\Lib"

Pelle


No offense Pelle... but, unless all the other options have to be quoted too... Greg's way makes a lot more sense.  

Certainly I wouldn't have blundered onto the current method without you mentioning it...

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Long path names with /LIBPATH
« Reply #3 on: August 09, 2005, 07:19:34 PM »
I use the argv array for the arguments - which is parsed by the C startup code. The startup code will only make a single argument when the whole string is quoted. The handle /option:"string with spaces" I would have to use GetCommandLine(), or something similar, and do my own parsing. Lots of additional code for absolutely no good reason. You just have to learn to move the quote in front of the option. It's only need for handling options with embedded spaces which isn't very common.

Pelle
/Pelle

Greg

  • Guest
Long path names with /LIBPATH
« Reply #4 on: August 09, 2005, 09:33:52 PM »
Pelle,

Thanks for the explanation. Now that I know how to do it, it is no problem. But, I wouldn't have thought of doing it that way.

The "C:\Program Files\" directory structure can sure be a pain sometimes.

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Long path names with /LIBPATH
« Reply #5 on: August 09, 2005, 09:53:01 PM »
No, it's not very obvious. I have added a page in the help file for the entire "Command line tools" section about this (the same thing applies to all of them).

I guess you have to switch to the Swedish Windows version - here we call Program Files just Program - saves some trouble... ;-)

Pelle
/Pelle

garrynt

  • Guest
Re: Long path names with /LIBPATH
« Reply #6 on: May 26, 2014, 05:45:37 PM »
you can try long path tool software, it works fine for me :) good luck