• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
DOS pathname separators?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DOS pathname separators?


  • Subject: DOS pathname separators?
  • From: Ken Good <email@hidden>
  • Date: Wed, 10 Aug 2005 11:32:26 -0500

Brad,

Brad Oliver <email@hidden> wrote:
I'm currently working on an Xcode version of a Mac port of a large (~1500 file) Win32 app. As you might guess, the code is not owned by me, so any changes I make remain specific to the Mac version and will never get propagated back into the Win32 codebase.

With that disclaimer out of the way, I'm in gcc hell right now. This codebase is totally saturated with #includes that use DOS-style path separators (i.e. "\" instead of "/"). I don't have an easy count, but so far I've changed hundreds of these today, and I'm only about 10% of the way through the code. I estimate that it'll probably take me at least the rest of the day and several hours tomorrow to just get past this particular syntax problem.

I'm hoping someone will tell me that there's a switch or setting I can use to enable this, before I go crazy or my hands fall off. :-) If not, let me know and I'll file a feature request.

I'm not aware of any gcc switch that will make this problem go away, but I believe there is a solution that will make those edits unnecessary.


The solution is to create a "redirects" folder and add it to your project's header search path. Then, inside that folder, create a symbolic link for each header file included in the source code via a DOS path. For example, if a source file has:

  #include <This\is\bad.h>

create a link inside your redirects folder named "This\is\bad.h" that points to "This/is/bad.h". gcc should follow the link just fine. Tested with XCode 2.2, gcc 3.3.

Ken G.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: [OT?] How does IB make DataBrowser small
  • Next by Date: Re: reducing ld's memory footprint (19 minutes of linking)
  • Previous by thread: Re: DOS pathname separators?
  • Next by thread: DOS path separators - more info
  • Index(es):
    • Date
    • Thread