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 8282649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:26:41+00:00 2026-06-08T10:26:41+00:00

How to add a library include path for NetBeans and gcc on Windows? Using:

  • 0

How to add a library include path for NetBeans and gcc on Windows?

Using:

  • NetBeans 7.1.2
  • MinGW (mingw-get-inst-20120426.exe)
  • gcc 4.7.0
  • 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-08T10:26:44+00:00Added an answer on June 8, 2026 at 10:26 am

    For example, you want to add the directories in C:\Program Files (x86)\Example\1.0\include\ as the include paths.

    First, set up code assistance:

    • NetBeans > Tools > Options > C/C++ > Code Assistance
      • C Compiler > Include Directories:
        • C:\Program Files (x86)\Example\1.0\include\shared
        • C:\Program Files (x86)\Example\1.0\include\other
        • C:\Program Files (x86)\Example\1.0\include
        • C:\MinGW\lib\gcc\mingw32\4.7.0\include
        • C:\MinGW\include
        • C:\MinGW\lib\gcc\mingw32\4.7.0\include-fixed
        • …
      • C++ Compiler > Include Directories:
        • C:\Program Files (x86)\Example\1.0\include\shared
        • C:\Program Files (x86)\Example\1.0\include\other
        • C:\Program Files (x86)\Example\1.0\include
        • C:\MinGW\lib\gcc\mingw32\4.7.0\include\c++
        • C:\MinGW\lib\gcc\mingw32\4.7.0\include\c++\mingw32
        • C:\MinGW\lib\gcc\mingw32\4.7.0\include\c++\backward
        • C:\MinGW\lib\gcc\mingw32\4.7.0\include
        • C:\MinGW\include
        • C:\MinGW\lib\gcc\mingw32\4.7.0\include-fixed
        • …
      • OK.

    The C:\MinGW\... directories are examples only. Do not actually add them. NetBeans should have detected and added the MinGW directories automatically. If not, try resetting the settings:

    • NetBeans > Tools > Options > C/C++
      • Code Assistance
        • C Compiler > Reset Settings
        • C++ Compiler > Reset Settings
      • Build Tools
        • Restore Defaults

    For instructions on automatic code assistance for existing sources, see:

    • C/C++ Projects Quick Start Tutorial:

      http://netbeans.org/kb/docs/cnd/quickstart.html#makefileprojects

    • How to Configure Code Assistance When Creating a Project from Existing Code:

      http://netbeans.org/kb/docs/cnd/configuring-code-assistance.html


    Now, configure the project options:

    • Right click on project > Properties
      • Configuration: <All Configurations>
      • Build
        • C Compiler
          • General
            • Include Directories:
              • C:\Program Files (x86)\Example\1.0\include\shared
              • C:\Program Files (x86)\Example\1.0\include\other
              • C:\Program Files (x86)\Example\1.0\include
          • Compilation Line
            • Additional Options:
              • -std=c11 -g3 -pedantic -Wall -Wextra -O0
        • C++ Compiler
          • General
            • Include Directories:
              • C:\Program Files (x86)\Example\1.0\include\shared
              • C:\Program Files (x86)\Example\1.0\include\other
              • C:\Program Files (x86)\Example\1.0\include
          • Compilation Line
            • Additional Options:
              • -std=c++11 -g3 -pedantic -Wall -Wextra -O0
      • OK.

    For adding command-line options by default for all projects, see:

    • NetBeans settings for GCC

    Any spaces in the path should be automatically escaped. Any backward slashes should be replaced with forward slashes automatically.

    For example, the “All options” textbox in “Additional Options” looks like this:

    -std=c11 -g3 -pedantic -Wall -Wextra -O0 -g -I/C/Program\ Files\ \(x86\)/Example/1.0/include/shared -I/C/Program\ Files\ \(x86\)/Example/1.0/include/other -I/C/Program\ Files\ \(x86\)/Example/1.0/include
    

    If this does not work, you may have to fix the path and add the includes manually in the additional options. For example, replace /C/ with C:/.

    -std=c11 -g3 -pedantic -Wall -Wextra -O0 -g -IC:/Program\ Files\ \(x86\)/Example/1.0/include/shared -IC:/Program\ Files\ \(x86\)/Example/1.0/include/other -IC:/Program\ Files\ \(x86\)/Example/1.0/include
    

    If you are using Cygwin make and if you try to clean or rebuild the project with colons in the command, you may get a *** multiple target patterns. Stop. error message. According to the answers from Multiple target patterns? and Very simple application fails with "multiple target patterns" from Eclipse, “make sees the : in the path and thinks it is another target definition, hence the error.”

    The workaround is to delete the generated build and dist folders every time before you build your project. However, this can be annoying, so you could try MinGW MSYS make instead (not to be confused with MinGW make, which is unsupported).

    For MinGW and MSYS configuration instructions, see:

    • Configuring the NetBeans IDE for C/C++/Fortran:

      http://netbeans.org/community/releases/68/cpp-setup-instructions.html#mingw

    For working with MinGW and Unicode, you should install the latest version of MinGW-w64. See:

    • wWinmain, Unicode, and Mingw
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to add ~/include to my include path for all projects while using
I am using the GD Library to add text to the PNG Image of
I want to add MOQ .net library to a .NET 4.0 project. I get
I am trying to include a library into my android project using IntelliJ IDEA
actually i create a CMake script to localize the DevIL library using MSYS/MinGW on
I'm trying to add a Library to Eclipse Galileo and it won't work out.
I would like to ask how to add HSQLDB library hsqldb.jar in Maven? I
I want to add some more library and helpers file into Pyrocms which is
Is there a JS framework or library to add text/check box to gmail UI?
I'm having a difficult time figuring out how to add a .jar/library to a

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.