News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

invalid directory

Started by fenke, April 17, 2016, 12:56:07 PM

Previous topic - Next topic

fenke

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?

frankie

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

sam14

https://forum.pellesc.de/index.php?topic=7321.0
All the project source files must be located below the project directory.

1e9t8m29

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).

John Z

Quote from: 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).

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