Find the answer to your Linux question:
Results 1 to 4 of 4
I'm using Anjuta for programming C++ right now, but it cannot compile properly at all. When I press "compile" this is the error shown: make New file 1 make: *** ...
  1. #1
    Banned
    Join Date
    Mar 2011
    Posts
    13

    Cannot compile any C++ program (Ubuntu)

    I'm using Anjuta for programming C++ right now, but it cannot compile properly at all. When I press "compile" this is the error shown:

    make New file 1
    make: *** No rule to make target 'New'. Stop.

    Can someone please explain what is going on? I've already tried compiling on a lot of different IDEs.

    Thanks

  2. #2
    Just Joined!
    Join Date
    Apr 2011
    Posts
    2
    For a start you can paste the script that you want to compile..
    No rule to make a target? Is it possible the problem to be with the file permissions?

  3. #3
    Linux Newbie
    Join Date
    Apr 2010
    Location
    Novosibirsk, Russia
    Posts
    136

    Post

    May be you should better start by reading Anjuta docs?...

    Commonly if you get a "No rule to make target..." error, it often means the problem with your Makefile. Makefile its just a thing for simplifying project builds, and it looks like that:

    target: dependencies
    [tab] system command
    An example Makefile:
    executable : module1.o module2.o
    gcc -o executable.bin module1.o module2.o

    module1 : module1.c module1.h
    gcc -o module1.o module1.c

    module2 : module2.c module2.h
    gcc -o module2.o module2.c
    if you try, for example, to run `make module1`, it would produce module1.o for you. But if you run `make module3`it will produce "No rule to make target 'module3' " error, because this rule is absent in Makefile.

    So, an IDE can require some additional steps to generate Makefile for your project. For example Qt Framework has `qmake` command to generate Makefile using specified '.pro' file. Anyway I would recommend you to view some Anjuta docs to find out how to correctly build new project.

  4. #4
    Just Joined!
    Join Date
    Sep 2010
    Location
    Montgomery, AL
    Posts
    27
    Quote Originally Posted by htorbov View Post
    For a start you can paste the script that you want to compile..
    No rule to make a target? Is it possible the problem to be with the file permissions?
    This is a long shot, but it could also mean you need to run "make clean" if you have already compiled it once or "make all". This is because, if make sees object files in the directory already, then it will skip and not compile. "make clean" will delete all of your object files and "make all" will compile and relink any code that has changed since the last "make" call. All of this depends on the make file of course.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...