Pelles C forum

C language => Beginner questions => Topic started by: fenke on April 17, 2016, 12:56:07 PM

Title: invalid directory
Post by: fenke 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?
Title: Re: invalid directory
Post by: frankie 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.
Title: Re: invalid directory
Post by: sam14 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.
Title: Re: invalid directory
Post by: 1e9t8m29 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).
Title: Re: invalid directory
Post by: John Z 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