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

  • SEARCH
  • Home
  • 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 8746437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:11:36+00:00 2026-06-13T12:11:36+00:00

I have been trying to play with SublimeText2 for some time now. While it

  • 0

I have been trying to play with SublimeText2 for some time now. While it is very easy to work with Python in it almost out of the box, working with C++ is a bit more tricky. I can manage to set up a CMake build script by copying and modifying the existing Makefile script, but there are many things that just don’t work as they do in a CMake supported IDE, like Eclipse CDT. SublimeText 2 does not seem to understand the concept of a separate build directory, it also cannot get me autocomplete through SublimeClang, if I include the libraries with reference to the directories added in CMake. SublimeClang keeps complaining that it cannot find the libraries, and when I try to #include, it cannot even offer me autocomplete on standard STL header file names, e.g., algorithm. If someone has a pipeline figured out, I would be obliged to hear about it.

I have asked this question in more general purpose usage-related forums before, where I did not get any response, which is why I thought of posting it here.

  • 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-13T12:11:37+00:00Added an answer on June 13, 2026 at 12:11 pm

    I use Sublime Text 2 with CMake and SublimeClang. I also use SublimeGDB. My build directory is under [project root]/build. Have a look at my project file and see if it helps you:

    {
        "folders":
        [
            {
                "path": "."
            }
        ],
    
        "build_systems":
        [
            {
                "name": "Build",
                "cmd": [ "make", "-C", "build" ],
                "file_regex": "/([^/:]+):(\\d+):(\\d+): "
            }
        ],
    
        "settings":
        {
            "sublimegdb_commandline": "gdb --interpreter=mi myapp",
            "sublimegdb_workingdir": "build",
    
            "sublimeclang_options" :
            [
                "-Wno-reorder"
            ],
            "sublimeclang_options_script": "${project_path:scripts/compileflags.rb} ${project_path:build}"
        }
    }
    

    The compileflags.rbscript is used to search for flags.make files in the CMake build tree which is where CMake keeps its compile flags. These flags are needed so that SublimeClang knows where to find your includes.

    Here is that script, located under scripts/:

    #!/usr/bin/env ruby
    
    # Searches for a flags.make in a CMake build tree and prints the compile flags.
    
    def search_dir(dir, &block)
        Dir.foreach(dir) do |filename|
            next if (filename == ".") || (filename == "..")
            path ="#{dir}/#{filename}"
            if File.directory?(path)
                search_dir(path, &block)
            else
                search_file(path, &block)
            end
        end
    end
    
    def search_file(filename)
        return if File.basename(filename) != "flags.make"
    
        File.open(filename) do |io|
            io.read.scan(/[a-zA-Z]+_(?:FLAGS|DEFINES)\s*=\s*(.*)$/) do |match|
                yield(match.first.split(/\s+/))
            end
        end
    end
    
    root = ARGV.empty? ? Dir.pwd : ARGV[0]
    params = to_enum(:search_dir, root).reduce { |a, b| a | b }
    puts params
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying for almost a week now to create an SQLite database
I have been trying to figure out how to get the play symbol on
I have been trying to play around with this for a long time and
For the last few days, I have been trying to use Python for some
I have been trying to figure out how to play a youtube video in
For the past few days I have been trying to play any sound over
I have been trying to setup git for our web development team unsuccessfully. Some
I have been trying to play around with gedit and came across the shortcut
I have been trying to do this for a few days now using AVFoundation
I am a newbie to both Play and ElasticSearch and have been trying to

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.