i cant compile sdcc-src-with mingw32

bg7jzw
2008-09-03
2013-03-12
  • bg7jzw
    bg7jzw
    2008-09-03

    i compile the src code sdcc-src-20080902-5228 use mingw32,after checking,the err info was following:

    make[1]: Entering directory `/sdcc/debugger/mcs51'
    /mingw/bin/gcc -I. -I../../ -I./../.. -I./../../support/Util -DHAVE_CONFIG_H -pipe -ggdb -g -O2 -c -o sdcdb.o sdcdb.c
    /mingw/bin/gcc -I. -I../../ -I./../.. -I./../../support/Util -DHAVE_CONFIG_H -pipe -ggdb -g -O2 -c -o symtab.o symtab.c
    /mingw/bin/gcc -I. -I../../ -I./../.. -I./../../support/Util -DHAVE_CONFIG_H -pipe -ggdb -g -O2 -c -o simi.o simi.c
    simi.c: In function `openSimulator':
    simi.c:315: error: `intptr_t' undeclared (first use in this function)
    simi.c:315: error: (Each undeclared identifier is reported only once
    simi.c:315: error: for each function it appears in.)
    simi.c:315: error: parse error before "sock"
    simi.c:329: error: parse error before "sock"
    make[1]: *** [simi.o] Error 1
    make[1]: Leaving directory `/sdcc/debugger/mcs51'
    make[1]: Entering directory `/sdcc/sim/ucsim'

    who can help me?

     
    • bg7jzw
      bg7jzw
      2008-09-03

      sorry,this is a rash question and i have solve it now with following :
      #include "../../device/include/stdint.h" add in app.cc
      #include "../../device/include/stdint.h" add in simi.c
      #include "../../device/include/stdint.h" add in newcmdwin32.c

       
      • Borut Ražem
        Borut Ražem
        2008-09-03

        Wrong. You should #include <stdint.h>, which belongs to mingw gcc compiler, used to compile sdcc. "../../device/include/stdint.h" belongs to sdcc compiler, it is used to compile the code for targer cpu-s.

        But the question is if they should be explicitly included anyway: sdcc is cross-compiled on Linux using mingw gcc without problems. Now I'm trying to compile it on Windows. Which version of mingw/msys are you using? I assume that you are compiling sdcc using mingw and not cygwin with -mno-cygwin...

        Borut

         
        • Borut Ražem
          Borut Ražem
          2008-09-03

          I compiled sdcc with mingw on Windows without problems, no need to add #inclue <stdint.h>.

          Have you run the configure script? Can you send me the output of the configure? You can generate it by running

          configure 2>&1 | tee log.txt

          from the msys shell. Send me the log.txt file.

          Borut