NO

Author Topic: invalid directory  (Read 3588 times)

fenke

  • Guest
invalid directory
« on: April 17, 2016, 12:56:07 PM »
I am getting an 'unknown file extension or invalid directory' when trying to add a .c source code file to a (console) project.

The same errors occur when opening an older project. I don't see why .c files would be an unknown extension for a C compiler, or why their directory could be invalid?

What else could trigger this error?

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2096
Re: invalid directory
« Reply #1 on: April 17, 2016, 03:01:42 PM »
Maybe it depends on the file location.
Starting from a couple of releases ago Pelle confined the location of project's files to subdirectories of the one where the -prj file is located.
Honestly I think that nobody on this forum understand why. This simply limit the IDE flexibility and force the use of a custom project files layout that is not found in any IDE or sample code you can download around.  :P
Try to move files inside the project directory.
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

Offline sam14

  • Member
  • *
  • Posts: 1
Re: invalid directory
« Reply #2 on: April 26, 2022, 10:24:13 AM »
https://forum.pellesc.de/index.php?topic=7321.0
All the project source files must be located below the project directory.

Offline 1e9t8m29

  • Member
  • *
  • Posts: 6
Re: invalid directory
« Reply #3 on: April 27, 2022, 04:52:53 PM »
I don't know why Pelles C still keeps creating Pelles C Projects directory on the user's Documents library (map to My Documents in user home directory). This causes so many problems! Move the Pelles C Projects directory out of the Documents library solved the problem. I suggest changing the default location of Pelles C Projects to be the user's home directory rather than the Documents library (user's My Documents).

Offline John Z

  • Member
  • *
  • Posts: 790
Re: invalid directory
« Reply #4 on: April 29, 2022, 11:45:06 AM »
I don't know why Pelles C still keeps creating Pelles C Projects directory on the user's Documents library (map to My Documents in user home directory). This causes so many problems! Move the Pelles C Projects directory out of the Documents library solved the problem. I suggest changing the default location of Pelles C Projects to be the user's home directory rather than the Documents library (user's My Documents).

It is just following your instructions. When you created the project you did not specify a location.  I've never had PellesC create a projects in the Document folder.  See attached image to change the project location when you create one.  It also saves this for the next one as I recall.

John Z