compiletime errors

Help
hollunder
2009-06-29
2013-04-24
  • hollunder

    hollunder - 2009-06-29

    I get some errors with gcc 4.4:

    g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"smasher\" -DVERSION=\"1.0.6\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_SNDFILE=1 -I.   -Wall -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__  -march=native -O2 -pipe -Wall -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -MT samplemath.o -MD -MP -MF .deps/samplemath.Tpo -c -o samplemath.o samplemath.cpp
    samplemath.cpp: In static member function ‘static double SampleMath::getGradient(std::vector<std::pair<double, double>, std::allocator<std::pair<double, double> > >&)’:
    samplemath.cpp:131: error: ‘stderr’ was not declared in this scope
    samplemath.cpp:131: error: ‘fprintf’ was not declared in this scope
    samplemath.cpp:132: error: ‘fflush’ was not declared in this scope
    samplemath.cpp:159: error: ‘stderr’ was not declared in this scope
    samplemath.cpp:159: error: ‘fprintf’ was not declared in this scope
    samplemath.cpp:160: error: ‘fflush’ was not declared in this scope
    make[1]: *** [samplemath.o] Error 1
    make[1]: Leaving directory `/home/hollunder/handbuild/src/smasher-1.0.6/src'
    make: *** [all-recursive] Error 1

    Possibly helpful links:
    http://gcc.gnu.org/gcc-4.4/porting_to.html
    http://gcc.gnu.org/gcc-4.3/porting_to.html

     
    • e loeliger

      e loeliger - 2009-06-29

      thanks hollunder,

      we've switched to 4.4 now so this will be fixed from the next release / subversion update.

      cheers,
      esther

       
    • hollunder

      hollunder - 2009-06-29

      Thanks for the fast reply/fix.

       
    • hollunder

      hollunder - 2009-07-02

      some new gcc 4.4 error:

      smasherMain.h:57: error: ISO C++ forbids declaration of ‘wxMediaCtrl’ with no type
      smasherMain.h:57: error: expected ‘;’ before ‘*’ token
      smasherMain.h:58: error: ISO C++ forbids declaration of ‘wxMediaCtrl’ with no type
      smasherMain.h:58: error: expected ‘;’ before ‘*’ token
      smasherMain.h:135: error: ISO C++ forbids declaration of ‘wxMediaCtrl’ with no type
      smasherMain.h:135: error: expected ‘;’ before ‘*’ token
      smasherMain.h:204: error: ‘wxMediaEvent’ has not been declared
      smasherMain.h:205: error: ‘wxMediaEvent’ has not been declared
      smasherMain.h:206: error: ‘wxMediaEvent’ has not been declared
      make[1]: *** [settingsbook.o] Error 1
      make[1]: Leaving directory `/home/hollunder/handbuild/smasher-1.0.7/src'
      make: *** [all-recursive] Error 1

       
    • e loeliger

      e loeliger - 2009-07-04

      very strange - i don't get this error compiling with msys/gcc4.4 on windows. (have kept the ubuntu gcc default so far. wonder why they haven't adopted 4.4?)

      one thing would help - could you let me have details of your distro and perhaps the output of wx-config on your system?

      best,
      esther

       
      • hollunder

        hollunder - 2009-07-07

        Ubuntu keeps a version of any application until the next release. They only patch until then, so ubuntu won't have 4.4 until october or april.

        I'm using Arch Linux,
        wxgtk 2.8.10.1

        what wx-config output do you need?

         
    • e loeliger

      e loeliger - 2009-07-09

      hmmm. still can't seem to work out what's going wrong. I'd really need to install 4.4. to see this for myself.

      Had in mind wx-config --libs std just to be able to eliminate the wxGTK installation from the list of suspects.

      Are you using a static or dynamic build?

      Esther

       
    • hollunder

      hollunder - 2009-07-09

      wx-config --libs std
      -pthread   -lwx_gtk2u_richtext-2.8 -lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8 -lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8 -lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8

      This is wxgtk's configure line:
      ./configure --prefix=/usr --libdir=/usr/lib --with-gtk=2 --with-opengl --enable-unicode --enable-graphics_ctx --with-gnomeprint --disable-optimize

       
      • e loeliger

        e loeliger - 2009-07-09

        the list of libraries is fine. i need to install 4.4 on ubuntu and see what's going on. sorry about this!
        -esther

         
    • hollunder

      hollunder - 2009-07-09

      Thanks for looking into this. From searching the error it seems it could be a couple of strange issues, from coding errors to dependency problems. Good luck.

       
    • mick henson

      mick henson - 2009-07-14

      rebuild wxgtk with  --enable-mediactrl works for me.

       
      • e loeliger

        e loeliger - 2009-07-17

        thanks, mickski56,
        i've updated the instructions in INSTALL.
        best,
        esther

         
    • hollunder

      hollunder - 2009-07-14

      yeah, seems like this has helped but I don't know if I can get my distro to compile with that since it causes at very least an additional dependency on gstreamer.

      It didn't compile through anyway:
      g++ -DPACKAGE_NAME=\&quot;\&quot; -DPACKAGE_TARNAME=\&quot;\&quot; -DPACKAGE_VERSION=\&quot;\&quot; -DPACKAGE_STRING=\&quot;\&quot; -DPACKAGE_BUGREPORT=\&quot;\&quot; -DPACKAGE=\&quot;smasher\&quot; -DVERSION=\&quot;1.0.8\&quot; -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\&quot;.libs/\&quot; -DHAVE_SNDFILE=1 -I.   -Wall -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__  -g -O2 -Wall -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -MT replace.o -MD -MP -MF .deps/replace.Tpo -c -o replace.o replace.cpp
      replace.cpp: In static member function ‘static int Replace::run(std::string&, const std::string&, const std::string&, bool)’:
      replace.cpp:17: error: ‘BUFSIZ’ was not declared in this scope
      make[1]: *** [replace.o] Error 1
      make[1]: Leaving directory `/home/hollunder/builds/handbuild/smasher-1.0.8/src'
      make: *** [all-recursive] Error 1

       
  • ciembor

    ciembor - 2009-11-04

    I were trying to build it on my x86_64 and…

        enter code hereMaking all in src
    make: Wejście do katalogu `/var/abs/local/smasher/src/smasher-1.1.6/src'
    g++ -DPACKAGE_NAME=\&amp;quot;\&amp;quot; -DPACKAGE_TARNAME=\&amp;quot;\&amp;quot; -DPACKAGE_VERSION=\&amp;quot;\&amp;quot; -DPACKAGE_STRING=\&amp;quot;\&amp;quot; -DPACKAGE_BUGREPORT=\&amp;quot;\&amp;quot; -DPACKAGE=\&amp;quot;smasher\&amp;quot; -DVERSION=\&amp;quot;1.1.6\&amp;quot; -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\&amp;quot;.libs/\&amp;quot; -DHAVE_SNDFILE=1 -DUSE_DOUBLE=1 -I.   -Wall -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__  -march=x86-64 -mtune=generic -O2 -pipe -Wall -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -MT settingsbook.o -MD -MP -MF .deps/settingsbook.Tpo -c -o settingsbook.o settingsbook.cpp
    In file included from settingsbook.cpp:28:
    smasherMain.h:57: error: ISO C++ forbids declaration of ‘wxMediaCtrl’ with no type
    smasherMain.h:57: error: expected ‘;’ before ‘*’ token
    smasherMain.h:60: error: ISO C++ forbids declaration of ‘wxMediaCtrl’ with no type
    smasherMain.h:60: error: expected ‘;’ before ‘*’ token
    smasherMain.h:144: error: ISO C++ forbids declaration of ‘wxMediaCtrl’ with no type
    smasherMain.h:144: error: expected ‘;’ before ‘*’ token
    smasherMain.h:216: error: ‘wxMediaEvent’ has not been declared
    smasherMain.h:217: error: ‘wxMediaEvent’ has not been declared
    smasherMain.h:218: error: ‘wxMediaEvent’ has not been declared
    make: ***  Błąd 1
    make: Opuszczenie katalogu `/var/abs/local/smasher/src/smasher-1.1.6/src'
    make: ***  Błąd 1

     
  • ciembor

    ciembor - 2009-11-04

    Fu*ki&amp;(* code

    In file included from settingsbook.cpp:28:

    smasherMain.h:57: error: ISO C++ forbids declaration of ‘wxMediaCtrl’ with no type

    smasherMain.h:57: error: expected ‘;’ before ‘*’ token

    smasherMain.h:60: error: ISO C++ forbids declaration of ‘wxMediaCtrl’ with no type

    smasherMain.h:60: error: expected ‘;’ before ‘*’ token

    smasherMain.h:144: error: ISO C++ forbids declaration of ‘wxMediaCtrl’ with no type

    smasherMain.h:144: error: expected ‘;’ before ‘*’ token

    smasherMain.h:216: error: ‘wxMediaEvent’ has not been declared

    smasherMain.h:217: error: ‘wxMediaEvent’ has not been declared

    smasherMain.h:218: error: ‘wxMediaEvent’ has not been declared

    make: ***  Błąd 1

     
  • e loeliger

    e loeliger - 2009-11-04

    hi pktos,

    have you tried adding this option to your wxgtk configure script?

    -with-mediactrl

    this helped earlier on

    &gt;
    2009-07-14 09:48:17 BST
    rebuild wxgtk with -enable-mediactrl works for me.
    &lt;

    best,
    esther

     
  • ciembor

    ciembor - 2009-11-04

    Now I see, there is -enable-mediactrl (I think it is the same option). So problem is not solved:(.

     
  • ciembor

    ciembor - 2009-11-05

    OK, I updated all my system. I have latest gcc now…

    GCC 4.4.2, wxgtk 2.8.10.1, csound 5.10.1, libsndfile 1.0.20

    and another build error:

    g++ -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"smasher\" -DVERSION=\"1.1.6\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_SNDFILE=1 -DUSE_DOUBLE=1 -I.   -Wall -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__  -march=x86-64 -mtune=generic -O2 -pipe -Wall -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -MT replace.o -MD -MP -MF .deps/replace.Tpo -c -o replace.o replace.cpp
    replace.cpp: In static member function ‘static int Replace::run(std::string&, const std::string&, const std::string&, bool)’:
    replace.cpp:17: error: ‘BUFSIZ’ was not declared in this scope
    make: ***  Błąd 1
    make: Opuszczenie katalogu `/var/abs/local/smasher/src/smasher-1.1.6/src'
    make: ***  Błąd 1

     
  • ciembor

    ciembor - 2009-11-05

    > BlockquoteBy: gnschmidt
    >
    I think
    > `#include <cstdio>`
    should get rid of this error.
    >
    -Gerald

    http://aur.archlinux.org/packages.php?ID=31767

    Patched and packed. Thank you:).

     
  • Toomuch Information

    A bit of a metoo post, but here are the essentials:

    replace.cpp: In static member function ‘static int Replace::run(std::string&, const std::string&, const std::string&, bool)’:
    replace.cpp:17: error: ‘BUFSIZ’ was not declared in this scope

    Ubuntu 9.10

    gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8)

    (64 bit X86 koala umbongo, using the default versions of compiler and dependencies from the distro itself)

     
  • Toomuch Information

    never mind, I just learned to read, sorry :)

     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks