IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

C++ Discussion :

makefile sous windows


Sujet :

C++

  1. #1
    Membre averti
    Profil pro
    Inscrit en
    Janvier 2008
    Messages
    20
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Janvier 2008
    Messages : 20
    Par défaut makefile sous windows
    Bonjour.
    J'ai un problème, sous Code::Blocks, j'ai besoin d'avoir multi target pour compiler mon programme mon code source contient plusieurs fonction main ??,j'arrive pas a changer le make file ce code source marche bien sur linux ...

  2. #2
    Membre expérimenté Avatar de Grulim
    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    234
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 234
    Par défaut
    Citation Envoyé par faiza2008 Voir le message
    Bonjour.
    J'ai un problème, sous Code::Blocks, j'ai besoin d'avoir multi target pour compiler mon programme mon code source contient plusieurs fonction main ??,j'arrive pas a changer le make file ce code source marche bien sur linux ...
    J'ai du mal à comprendre ton message, la ponctuation est un peu trop absente.

    Un source c/c++ ne peut avoir plusieurs fonctions main() et bien compiler, tu devrais avoir des erreurs y compris sous Linux.
    A moins, bien sur, que certains soit encapsulés dans des #ifdef / #endif

  3. #3
    Membre averti
    Profil pro
    Inscrit en
    Janvier 2008
    Messages
    20
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Janvier 2008
    Messages : 20
    Par défaut
    Citation Envoyé par Grulim Voir le message
    J'ai du mal à comprendre ton message, la ponctuation est un peu trop absente.

    Un source c/c++ ne peut avoir plusieurs fonctions main() et bien compiler, tu devrais avoir des erreurs y compris sous Linux.
    A moins, bien sur, que certains soit encapsulés dans des #ifdef / #endif
    mon problème est de migrer un code source de linux qui marche tres bien au système exploitation Windows peux etre je vous envoi le makefile sous linux pour avoir bien le prob

    Code X : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    CXXFLAGS =
    
    all: segment graph fig png testMeanShift testKMean
    
    png :  Test/testPNG.o Color.o PNG.o Filter.o Histogram.o Pixel.o
    	${CXX} ${CXXFLAGS} -o  Test/testPNG.exe  Test/testPNG.o PNG.o Color.o Filter.o Histogram.o Pixel.o -L/usr/lib/ -lpng -lz -lm
    
    graph: Test/testGraph.o PNG.o  Node.o PixelMap.o Edge.o Iterator.o EPSWriter.o DisjointSet.o Histogram.o Pixel.o KMean.o Color.o Filter.o
    	${CXX} ${CXXFLAGS} -o Test/testGraph.exe  Test/testGraph.o PNG.o   Node.o PixelMap.o Edge.o Iterator.o EPSWriter.o Color.o Filter.o DisjointSet.o Histogram.o Pixel.o KMean.o -L/usr/lib/ -lpng -lz -lm
    
    segment: segment.o PNG.o   Node.o PixelMap.o Edge.o Iterator.o EPSWriter.o DisjointSet.o Histogram.o Pixel.o KMean.o Color.o Filter.o MeanShift.o FVector.o
    	${CXX} ${CXXFLAGS} -o segment.exe  segment.o PNG.o   Node.o PixelMap.o Edge.o Iterator.o EPSWriter.o Color.o Filter.o DisjointSet.o Histogram.o Pixel.o KMean.o MeanShift.o FVector.o -L/usr/lib/ -lpng -lz -lm
    
    testMeanShift:  Test/testMeanShift.o PNG.o Histogram.o Pixel.o Color.o  MeanShift.o  Node.o Edge.o Iterator.o PixelMap.o DisjointSet.o EPSWriter.o FVector.o
    	${CXX} ${CXXFLAGS} -o  Test/testMeanShift.exe Test/testMeanShift.o PNG.o Histogram.o  Color.o Pixel.o MeanShift.o  Node.o Edge.o Iterator.o PixelMap.o DisjointSet.o EPSWriter.o FVector.o -L/usr/lib/ -lpng -lz -lm
    
    testKMean:  Test/testKMean.o PNG.o Histogram.o Pixel.o Color.o  KMean.o  Node.o Edge.o Iterator.o PixelMap.o DisjointSet.o EPSWriter.o
    	${CXX} ${CXXFLAGS} -o  Test/testKMean  Test/testKMean.o PNG.o Histogram.o  Color.o Pixel.o KMean.o  Node.o Edge.o Iterator.o PixelMap.o DisjointSet.o EPSWriter.o -L/usr/lib/ -lpng -lz -lm
    
    testColor:  Test/testColor.cpp Color.o PNG.o Pixel.o
    	${CXX} ${CXXFLAGS} -o  Test/testColor.exe  Test/testColor.cpp  Color.o PNG.o Histogram.o Pixel.o -L/usr/lib/ -lpng -lz -lm
    
    
    fig: Test/testFig.o EPSWriter.o Color.o
    	${CXX} ${CXXFLAGS} -o Test/testFig.exe  Test/testFig.o EPSWriter.o Color.o
    
    testGraph.o: testGraph.cpp
    	${CXX} ${CXXFLAGS} -c testGraph.cpp
    
    segment.o: segment.cpp
    	${CXX} ${CXXFLAGS} -c segment.cpp
    
    testMeanShift.o: testMeanShift.cpp MeanShift.o
    	${CXX} ${CXXFLAGS} -c testMeanShift.cpp
    
    testPNG.o:  Test/testPNG.cpp
    	${CXX} ${CXXFLAGS} -c  Test/testPNG.cpp
    
    PNG.o: PNG.hpp PNG.cpp Histogram.o
    	${CXX} ${CXXFLAGS} -c PNG.cpp
    
    Graph.o: Graph.hpp Graph.cpp
    	${CXX} ${CXXFLAGS} -c Graph.cpp
    
    Node.o: Node.hpp Node.cpp
    	${CXX} ${CXXFLAGS} -c Node.cpp
    
    PixelMap.o: PixelMap.hpp PixelMap.cpp
    	${CXX} ${CXXFLAGS} -c PixelMap.cpp
    
    Edge.o: Edge.hpp Edge.cpp
    	${CXX} ${CXXFLAGS} -c Edge.cpp
    
    Iterator.o: Iterator.hpp Iterator.cpp
    	${CXX} ${CXXFLAGS} -c Iterator.cpp
    
    
    EPSWriter.o: EPSWriter.hpp EPSWriter.cpp
    	${CXX} ${CXXFLAGS} -c EPSWriter.cpp
    
    Color.o: Color.hpp Color.cpp
    	${CXX} ${CXXFLAGS} -c Color.cpp
    
    Filter.o: Filter.hpp Filter.cpp
    	${CXX} ${CXXFLAGS} -c Filter.cpp
    
    DisjointSet.o: DisjointSet.hpp DisjointSet.cpp
    	${CXX} ${CXXFLAGS} -c DisjointSet.cpp
    
    KMean.o: KMean.hpp KMean.cpp
    	${CXX} ${CXXFLAGS} -c KMean.cpp
    
    Histogram.o: Histogram.hpp Histogram.cpp
    	${CXX} ${CXXFLAGS} -c Histogram.cpp
    
    Pixel.o: Pixel.hpp Pixel.cpp
    	${CXX} ${CXXFLAGS} -c Pixel.cpp
    
    MeanShift.o: MeanShift.hpp MeanShift.cpp
    	${CXX} ${CXXFLAGS} -c MeanShift.cpp
    	
    FVector.o: FVector.hpp FVector.cpp
    	${CXX} ${CXXFLAGS} -c FVector.cpp
    
    
    clean:
    	rm -f *.o
    	rm -f *.exe
    	rm -f Test/*.o
    	rm -f Test/*.exe
    	rm -f *.stackdump
    	rm -f *.fig
    	rm -f *.png
    	rm -f *.dat
    	rm -f Result/*
    	rm -f Result2/*
    	rm -f *.avi
    	rm -f *.ps
    	rm -f *.bak	
    	rm -f Doc/Rapport/*.log
    	rm -f Doc/Rapport/*.bak
    	rm -f Doc/Rapport/*.aux		
    	rm -f Doc/Rapport/*.nav	
    	rm -f Doc/Rapport/*.out
    	rm -f Doc/Rapport/*.snm
    	rm -f Doc/Rapport/*.toc
    	rm -f Doc/Rapport/*.log
    	rm -f Doc/Rapport/*.bak
    	rm -f Doc/Rapport/*.aux
    	rm -f Doc/Rapport/*.dvi	
    	rm -f Doc/Rapport/*.lot	
    	rm -f Doc/Rapport/*.toc	
    	rm -rf Doc/Rapport/dpi*
    	rm -rf Doc/Doxygen/html
    	rm -rf Doc/Doxygen/latex	
    	rm -f Matlab/*.avi
    	rm -f Images/*.txt

  4. #4
    Inactif  
    Avatar de Mac LAK
    Profil pro
    Inscrit en
    Octobre 2004
    Messages
    3 893
    Détails du profil
    Informations personnelles :
    Âge : 51
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations forums :
    Inscription : Octobre 2004
    Messages : 3 893
    Par défaut
    Plusieurs main => boum la tête quoi qu'il en soit, sauf avec les directives de préprocesseur adéquates bien entendu.

    Après, si tu as un répertoire "/usr/lib/" sous ton Windows, j'avoue être curieux de voir ça...
    Il te faut changer ces répertoires "système" pour les adapter à Windows.
    Mac LAK.
    ___________________________________________________
    Ne prenez pas la vie trop au sérieux, de toutes façons, vous n'en sortirez pas vivant.

    Sources et composants Delphi sur mon site, L'antre du Lak.
    Pas de question technique par MP : posez-la dans un nouveau sujet, sur le forum adéquat.

    Rejoignez-nous sur : Serveur de fichiers [NAS] Le Tableau de bord projets Le groupe de travail ICMO

  5. #5
    Membre averti
    Profil pro
    Inscrit en
    Janvier 2008
    Messages
    20
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Janvier 2008
    Messages : 20
    Par défaut
    Citation Envoyé par Mac LAK Voir le message
    Plusieurs main => boum la tête quoi qu'il en soit, sauf avec les directives de préprocesseur adéquates bien entendu.

    Après, si tu as un répertoire "/usr/lib/" sous ton Windows, j'avoue être curieux de voir ça...
    Il te faut changer ces répertoires "système" pour les adapter à Windows.
    voici le chagemt de filemake mais rien ne marche

    makefile
    Code X : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    # version: 0.3.12.3
    
    # Project Variables start
    CPP=mingw32-g++.exe
    CC=mingw32-gcc.exe
    LD=mingw32-g++.exe
    LIB=ar.exe
    WINDRES=windres.exe
    # Project Variables end
    
    # Target: Debug
    
    OBJS_DEBUG=obj\Debug\Color.o obj\Debug\DisjointSet.o obj\Debug\EPSWriter.o obj\Debug\Edge.o obj\Debug\FVector.o obj\Debug\Filter.o obj\Debug\Histogram.o obj\Debug\Iterator.o obj\Debug\KMean.o obj\Debug\MeanShift.o obj\Debug\Node.o obj\Debug\PNG.o obj\Debug\Pixel.o obj\Debug\PixelMap.o obj\Debug\Test\testColor.o obj\Debug\segment.o
    
    Debug:testPNG.exe testGraph.exe segment.exe testMeanShift.exe
    
    	testPNG.exe  :$(OBJS_DEBUG)
    
    	@echo Building console executable bin\Debug\testPNG.exe
    	@mingw32-g++.exe -Llpng1240 -Lzlib123  -o bin\Debug\testPNG.exe $(OBJS_DEBUG)
    
    	testGraph.exe: $(OBJS_DEBUG)
    	@echo Building console executable bin\Debug\testGraph.exe
    	@mingw32-g++.exe -Llpng1240 -Lzlib123  -o bin\Debug\testGraph.exe $(OBJS_DEBUG)
    
    	segment.exe: $(OBJS_DEBUG)
    	@echo Building console executable bin\Debug\segment.exe
    	@mingw32-g++.exe -Llpng1240 -Lzlib123  -o bin\Debug\segment.exe $(OBJS_DEBUG)
    
    	testMeanShift.exe: $(OBJS_DEBUG)
    	@echo Building console executable bin\Debug\testMeanShift.exe
    	@mingw32-g++.exe -Llpng1240 -Lzlib123  -o bin\Debug\testMeanShift.exe $(OBJS_DEBUG)
    
    	testKMean.exe: $(OBJS_DEBUG)
    	@echo Building console executable bin\Debug\testKMean.exe
    	@mingw32-g++.exe -Llpng1240 -Lzlib123  -o bin\Debug\testKMean.exe $(OBJS_DEBUG)
    
    	testColor.exe: $(OBJS_DEBUG)
    	@echo Building console executable bin\Debug\testColor.exe
    	@mingw32-g++.exe -Llpng1240 -Lzlib123  -o bin\Debug\testColor.exe $(OBJS_DEBUG)
    
    	testFig.exe : $(OBJS_DEBUG)
    	@echo Building console executable bin\Debug\testFig.exe
    	@mingw32-g++.exe -Llpng1240 -Lzlib123  -o bin\Debug\testFig.exe  $(OBJS_DEBUG)
    
    obj\Debug\Color.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/Color.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\Color.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\Color.cpp" -o obj\Debug\Color.o
    
    obj\Debug\DisjointSet.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/DisjointSet.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\DisjointSet.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\DisjointSet.cpp" -o obj\Debug\DisjointSet.o
    
    obj\Debug\EPSWriter.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/EPSWriter.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\EPSWriter.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\EPSWriter.cpp" -o obj\Debug\EPSWriter.o
    
    obj\Debug\Edge.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/Edge.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\Edge.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\Edge.cpp" -o obj\Debug\Edge.o
    
    obj\Debug\FVector.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/FVector.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\FVector.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\FVector.cpp" -o obj\Debug\FVector.o
    
    obj\Debug\Filter.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/Filter.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\Filter.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\Filter.cpp" -o obj\Debug\Filter.o
    
    obj\Debug\Histogram.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/Histogram.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\Histogram.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\Histogram.cpp" -o obj\Debug\Histogram.o
    
    obj\Debug\Iterator.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/Iterator.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\Iterator.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\Iterator.cpp" -o obj\Debug\Iterator.o
    
    obj\Debug\KMean.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/KMean.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\KMean.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\KMean.cpp" -o obj\Debug\KMean.o
    
    obj\Debug\MeanShift.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/MeanShift.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\MeanShift.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\MeanShift.cpp" -o obj\Debug\MeanShift.o
    
    obj\Debug\Node.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/Node.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\Node.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\Node.cpp" -o obj\Debug\Node.o
    
    obj\Debug\PNG.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/PNG.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\PNG.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\PNG.cpp" -o obj\Debug\PNG.o
    
    obj\Debug\Pixel.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/Pixel.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\Pixel.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\Pixel.cpp" -o obj\Debug\Pixel.o
    
    obj\Debug\PixelMap.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/PixelMap.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\PixelMap.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\PixelMap.cpp" -o obj\Debug\PixelMap.o
    
    obj\Debug\Test\testColor.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/Test/testColor.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\Test\testColor.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\Test\testColor.cpp" -o obj\Debug\Test\testColor.o
    
    obj\Debug\segment.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/segment.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\segment.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\segment.cpp" -o obj\Debug\segment.o
    
    
    clean_Debug:
    	@echo Delete $(OBJS_DEBUG) bin\Debug\Temp.exe
    	-@del /f $(OBJS_DEBUG) bin\Debug\Temp.exe

    makefile1
    Code X : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    # version: 0.3.12.3
    
    # Project Variables start
    CPP=mingw32-g++.exe
    CC=mingw32-gcc.exe
    LD=mingw32-g++.exe
    LIB=ar.exe
    WINDRES=windres.exe
    # Project Variables end
    
    # Target: Debug
    
    OBJS_DEBUG=obj\Debug\Color.o obj\Debug\DisjointSet.o obj\Debug\EPSWriter.o obj\Debug\Edge.o obj\Debug\FVector.o obj\Debug\Filter.o obj\Debug\Histogram.o obj\Debug\Iterator.o obj\Debug\KMean.o obj\Debug\MeanShift.o obj\Debug\Node.o obj\Debug\PNG.o obj\Debug\Pixel.o obj\Debug\PixelMap.o obj\Debug\Test\testColor.o obj\Debug\segment.o
    
    Debug:testPNG.exe testGraph.exe segment.exe testMeanShift.exe
    
    	testPNG.exe  :$(OBJS_DEBUG)
    
    	@echo Building console executable bin\Debug\testPNG.exe
    	@mingw32-g++.exe -Llpng1240 -Lzlib123  -o bin\Debug\testPNG.exe $(OBJS_DEBUG)
    
    	testGraph.exe: $(OBJS_DEBUG)
    	@echo Building console executable bin\Debug\testGraph.exe
    	@mingw32-g++.exe -Llpng1240 -Lzlib123  -o bin\Debug\testGraph.exe $(OBJS_DEBUG)
    
    	segment.exe: $(OBJS_DEBUG)
    	@echo Building console executable bin\Debug\segment.exe
    	@mingw32-g++.exe -Llpng1240 -Lzlib123  -o bin\Debug\segment.exe $(OBJS_DEBUG)
    
    	testMeanShift.exe: $(OBJS_DEBUG)
    	@echo Building console executable bin\Debug\testMeanShift.exe
    	@mingw32-g++.exe -Llpng1240 -Lzlib123  -o bin\Debug\testMeanShift.exe $(OBJS_DEBUG)
    
    	testKMean.exe: $(OBJS_DEBUG)
    	@echo Building console executable bin\Debug\testKMean.exe
    	@mingw32-g++.exe -Llpng1240 -Lzlib123  -o bin\Debug\testKMean.exe $(OBJS_DEBUG)
    
    	testColor.exe: $(OBJS_DEBUG)
    	@echo Building console executable bin\Debug\testColor.exe
    	@mingw32-g++.exe -Llpng1240 -Lzlib123  -o bin\Debug\testColor.exe $(OBJS_DEBUG)
    
    	testFig.exe : $(OBJS_DEBUG)
    	@echo Building console executable bin\Debug\testFig.exe
    	@mingw32-g++.exe -Llpng1240 -Lzlib123  -o bin\Debug\testFig.exe  $(OBJS_DEBUG)
    
    obj\Debug\Color.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/Color.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\Color.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\Color.cpp" -o obj\Debug\Color.o
    
    obj\Debug\DisjointSet.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/DisjointSet.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\DisjointSet.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\DisjointSet.cpp" -o obj\Debug\DisjointSet.o
    
    obj\Debug\EPSWriter.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/EPSWriter.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\EPSWriter.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\EPSWriter.cpp" -o obj\Debug\EPSWriter.o
    
    obj\Debug\Edge.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/Edge.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\Edge.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\Edge.cpp" -o obj\Debug\Edge.o
    
    obj\Debug\FVector.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/FVector.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\FVector.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\FVector.cpp" -o obj\Debug\FVector.o
    
    obj\Debug\Filter.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/Filter.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\Filter.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\Filter.cpp" -o obj\Debug\Filter.o
    
    obj\Debug\Histogram.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/Histogram.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\Histogram.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\Histogram.cpp" -o obj\Debug\Histogram.o
    
    obj\Debug\Iterator.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/Iterator.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\Iterator.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\Iterator.cpp" -o obj\Debug\Iterator.o
    
    obj\Debug\KMean.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/KMean.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\KMean.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\KMean.cpp" -o obj\Debug\KMean.o
    
    obj\Debug\MeanShift.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/MeanShift.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\MeanShift.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\MeanShift.cpp" -o obj\Debug\MeanShift.o
    
    obj\Debug\Node.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/Node.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\Node.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\Node.cpp" -o obj\Debug\Node.o
    
    obj\Debug\PNG.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/PNG.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\PNG.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\PNG.cpp" -o obj\Debug\PNG.o
    
    obj\Debug\Pixel.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/Pixel.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\Pixel.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\Pixel.cpp" -o obj\Debug\Pixel.o
    
    obj\Debug\PixelMap.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/PixelMap.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\PixelMap.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\PixelMap.cpp" -o obj\Debug\PixelMap.o
    
    obj\Debug\Test\testColor.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/Test/testColor.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\Test\testColor.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\Test\testColor.cpp" -o obj\Debug\Test\testColor.o
    
    obj\Debug\segment.o: C:/Users/khelfa\ faiza\ zenak/Desktop/Temp/segment.cpp
    	@echo Compiling: "C:\Users\khelfa faiza zenak\Desktop\Temp\segment.cpp"
    	@mingw32-g++.exe -Wall -fexceptions  -g    -I"C:\Users\khelfa faiza zenak\Desktop\Temp\lpng1240" -I"C:\Users\khelfa faiza zenak\Desktop\Temp\zlib123"  -c "C:\Users\khelfa faiza zenak\Desktop\Temp\segment.cpp" -o obj\Debug\segment.o
    
    
    clean_Debug:
    	@echo Delete $(OBJS_DEBUG) bin\Debug\Temp.exe
    	-@del /f $(OBJS_DEBUG) bin\Debug\Temp.exe

  6. #6
    Membre expérimenté Avatar de Grulim
    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    234
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 234
    Par défaut
    En regardant le makefile, on peut raisonnablement penser qu'il n'y a pas plusieurs main() pour un même exécutable, mais bien plusieurs exécutables contenant un main() chacun.
    Donc le problème se réduit au multi-target dans le makefile qui "ne marche pas" , est-ce exact ?

    Quels message d'erreur affiche le make ?

  7. #7
    Membre averti
    Profil pro
    Inscrit en
    Janvier 2008
    Messages
    20
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Janvier 2008
    Messages : 20
    Par défaut
    merci pour formulation de mon problème;

    oui c'est juste et voila erreur


    C:\Users\.......\segment\Test\testFig.cpp|4|multiple definition of `main'|

    C:\Users\......\segment\Test\testColor.cpp|6|first defined here|ultiple definition of `main'|


  8. #8
    Membre expérimenté Avatar de Grulim
    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    234
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 234
    Par défaut
    Peut-on avoir le code de testFig.cpp et testColor.cpp ?

  9. #9
    Membre averti
    Profil pro
    Inscrit en
    Janvier 2008
    Messages
    20
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Janvier 2008
    Messages : 20
    Par défaut
    Citation Envoyé par Grulim Voir le message
    Peut-on avoir le code de testFig.cpp et testColor.cpp ?
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    // \file
    /// Programme de test des couleurs
    #include "../Color.hpp"
    #include "../PNG.hpp"
     
    main(){
     
    	vector<Color> colors;
     
    	colors.push_back(Color(0, 0, 0, true));
    	colors.push_back(Color(255, 0, 0, true));
    	colors.push_back(Color(255, 255, 0, true));
    	colors.push_back(Color(0, 255, 0, true));
    	colors.push_back(Color(0, 255, 255, true));
    	colors.push_back(Color(0, 0, 255, true));
    	colors.push_back(Color(255, 0, 255, true));
    	colors.push_back(Color(255, 255, 255, true));
    	colors.push_back(Color(128, 0, 0, true));
    	colors.push_back(Color(0, 128, 0, true));
     
    	cout << colors[0].toString() << endl;
    	cout << colors[1].toString() << endl;
    	cout << colors[2].toString() << endl;
    	cout << colors[3].toString() << endl;
    	cout << colors[4].toString() << endl;
    	cout << colors[5].toString() << endl;
    	cout << colors[6].toString() << endl;
    	cout << colors[7].toString() << endl;
    	cout << colors[8].toString() << endl;
    	cout << colors[9].toString() << endl;
    	cout << endl;
     
    /*
    	cout << "|c0 c1| " << c0.distance(c1) << endl;
    	cout << "|c1 c2| " << c1.distance(c2) << endl;
    	cout << "|c2 c3| " << c2.distance(c3) << endl;
    	cout << "|c3 c4| " << c3.distance(c4) << endl;
    	cout << "|c4 c5| " << c4.distance(c5) << endl;
    	cout << "|c5 c6| " << c5.distance(c6) << endl;
    	cout << "|c6 c7| " << c6.distance(c7) << endl;
    	cout << "|c7 c0| " << c7.distance(c0) << endl;
    	cout << endl;
    */
    {
    	PNG out(100, 100, PNG_COLOR, "color.png");
    	int ndx = 0;
    	for(int i = 0; i < 100; i += 10){
    		for(int j = 0; j < 100; j += 10){
    			ndx = ndx % 10;
    			for(int a = 0; a < 10; a++){
    				for(int b = 0; b < 10; b++){
    					int x = i + a;
    					int y = j + b;
    					out.setColor(x, y, colors[ndx]);
    				}
    			}
    			ndx++;
    		}
    	}
    	out.write();
    }
    	for(int i = 0; i < 10; i++){
    		colors[i] = Color(colors[i].getHue(), colors[i].getSaturation(), colors[i].getValue(), false);
    	}
    {
    	PNG out(100, 100, PNG_COLOR, "hehehe.png");
    	int ndx = 0;
    	for(int i = 0; i < 100; i += 10){
    		for(int j = 0; j < 100; j += 10){
    			ndx = ndx % 10;
    			for(int a = 0; a < 10; a++){
    				for(int b = 0; b < 10; b++){
    					int x = i + a;
    					int y = j + b;
    					out.setColor(x, y, colors[ndx]);
    				}
    			}
    			ndx++;
    		}
    	}
    	out.write();
    }
     
    /*
    {
    	PNG out(100, 100, PNG_COLOR, "hehe.png");
    	int ndx = 0;
    	for(int i = 0; i < 100; i += 10){
    		for(int j = 0; j < 100; j += 10){
    			ndx = ndx % 10;
    			int ndx1 = (ndx < 9 ? ndx + 1 : 0);
    			Color c1 = colors[ndx];
    			Color c2 = colors[ndx1];
    			float h = c1.getHue() + c2.getHue();
    			float s = c1.getSaturation() + c2.getSaturation();
    			float v = c1.getValue() + c2.getValue();
    			h = (h > 1 ? h - 1 : h);
    			h /= 2.0;
    			s /= 2.0;
    			v /= 2.0;
    			Color c(h, s, v, false);
    			cout << "----->" << endl;
    			cout << c1.toString() << endl;
    			cout << c2.toString() << endl;
    			cout << c.toString() << endl;
    			cout << "<-----" << endl;
    			for(int a = 0; a < 10; a++){
    				for(int b = 0; b < 10; b++){
    					int x = i + a;
    					int y = j + b;
    					out.setColor(x, y, c);
    				}
    			}
    			ndx++;
    		}
    	}
    	out.write();
    }
    */
     
     
     
    }

  10. #10
    Membre expérimenté Avatar de Grulim
    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    234
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 234
    Par défaut
    Je ne suis pas un connaisseur des makefiles, mais je ne vois pas ou est la règle permettant de compiler testFig.cpp .
    L'erreur semble indiquer que testFig.cpp et testColor.cpp sont compilés et liés dans le même exécutable, or les 2 contiennent une fonction main(), ce qui est une erreur.
    D'ailleurs, testColor.cpp est toujours compilé (cf OBJS_DEBUG) et donc posera le même problème à tout les autres modules de test.

    En parlant de main(), elle n'est pas correctement déclarée, ce devrait être ou De plus, tu sembles placer des using namespace std; dans les .hpp, cela me semble dangereux, il vaut mieux les mettre dans les .cpp.

    En tout cas, ce code ne peut pas compiler en l'état actuel, linux ou pas !

  11. #11
    Membre averti
    Profil pro
    Inscrit en
    Janvier 2008
    Messages
    20
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Janvier 2008
    Messages : 20
    Par défaut
    Citation Envoyé par Grulim Voir le message
    Je ne suis pas un connaisseur des makefiles, mais je ne vois pas ou est la règle permettant de compiler testFig.cpp .
    L'erreur semble indiquer que testFig.cpp et testColor.cpp sont compilés et liés dans le même exécutable, or les 2 contiennent une fonction main(), ce qui est une erreur.
    D'ailleurs, testColor.cpp est toujours compilé (cf OBJS_DEBUG) et donc posera le même problème à tout les autres modules de test.

    En parlant de main(), elle n'est pas correctement déclarée, ce devrait être ou De plus, tu sembles placer des using namespace std; dans les .hpp, cela me semble dangereux, il vaut mieux les mettre dans les .cpp.

    En tout cas, ce code ne peut pas compiler en l'état actuel, linux ou pas !
    mais le problème j'ai exécuter sur Linux et tout passe bien

  12. #12
    Membre expérimenté Avatar de Grulim
    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    234
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 234
    Par défaut
    pour la déclaration correcte de main() en C++ voir ici

    Pour le reste... un programme C++ ne peut avoir 2 fonctions main() définies et bien compiler... c'est pô possible.

    Es-tu sur que c'est le même make utilisé sous Linux et sous Windows ?
    Es-tu sur que tout se "passe bien" : après l'exécution du make, un nouvel exécutable est-il vraiment créé ?
    Arrives-tu à le lancer ?

    Si toutes les réponses à ces questions sont oui, alors je ne peux pas t'aider !

  13. #13
    Membre averti
    Profil pro
    Inscrit en
    Janvier 2008
    Messages
    20
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Janvier 2008
    Messages : 20
    Par défaut
    Citation Envoyé par Grulim Voir le message
    pour la déclaration correcte de main() en C++ voir ici

    Pour le reste... un programme C++ ne peut avoir 2 fonctions main() définies et bien compiler... c'est pô possible.

    Es-tu sur que c'est le même make utilisé sous Linux et sous Windows ?
    Es-tu sur que tout se "passe bien" : après l'exécution du make, un nouvel exécutable est-il vraiment créé ?
    Arrives-tu à le lancer ?

    Si toutes les réponses à ces questions sont oui, alors je ne peux pas t'aider !
    justement non il l'arrive pas a crée des exécutable il compile tout les fichier ,
    sans crée des exécutable pour makefile de linux il mache bien mais de
    Windows non il prend pas le chemin de lib http://www.developpez.net/forums/d55...opre-makefile/

  14. #14
    Membre expérimenté Avatar de Grulim
    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    234
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2004
    Messages : 234
    Par défaut
    Citation Envoyé par faiza2008 Voir le message
    justement non il l'arrive pas a crée des exécutable il compile tout les fichier ,
    sans crée des exécutable pour makefile de linux il mache bien mais de
    Windows non il prend pas le chemin de lib http://www.developpez.net/forums/d55...opre-makefile/
    Sous linux, un nouvel exécutable est-il créé ? sans aucune erreur ?

  15. #15
    Membre averti
    Profil pro
    Inscrit en
    Janvier 2008
    Messages
    20
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Janvier 2008
    Messages : 20
    Par défaut
    Citation Envoyé par Grulim Voir le message
    Sous linux, un nouvel exécutable est-il créé ? sans aucune erreur ?
    oui sans aucune erreur ....

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Problème Makefile (gmake) sous windows XP
    Par JNo78 dans le forum Systèmes de compilation
    Réponses: 1
    Dernier message: 27/03/2012, 21h55
  2. Pb MakeFile sous windows
    Par qadassi dans le forum Débuter
    Réponses: 3
    Dernier message: 06/01/2009, 16h41
  3. Makefile sous Windows
    Par Alfred12 dans le forum Systèmes de compilation
    Réponses: 0
    Dernier message: 08/08/2008, 09h15
  4. Réponses: 1
    Dernier message: 27/03/2008, 10h02
  5. utilisation d'un makefile sous windows
    Par semenzato dans le forum Windows
    Réponses: 1
    Dernier message: 30/08/2005, 10h29

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo