Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8310195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:22:27+00:00 2026-06-08T19:22:27+00:00

I am porting a C++ codebase which was developed on a Windows platform to

  • 0

I am porting a C++ codebase which was developed on a Windows platform to Linux/GCC. It seems that the author didn’t care for the case of filenames, so he used

#include "somefile.h"

instead of

#include "SomeFile.h"

to include the file which is actually called “SomeFile.h”. I was wondering if there is any tool out there to automatically fix these includes? The files are all in one directory, so it would be easy for the tool to find the correct names.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T19:22:29+00:00Added an answer on June 8, 2026 at 7:22 pm

    EDIT: Before doing anything note that I’m assuming you either have copies of the files off ot the side or preferably that you have a baseline version in source control should you need to roll back for any reason.

    You should be able to do this with sed: Something like sed -i 's/somefile\.h/SomeFile.H/I' *.[Ch]

    This means take a case-insensitive somefile (trailing /I) and do an in-place (same file) replacement (-i) with the other text, SomeFile.H.

    You can even do it in a loop (totally untested):

    for file in *.[Ch]
    do
        sed -i "s/$file/$file/I" *.[Ch]
    done
    

    I should note that although I don’t believe this applies to you, Solaris sed doesn’t support -i and you’d have to install GNU sed or redirect to a file and rename.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've run into an issue porting a codebase from linux (gcc) to windows (msvc).
I have been tasked with porting a large Java codebase to the Android platform.
I have a large codebase that I've been tasked with porting to 64 bits.
When porting unix project developed in C language to windows and compiling it with
For background, I have come across this porting a medium-sized linux codebase (compiling into
In porting a big app from a Windows to Linux, I need to be
Porting a Qt 4.6.3 application from Windows to Linux. The standard way to port
I'm porting code from Linux C to Visual C++ for windows. Visual C++ doesn't
Currently porting an application to Windows Phone 7 I've encountered a problem that should
I'm porting some WPF code to WinRT. The code uses System.Windows.Media.Animation.ParallelTimeline to syncrhonize two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.