Creating new project files in Cygwin


I’m a bit new to the Cygwin environment, and I can’t seem to change the filename of my helloworld.c source to anything other than helloworld.c.

I tried changing the name of the file inside the .MAK file in the root dir of the project:


but the compiler just complains:

*** no rule to make target pleasecompile.c ***

is there another file I should be modifying?

It’s getting a little tedious scrolling through a thousand lines of helloworld.c code, any help would be most appreciated.

My next challenge will adding adding new files!


Hi Jedd,

I don’t know if you have special requirements for playing around with Cygwin MAK files, but I’d suggest a more simple solution - just create a new project using the OpenAT Project Wizard, then copy the hello_world.c file (if that’s what you want to do) from the Hello_World\src folder into your new_project\src folder and rename to the appropriate filename. Or just simply copy the code across to your new project!

Then to add new files (such as files common to several projects that are in another location) you can use the wmnew script options (see the OpenAT Tools Manual).

Advantage of the Wizard is you are updating the VC++ project and the makefile in one.


Thanks for the tips Arfy, although I should have been a little more specific :slight_smile:

really it’s only adding files to the project that I’m having trouble with.

I’m not using .NET or VC development environment, just CYGWIN.

The Tools manual says that any .c files inside the src directory will be considered as source files, but if I add a new source file called say test.c, the wmmake script complains "** no rule to make ‘test.o’ needed by ‘gcc_project_32’ ***

So I tried, from the project root:
wmnew -src src

  • to get it to re-read the files in the src dir, hopefully making the necessary changes to the various MAK files, but no joy.

I tried creating a second source folder off the project root and adding a new file into that, but no joy there either.

I get the feeling this is one of those doh! type problems with a simple solution, any help is appreciated.


The following works for me:

Start with a project that builds OK.

Add new .c files in the src folder.

Run the Project Wizard.

Do not enter anything in the ‘Project Name’ box

Enter the path for your project into the ‘Project Path’ box (either enter it directly, or use the browse button)

The Wizard will detect that a project already exists in that folder; it will automatically fill-in the ‘Project Name’ box from the existing Project, and choose ‘Existing Project’ as the project base.

Click ‘OK’, and the wizard will re-create all the necessary makefiles, etc, to build all the source files found in the src folder.

Job done!

Note that header files must be added in the inc folder (not the src folder), or GCC will not find them. :unamused:

MSVC doesn’t seem to care… :slight_smile: