Compiling SongSigDemo

Help
2001-03-30
2013-03-21
  • Simon Labrecque

    Simon Labrecque - 2001-03-30

    Hi,

       I'm having troubles compiling SongSigDemo from songprint-1.2. All the projects compiles all right, but the build fails when the linker is called. Here are the errors I get:
    ------------------------
    Linking...
    SSDAddSongsThread.obj : error LNK2005: "void *  mpg123_pinfo" (?mpg123_pinfo@@3PAXA) already defined in SongSigDemo.obj
    SSDDocument.obj : error LNK2005: "void *  mpg123_pinfo" (?mpg123_pinfo@@3PAXA) already defined in SongSigDemo.obj
    SSDMainFrame.obj : error LNK2005: "void *  mpg123_pinfo" (?mpg123_pinfo@@3PAXA) already defined in SongSigDemo.obj
    SSDSongListView.obj : error LNK2005: "void *  mpg123_pinfo" (?mpg123_pinfo@@3PAXA) already defined in SongSigDemo.obj
    SSDSongSigThread.obj : error LNK2005: "void *  mpg123_pinfo" (?mpg123_pinfo@@3PAXA) already defined in SongSigDemo.obj
    msvcrt.lib(MSVCRT.dll) : error LNK2005: _fprintf already defined in libcmtd.lib(fprintf.obj)
    msvcrt.lib(MSVCRT.dll) : error LNK2005: _sprintf already defined in libcmtd.lib(sprintf.obj)
    msvcrt.lib(MSVCRT.dll) : error LNK2005: __isctype already defined in libcmtd.lib(isctype.obj)
    msvcrt.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in libcmtd.lib(dbgheap.obj)
    msvcrt.lib(MSVCRT.dll) : error LNK2005: _free already defined in libcmtd.lib(dbgheap.obj)
    msvcrt.lib(MSVCRT.dll) : error LNK2005: _exit already defined in libcmtd.lib(crt0dat.obj)
    msvcrt.lib(MSVCRT.dll) : error LNK2005: _fflush already defined in libcmtd.lib(fflush.obj)
    SSDAddSongsThread.obj : warning LNK4006: "void *  mpg123_pinfo" (?mpg123_pinfo@@3PAXA) already defined in SongSigDemo.obj; second definition ignored
    SSDDocument.obj : warning LNK4006: "void *  mpg123_pinfo" (?mpg123_pinfo@@3PAXA) already defined in SongSigDemo.obj; second definition ignored
    SSDMainFrame.obj : warning LNK4006: "void *  mpg123_pinfo" (?mpg123_pinfo@@3PAXA) already defined in SongSigDemo.obj; second definition ignored
    SSDSongListView.obj : warning LNK4006: "void *  mpg123_pinfo" (?mpg123_pinfo@@3PAXA) already defined in SongSigDemo.obj; second definition ignored
    SSDSongSigThread.obj : warning LNK4006: "void *  mpg123_pinfo" (?mpg123_pinfo@@3PAXA) already defined in SongSigDemo.obj; second definition ignored
    msvcrt.lib(MSVCRT.dll) : warning LNK4006: _fprintf already defined in libcmtd.lib(fprintf.obj); second definition ignored
    msvcrt.lib(MSVCRT.dll) : warning LNK4006: _sprintf already defined in libcmtd.lib(sprintf.obj); second definition ignored
    msvcrt.lib(MSVCRT.dll) : warning LNK4006: __isctype already defined in libcmtd.lib(isctype.obj); second definition ignored
    msvcrt.lib(MSVCRT.dll) : warning LNK4006: _malloc already defined in libcmtd.lib(dbgheap.obj); second definition ignored
    msvcrt.lib(MSVCRT.dll) : warning LNK4006: _free already defined in libcmtd.lib(dbgheap.obj); second definition ignored
    msvcrt.lib(MSVCRT.dll) : warning LNK4006: _exit already defined in libcmtd.lib(crt0dat.obj); second definition ignored
    msvcrt.lib(MSVCRT.dll) : warning LNK4006: _fflush already defined in libcmtd.lib(fflush.obj); second definition ignored
       Creating library Debug/SongSigDemo.lib and object Debug/SongSigDemo.exp
    libcmtd.lib(crt0init.obj) : warning LNK4098: defaultlib "msvcrt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
    Debug/SongSigDemo.exe : fatal error LNK1169: one or more multiply defined symbols found
    Error executing link.exe.

    SongSigDemo.exe - 13 error(s), 13 warning(s)
    -------------------------
    I have no clue why I'm getting those errors... could this happen because of the Code Generation option? All the projects are set to Debug Single-Threaded but SongSigDemo, which is set to Debug Multithreaded (I remember having troubles in the past when they weren't all the same...)

    I would like to be able to build the demo myself, but if some of you guys have a working .exe, please point me to it. Thanks in advance!

     
    • Kastellanos Nikos

      Comment out the line "void * mpg123_pinfo".
      This is a pointer(?) defined in a header file, (mpglib.h ?) but never used.

      As about the libcmtd.lib, it's a settings problem.
      Make sure all your projects link with the same version of crt. Check out for Single-Threaded / Multithreaded, Release/Debug, Static/Dynamic.

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks