Bonjour,
Je programme depuis un certain temps et je voudrais pourvoir créer mes propres paquets sources, et ainssi pouvoir créer des fichiers .deb pour installer mes programmes.
J'ai donc lu ce tuto : http://seul.org/docs/autotut/.
J'ai réalisé un test mais j'ai des erreurs au moment de la compilation (make).
Voici mes fichiers :
Makefile.am
configure.in
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 AUTOMAKE_OPTIONS = gnu bin_PROGRAMS = hello hello_SOURCES = main.cpp
main.cpp
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 AC_INIT(main.cpp) AM_INIT_AUTOMAKE(hello,0.1) dnl find and test the C++ compiler AC_PROG_CXX AC_LANG_CPLUSPLUS AC_PROG_INSTALL AC_PROG_MAKE_SET AC_OUTPUT(Makefile)
Les commandes :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 #include <iostream> int main() { std::cout << "Hello world!" << std::endl; return 0; }
- aclocal
- autoconf
- automake
- ./configure
- make
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 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... yes checking for g++... g++ checking for C++ compiler default output file name... a.out checking whether the C++ compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for style of include used by make... GNU checking dependency style of g++... none checking for a BSD-compatible install... /usr/bin/install -c checking whether make sets $(MAKE)... (cached) yes configure: creating ./config.status config.status: creating Makefile config.status: executing depfiles commands
C'est très bizarre, car lorsque je tape les commandent donnés par le Makefile, ça marche ;
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 source='main.cpp' object='main.o' libtool=no \ DEPDIR=.deps depmode=none /bin/bash ./depcomp \ g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"hello\" -DVERSION=\"0.1\" -I. -I. -g -O2 -c -o main.o main.cpp g++ -g -O2 -o hello main.o g++: main.o : Aucun fichier ou dossier de ce type g++: pas de fichier à l'entrée make: *** [hello] Erreur 1
Pouvez vous m'aider ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 source='main.cpp' object='main.o' libtool=no \ DEPDIR=.deps depmode=none /bin/bash ./depcomp \ g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"hello\" -DVERSION=\"0.1\" -I. -I. -g -O2 -c -o main.o main.cpp g++ -g -O2 -o hello main.o ./hello Hello world!
Partager