Re: lignes d'un fichier en C ou C++

トップ ページ

このメッセージに返信
著者: anne.guilde@free.fr
日付:  
To: guilde
題目: Re: lignes d'un fichier en C ou C++
Le 04/04/2018 à 10:41, Jérôme Villafruela a écrit :
> Le 04/04/2018 à 09:25, anne.guilde@??? a écrit :
>>
>> ...
>>
>> libtag.a que je ne trouve pas sur le net, c'est une archive?
>>
>> Ce que l'on m'a dit
>> certaine librairie statique sont fournies dans les paquets -dev. Et
>> quand on les utilise cela veut dire que les fonctions nécessaires au
>> programmes sont extraites de l'archive (.a) et incluses dans le
>> programme. Pour cela il faut passer le drapeau -static à gcc (dans ce
>> cas tous les lib nécessaires sont compilés en statiques).
>>
>> Pour faire une archive .a, on compile chaque fonction séparément pour
>> faire des .o, puis on met toutes ces fonctions dans l'archive à l'aide
>> de du programme « ar ».
>>
>> J'ai trouvé cela
>> http://taglib.org/
>>
>> Si quelqu'un a une idée pour faire le libtag.a
>>
>
> Sur le site de VVV l'auteur a indiqué la procédure de build :
> http://vvvapp.sourceforge.net/how_to_compile_vvv.html . La procédure de
> build de taglib est indiquée dans son code source :
> https://github.com/taglib/taglib/blob/master/INSTALL.md
>


Encore merci

# cd taglib-1.11.1

Je suis dans le dossier des sources de taglib

# cmake -DBUILD_STATIC_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr/local .
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of long long
-- Check size of long long - done
-- Check size of wchar_t
-- Check size of wchar_t - done
-- Check size of float
-- Check size of float - done
-- Check size of double
-- Check size of double - done
-- Boost version: 1.62.0
-- Performing Test HAVE_STD_ATOMIC
-- Performing Test HAVE_STD_ATOMIC - Success
-- Performing Test HAVE_BOOST_BYTESWAP
-- Performing Test HAVE_BOOST_BYTESWAP - Success
-- Performing Test HAVE_VSNPRINTF
-- Performing Test HAVE_VSNPRINTF - Success
-- Performing Test HAVE_ISO_STRDUP
-- Performing Test HAVE_ISO_STRDUP - Failed
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
-- Looking for __RTTI___ in Crun
-- Looking for __RTTI___ in Crun - not found
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:

     BUILD_STATIC_LIBS



-- Build files have been written to:
/home/anne/sda1/anne/Documents/anne/linux/vvv-1/taglib-1.11.1

----

# make
Scanning dependencies of target tag
[  0%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/mpegfile.cpp.o
[  1%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/mpegproperties.cpp.o
[  2%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/mpegheader.cpp.o
[  3%] Building CXX object taglib/CMakeFiles/tag.dir/mpeg/xingheader.cpp.o
[  4%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v1/id3v1tag.cpp.o
[  5%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v1/id3v1genres.cpp.o
[  6%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/id3v2framefactory.cpp.o
[  7%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/id3v2synchdata.cpp.o
[  8%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/id3v2tag.cpp.o
[  9%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/id3v2header.cpp.o
[ 10%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/id3v2frame.cpp.o
[ 11%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/id3v2footer.cpp.o
[ 12%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/id3v2extendedheader.cpp.o
[ 13%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/attachedpictureframe.cpp.o
[ 14%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/commentsframe.cpp.o
[ 15%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/eventtimingcodesframe.cpp.o
[ 16%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/generalencapsulatedobjectframe.cpp.o
[ 16%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/ownershipframe.cpp.o
[ 17%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/popularimeterframe.cpp.o
[ 18%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/privateframe.cpp.o
[ 19%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/relativevolumeframe.cpp.o
[ 20%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/synchronizedlyricsframe.cpp.o
[ 21%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/textidentificationframe.cpp.o
[ 22%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/uniquefileidentifierframe.cpp.o
[ 23%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/unknownframe.cpp.o
[ 24%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/unsynchronizedlyricsframe.cpp.o
[ 25%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/urllinkframe.cpp.o
[ 26%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/chapterframe.cpp.o
[ 27%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/tableofcontentsframe.cpp.o
[ 28%] Building CXX object 
taglib/CMakeFiles/tag.dir/mpeg/id3v2/frames/podcastframe.cpp.o
[ 29%] Building CXX object taglib/CMakeFiles/tag.dir/ogg/oggfile.cpp.o
[ 30%] Building CXX object taglib/CMakeFiles/tag.dir/ogg/oggpage.cpp.o
[ 31%] Building CXX object taglib/CMakeFiles/tag.dir/ogg/oggpageheader.cpp.o
[ 32%] Building CXX object taglib/CMakeFiles/tag.dir/ogg/xiphcomment.cpp.o
[ 33%] Building CXX object 
taglib/CMakeFiles/tag.dir/ogg/vorbis/vorbisfile.cpp.o
[ 33%] Building CXX object 
taglib/CMakeFiles/tag.dir/ogg/vorbis/vorbisproperties.cpp.o
[ 34%] Building CXX object 
taglib/CMakeFiles/tag.dir/ogg/flac/oggflacfile.cpp.o
[ 35%] Building CXX object taglib/CMakeFiles/tag.dir/mpc/mpcfile.cpp.o
[ 36%] Building CXX object taglib/CMakeFiles/tag.dir/mpc/mpcproperties.cpp.o
[ 37%] Building CXX object taglib/CMakeFiles/tag.dir/ape/apetag.cpp.o
[ 38%] Building CXX object taglib/CMakeFiles/tag.dir/ape/apefooter.cpp.o
[ 39%] Building CXX object taglib/CMakeFiles/tag.dir/ape/apeitem.cpp.o
[ 40%] Building CXX object taglib/CMakeFiles/tag.dir/ape/apefile.cpp.o
[ 41%] Building CXX object taglib/CMakeFiles/tag.dir/ape/apeproperties.cpp.o
[ 42%] Building CXX object taglib/CMakeFiles/tag.dir/toolkit/tstring.cpp.o
[ 43%] Building CXX object 
taglib/CMakeFiles/tag.dir/toolkit/tstringlist.cpp.o
[ 44%] Building CXX object 
taglib/CMakeFiles/tag.dir/toolkit/tbytevector.cpp.o
[ 45%] Building CXX object 
taglib/CMakeFiles/tag.dir/toolkit/tbytevectorlist.cpp.o
[ 46%] Building CXX object 
taglib/CMakeFiles/tag.dir/toolkit/tbytevectorstream.cpp.o
[ 47%] Building CXX object taglib/CMakeFiles/tag.dir/toolkit/tiostream.cpp.o
[ 48%] Building CXX object taglib/CMakeFiles/tag.dir/toolkit/tfile.cpp.o
[ 49%] Building CXX object 
taglib/CMakeFiles/tag.dir/toolkit/tfilestream.cpp.o
[ 50%] Building CXX object taglib/CMakeFiles/tag.dir/toolkit/tdebug.cpp.o
[ 50%] Building CXX object 
taglib/CMakeFiles/tag.dir/toolkit/tpropertymap.cpp.o
[ 51%] Building CXX object 
taglib/CMakeFiles/tag.dir/toolkit/trefcounter.cpp.o
[ 52%] Building CXX object 
taglib/CMakeFiles/tag.dir/toolkit/tdebuglistener.cpp.o
[ 53%] Building CXX object taglib/CMakeFiles/tag.dir/toolkit/tzlib.cpp.o
[ 54%] Building CXX object taglib/CMakeFiles/tag.dir/flac/flacfile.cpp.o
[ 55%] Building CXX object taglib/CMakeFiles/tag.dir/flac/flacpicture.cpp.o
[ 56%] Building CXX object 
taglib/CMakeFiles/tag.dir/flac/flacproperties.cpp.o
[ 57%] Building CXX object 
taglib/CMakeFiles/tag.dir/flac/flacmetadatablock.cpp.o
[ 58%] Building CXX object 
taglib/CMakeFiles/tag.dir/flac/flacunknownmetadatablock.cpp.o
[ 59%] Building CXX object 
taglib/CMakeFiles/tag.dir/wavpack/wavpackfile.cpp.o
[ 60%] Building CXX object 
taglib/CMakeFiles/tag.dir/wavpack/wavpackproperties.cpp.o
[ 61%] Building CXX object 
taglib/CMakeFiles/tag.dir/ogg/speex/speexfile.cpp.o
[ 62%] Building CXX object 
taglib/CMakeFiles/tag.dir/ogg/speex/speexproperties.cpp.o
[ 63%] Building CXX object 
taglib/CMakeFiles/tag.dir/trueaudio/trueaudiofile.cpp.o
[ 64%] Building CXX object 
taglib/CMakeFiles/tag.dir/trueaudio/trueaudioproperties.cpp.o
[ 65%] Building CXX object taglib/CMakeFiles/tag.dir/riff/rifffile.cpp.o
[ 66%] Building CXX object 
taglib/CMakeFiles/tag.dir/riff/aiff/aifffile.cpp.o
[ 66%] Building CXX object 
taglib/CMakeFiles/tag.dir/riff/aiff/aiffproperties.cpp.o
[ 67%] Building CXX object taglib/CMakeFiles/tag.dir/riff/wav/wavfile.cpp.o
[ 68%] Building CXX object 
taglib/CMakeFiles/tag.dir/riff/wav/wavproperties.cpp.o
[ 69%] Building CXX object taglib/CMakeFiles/tag.dir/riff/wav/infotag.cpp.o
[ 70%] Building CXX object taglib/CMakeFiles/tag.dir/asf/asftag.cpp.o
[ 71%] Building CXX object taglib/CMakeFiles/tag.dir/asf/asffile.cpp.o
[ 72%] Building CXX object taglib/CMakeFiles/tag.dir/asf/asfproperties.cpp.o
[ 73%] Building CXX object taglib/CMakeFiles/tag.dir/asf/asfattribute.cpp.o
[ 74%] Building CXX object taglib/CMakeFiles/tag.dir/asf/asfpicture.cpp.o
[ 75%] Building CXX object taglib/CMakeFiles/tag.dir/mp4/mp4file.cpp.o
[ 76%] Building CXX object taglib/CMakeFiles/tag.dir/mp4/mp4atom.cpp.o
[ 77%] Building CXX object taglib/CMakeFiles/tag.dir/mp4/mp4tag.cpp.o
[ 78%] Building CXX object taglib/CMakeFiles/tag.dir/mp4/mp4item.cpp.o
[ 79%] Building CXX object taglib/CMakeFiles/tag.dir/mp4/mp4properties.cpp.o
[ 80%] Building CXX object taglib/CMakeFiles/tag.dir/mp4/mp4coverart.cpp.o
[ 81%] Building CXX object taglib/CMakeFiles/tag.dir/mod/modfilebase.cpp.o
[ 82%] Building CXX object taglib/CMakeFiles/tag.dir/mod/modfile.cpp.o
[ 83%] Building CXX object taglib/CMakeFiles/tag.dir/mod/modtag.cpp.o
[ 83%] Building CXX object taglib/CMakeFiles/tag.dir/mod/modproperties.cpp.o
[ 84%] Building CXX object taglib/CMakeFiles/tag.dir/s3m/s3mfile.cpp.o
[ 85%] Building CXX object taglib/CMakeFiles/tag.dir/s3m/s3mproperties.cpp.o
[ 86%] Building CXX object taglib/CMakeFiles/tag.dir/it/itfile.cpp.o
[ 87%] Building CXX object taglib/CMakeFiles/tag.dir/it/itproperties.cpp.o
[ 88%] Building CXX object taglib/CMakeFiles/tag.dir/xm/xmfile.cpp.o
[ 89%] Building CXX object taglib/CMakeFiles/tag.dir/xm/xmproperties.cpp.o
[ 90%] Building CXX object taglib/CMakeFiles/tag.dir/ogg/opus/opusfile.cpp.o
[ 91%] Building CXX object 
taglib/CMakeFiles/tag.dir/ogg/opus/opusproperties.cpp.o
[ 92%] Building CXX object taglib/CMakeFiles/tag.dir/toolkit/unicode.cpp.o
[ 93%] Building CXX object taglib/CMakeFiles/tag.dir/tag.cpp.o
[ 94%] Building CXX object taglib/CMakeFiles/tag.dir/tagunion.cpp.o
[ 95%] Building CXX object taglib/CMakeFiles/tag.dir/fileref.cpp.o
In file included from 
/home/anne/sda1/anne/Documents/anne/linux/vvv-1/taglib-1.11.1/taglib/toolkit/tlist.h:263:0,
                  from 
/home/anne/sda1/anne/Documents/anne/linux/vvv-1/taglib-1.11.1/taglib/toolkit/tstringlist.h:30,
                  from 
/home/anne/sda1/anne/Documents/anne/linux/vvv-1/taglib-1.11.1/taglib/fileref.h:30,
                  from 
/home/anne/sda1/anne/Documents/anne/linux/vvv-1/taglib-1.11.1/taglib/fileref.cpp:35:
/home/anne/sda1/anne/Documents/anne/linux/vvv-1/taglib-1.11.1/taglib/toolkit/tlist.tcc: 
In instantiation of ‘void TagLib::List<T>::ListPrivate<TP*>::clear() 
[with TP = const TagLib::FileRef::FileTypeResolver; T = const 
TagLib::FileRef::FileTypeResolver*]’:
/home/anne/sda1/anne/Documents/anne/linux/vvv-1/taglib-1.11.1/taglib/toolkit/tlist.tcc:74:10: 
   required from ‘TagLib::List<T>::ListPrivate<TP*>::~ListPrivate() 
[with TP = const TagLib::FileRef::FileTypeResolver; T = const 
TagLib::FileRef::FileTypeResolver*]’
/home/anne/sda1/anne/Documents/anne/linux/vvv-1/taglib-1.11.1/taglib/toolkit/tlist.tcc:107:5: 
   required from ‘TagLib::List<T>::~List() [with T = const 
TagLib::FileRef::FileTypeResolver*]’
/home/anne/sda1/anne/Documents/anne/linux/vvv-1/taglib-1.11.1/taglib/fileref.cpp:343:1: 
   required from here
/home/anne/sda1/anne/Documents/anne/linux/vvv-1/taglib-1.11.1/taglib/toolkit/tlist.tcc:80:9: 
warning: deleting object of abstract class type 
‘TagLib::FileRef::FileTypeResolver’ which has non-virtual destructor 
will cause undefined behavior [-Wdelete-non-virtual-dtor]
          delete *it;
          ^~~~~~
[ 96%] Building CXX object taglib/CMakeFiles/tag.dir/audioproperties.cpp.o
[ 97%] Building CXX object taglib/CMakeFiles/tag.dir/tagutils.cpp.o
[ 98%] Linking CXX static library libtag.a
[ 98%] Built target tag
Scanning dependencies of target tag_c
[ 99%] Building CXX object bindings/c/CMakeFiles/tag_c.dir/tag_c.cpp.o
[100%] Linking CXX static library libtag_c.a
[100%] Built target tag_c


----

Pour l'instant, je n'ose pas faire la commande # make install

J'ai bien mon fichier
# updatedb
# locate libtag.a
/home/anne/sda1/anne/Documents/anne/linux/vvv-1/taglib-1.11.1/taglib/libtag.a

Quand j'ai fait la commande
# cmake -DBUILD_STATIC_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr/local
J'ai mis les bonnes options ou faut-il ajouter une option?

Merci
Anne