PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.c > with Make
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
with Make

Réponse
 
LinkBack Outils de la discussion
Vieux 01/02/2008, 11h02   #1
Tricky
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut with Make

Hi, first post in here.

Im not a very experienced C programmer, and Im fiddling with make. I
have the following make file (entitled Makefile):

fusionTK.exe : main.o fusionFileIO.o fusionAlgorithms.o
gcc main.o fusionFileIO.o fusionAlgorithms.o -o fusionTK.exe

main.o : main.c fusionDefs.h
gcc -c main.c fusionDefs.h

fusionFileIO.o: fusionFileIO.c fusionDefs.h
gcc -c fusionFileIO.c fusionDefs.h

fusionAlgorithms.o: fusionAlgorithms.c fusionDefs.h
gcc -c fusionAlgorithms.c fusionDefs.h

Which as far as I can tell is all well and good, but when I execute
make, it comes back with the error:
"make: *** No rule to make target `main.c', needed by `main.o'.
Stop."

have I put something in the wrong place? I thought th

Im running this on WinXP pro with cygwin installed.
Also, if I remove the main.c and fusionDefs.h from the main.o
dependencies, it runs the command associated with main.o :"gcc - c
main.c fusionDefs.h" and then complains that the gcc command is not
found. I can quite happily run GCC directly from the command line.
  Réponse avec citation
Vieux 01/02/2008, 11h07   #2
Joachim Schmitz
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: with Make

Tricky wrote:
> Hi, first post in here.
>
> Im not a very experienced C programmer, and Im fiddling with make. I
> have the following make file (entitled Makefile):
>
> fusionTK.exe : main.o fusionFileIO.o fusionAlgorithms.o
> gcc main.o fusionFileIO.o fusionAlgorithms.o -o fusionTK.exe
>
> main.o : main.c fusionDefs.h
> gcc -c main.c fusionDefs.h
>
> fusionFileIO.o: fusionFileIO.c fusionDefs.h
> gcc -c fusionFileIO.c fusionDefs.h
>
> fusionAlgorithms.o: fusionAlgorithms.c fusionDefs.h
> gcc -c fusionAlgorithms.c fusionDefs.h
>
> Which as far as I can tell is all well and good, but when I execute
> make, it comes back with the error:
> "make: *** No rule to make target `main.c', needed by `main.o'.
> Stop."
>
> have I put something in the wrong place? I thought th
>
> Im running this on WinXP pro with cygwin installed.
> Also, if I remove the main.c and fusionDefs.h from the main.o
> dependencies, it runs the command associated with main.o :"gcc - c
> main.c fusionDefs.h" and then complains that the gcc command is not
> found. I can quite happily run GCC directly from the command line.

OT here (comp.unix.programmer might be a prropriate groupg for this), but
are you sure that the rules are starting with TAB rather than a couple
BLANKs?

Bye, Jojo


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 18h03.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08122 seconds with 10 queries