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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:00:34+00:00 2026-06-04T14:00:34+00:00

When I supply an path for EXTRAINCDIRS (in the Makefile, following the sample provided

  • 0

When I supply an path for EXTRAINCDIRS (in the Makefile, following the sample provided by WINAVR) without whitespace, the compiler is able to find my header file, but when I use a path containing whitespace (enclosed in quotation marks, as the comments in the Makefile direct), it raises: error: No such file or directory.

"d:/dev/avr/atmega/shared/" # will search files in this dir
"d:/dev/avr/atmega/sha ed/" # will not search this dir for files

I mean, the comments say:

# List any extra directories to look for include files here.
#     Each directory must be seperated by a space.
#     Use forward slashes for directory separators.
#     For a directory that has spaces, enclose it in quotes.

Any idea how to get WINAVR to handle this correctly?

I’m using Programmer’s Notepad (WINAVR) on Windows XP. Here’s the command line command:

avr-g++ -c -mmcu=atmega328p -I. -gdwarf-2 -DF_CPU=UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./main.lst -I"d:/dev/avr/atmega/shared/" -I"d:/dev/avr/atmega/sha -Ied/" -std=gnu99 -MMD -MP -MF .dep/main.o.d main.c -o main.o
  • 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-04T14:00:36+00:00Added an answer on June 4, 2026 at 2:00 pm

    What is happening is that I’m guessing somewhere else in the makefile there is a line that does something like the following:

    INCLUDES = $(addprefix -I, $(INCDIRS))
    

    When that happens addprefix treats any spaces in the $(INCDIRS) variable as a seperator to the next variable and will add the -I there. What you could do is use a special character for spaces say ‘\\’ and then before the command is generated call a substitute function to resubstitute spaces. Something like the below example:

    SPACE = \\
    INCDIRS = /home/posey/test$(SPACE)dir
    
    INCLUDES = $(addprefix -I, $(INCDIRS))
    REAL_INCLUDES = $(subst $(SPACE), ,$(INCLUDES))
    
    .PHONY : all
    
    all:
        $(info $(REAL_INCLUDES))
    

    If this doesn’t make sense you can post the entire makefile and we can show you exactly what’s going on. Once the space has been substituted back into the variable you cannot run it through any further make functions that work with space delimiters without the same behavior occurring.

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

Sidebar

Related Questions

I'm working on an iOS project and need to supply a file path for
I need to generate an editable xml file to supply content to a flash
<py:match path=foo> <?python import os href = select('@href').render() SOMEWHERE = ... # what file
Consider the following security problem: I have a static base path ( /home/username/ )
So currently I have included the following in my .bashrc file. export RUBYLIB=/home/git/project/app/helpers I
A while back I asked how to open a file in actionscript to supply
Is there a convenient function to regularize a file path in c#? I have
How can I supply the frequency by sampling rate of 500ms in an android
What is the method in LINQ to supply a collection of values and check
I have a requirement to supply values from 2 select boxes to an Action

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.