Menu

Newbie to C/C++

CKgal
2007-09-06
2012-09-26
  • CKgal

    CKgal - 2007-09-06

    Hi,

    Recently i am trying to run a GSM Codec developed by Jutta Degener in Bloodshed. I just created a new project and dump all the .c files and .h files into the project and complie it but i getting errors such as:

    add.c; private.h: No such file or directory.
    add.c; gsm.h: No such file or directory.
    add.c; proto.h: No such file or directory.
    error: syntax error before "gsm_add"

    etc..

    But i already added in the header files. I am not sure how to play around with the codes..

     
    • CKgal

      CKgal - 2007-09-06

      Manage to compile to a certain stages after i drag files to a totally new folder and create. However, there's still compilation error as follows:-

      Basic 3:
      (1) i am using bloodshed dev C++ v4.9.9.2 in win xp
      (2) Hmm this is a program that wrote by jutta degener (http://kbs.cs.tu-berlin.de/~jutta/toast.html) that implemented a GSM 06.10 RPE-LTP coder and decoder in C. It consists of a C library and a standalone program. When i unzip i iterally cut and paste the codes from the src folder and inc folder to a newly create c++ empty project.
      (3) Compiler: Default compiler
      Building Makefile: "C:\FypCodec\Makefile.win"
      Executing make...
      make.exe -f "C:\FypCodec\Makefile.win" all
      gcc.exe -c long_term.c -o long_term.o -I"C:/Dev-Cpp/include"
      .
      .
      .
      gcc.exe -c toast_lin.c -o toast_lin.o -I"C:/Dev-Cpp/include"

      gcc.exe -c toast_ulaw.c -o toast_ulaw.o -I"C:/Dev-Cpp/include"

                            . 
                            .
                            .
      

      gcc.exe long_term.o lpc.o preprocess.o rpe.o short_term.o table.o toast.o toast_alaw.o toast_audio.o toast_lin.o toast_ulaw.o add.o code.o debug.o decode.o gsm_create.o gsm_decode.o gsm_destroy.o gsm_encode.o gsm_explode.o gsm_implode.o gsm_option.o gsm_print.o -o "Codec.exe" -L"C:/Dev-Cpp/lib"

      toast.o(.text+0x4c6):toast.c: undefined reference to fchmod' toast.o(.text+0x53b):toast.c: undefined reference tofchown'
      collect2: ld returned 1 exit status

      make.exe: *** [Codec.exe] Error 1

      Execution terminated

       
    • Anonymous

      Anonymous - 2007-09-06

      What are those ... lines in your log? Do not edit the log, post it all.

      None of the logs you posted show the errors you mentioned in your initial post - you seem to be moving the goal posts! All logs you post should ideally be from a "Rebuild All".

      The missing references fchmod and fchown are POSIX functions to do with file ownership and permissions. You will need to port this code to Win32 equivalents or otherwise work around it. It is possible that the code that uses them is not critical and can simply be removed or modified to work without permissions or ownership. There may even be platform specific conditional compilation that you need to set a macro for to make it compile for Windows.

      Clifford

       
    • Wayne Keen

      Wayne Keen - 2007-09-06

      Could you please post your Basic 3, they are covered in the thread titled "Please Read Before Posting a Question"

      Wayne

       
      • Wayne Keen

        Wayne Keen - 2007-09-06

        By the way, are your trying to learn C++, or are you just wanting to compile something
        specific?

        Wayne

         
    • CKgal

      CKgal - 2007-09-06

      Sorry.. i read the Post and learnt to place files in directory with spaces so that dev c++ would be able to read. However, now i have a new problem.

      Basic 3:
      (1) i am using bloodshed dev C++ v4.9.9.2 in win xp
      (2) Hmm this is a program that wrote by jutta degener (http://kbs.cs.tu-berlin.de/~jutta/toast.html) that implemented a GSM 06.10 RPE-LTP coder and decoder in C. It consists of a C library and a standalone program. When i unzip i iterally cut and paste the codes from the src folder and inc folder to a newly create c++ empty project.
      (3) Compiler: Default compiler
      Building Makefile: "C:\FypCodec\Makefile.win"
      Executing make...
      make.exe -f "C:\FypCodec\Makefile.win" all
      C:\FypCodec\Makefile.win:26: *** multiple target patterns. Stop.

      Execution terminated

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.