CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2000
    Posts
    1,471

    Help with a project under linux

    I am pretty new to linux. I don't know how to compile a project. I attach the project zip file. Does any guru here give me some hints how to compile it under linux? Thank you very much!
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Help with a project under linux

    Quote Originally Posted by dullboy View Post
    I am pretty new to linux. I don't know how to compile a project. I attach the project zip file. Does any guru here give me some hints how to compile it under linux? Thank you very much!
    Linux is an operating system, not a C++ compiler. What C++ compiler are you using?

    Regards,

    Paul McKenzie

  3. #3
    Join Date
    Aug 2000
    Posts
    1,471

    Re: Help with a project under linux

    Quote Originally Posted by Paul McKenzie View Post
    Linux is an operating system, not a C++ compiler. What C++ compiler are you using?

    Regards,

    Paul McKenzie
    I am using g++ under linux. Do you know how to compile the whole project I attached into an executable? Thanks for your inputs.

  4. #4
    Join Date
    Aug 2000
    Location
    West Virginia
    Posts
    7,721

    Re: Help with a project under linux

    1) There is a file in the folder named, INSTALL. It gives the instructions:

    ./configure
    make install
    2) There are a lot of problems ...

    a) There are calls that look like this:
    Code:
    Ccommon_logmsg("Connecting the server...");
    But Ccommon_logmsg takes a "char *" parameter, not a "const char *" parameter.
    It doesn't look like the parameter is changed anywhere. So you can go thru the code
    and manual fix all those intances, or change the Makefile in the src folder and remove the
    "-Werror" compiler flag.

    b) There are a number of files that do not include "string.h"

    c) There are some illegal casts in sound.C

    Code:
    my_gsm_encode(gsmhandle, gsmsamples+160*1, (gsm_frame)(dest+33*0));
    Maybe these can be changed to:

    Code:
    my_gsm_encode(gsmhandle, gsmsamples+160*0, *reinterpret_cast<gsm_frame*>(dest+33*0));
    But I do not really know.

    I stopped at this point.

  5. #5
    Join Date
    Aug 2000
    Posts
    1,471

    Re: Help with a project under linux

    Quote Originally Posted by Philip Nicoletti View Post
    1) There is a file in the folder named, INSTALL. It gives the instructions:



    2) There are a lot of problems ...

    a) There are calls that look like this:
    Code:
    Ccommon_logmsg("Connecting the server...");
    But Ccommon_logmsg takes a "char *" parameter, not a "const char *" parameter.
    It doesn't look like the parameter is changed anywhere. So you can go thru the code
    and manual fix all those intances, or change the Makefile in the src folder and remove the
    "-Werror" compiler flag.

    b) There are a number of files that do not include "string.h"

    c) There are some illegal casts in sound.C

    Code:
    my_gsm_encode(gsmhandle, gsmsamples+160*1, (gsm_frame)(dest+33*0));
    Maybe these can be changed to:

    Code:
    my_gsm_encode(gsmhandle, gsmsamples+160*0, *reinterpret_cast<gsm_frame*>(dest+33*0));
    But I do not really know.

    I stopped at this point.
    Thanks so much for your reply. Actually I tried to run configure under linux but I got some error messages. I copy the results after I run ./configure in my project folder in the following,
    Code:
    loading cache ./config.cache
    checking for a BSD compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking whether make sets ${MAKE}... yes
    checking for working aclocal... missing
    checking for working autoconf... missing
    checking for working automake... missing
    checking for working autoheader... missing
    checking for working makeinfo... missing
    checking for gcc... gcc
    checking whether the C compiler (gcc  ) works... yes
    checking whether the C compiler (gcc  ) is a cross-compiler... no
    checking whether we are using GNU C... yes
    checking whether gcc accepts -g... yes
    checking for c++... no
    checking for g++... no
    checking for gcc... gcc
    checking whether the C++ compiler (gcc  ) works... no
    I couldn't find folders like aclocal, autoconf in the project. Is there anything I am missing? Thanks for your inputs.

  6. #6
    Join Date
    Aug 2000
    Location
    West Virginia
    Posts
    7,721

    Re: Help with a project under linux

    Below is the output when I run configure. The codes that are "missing" in your output
    are located in /usr/bin on my system. Your system is not even seeing a C++ compiler.

    loading cache ./config.cache
    checking for a BSD compatible install... (cached) /usr/bin/install -c
    checking whether build environment is sane... yes
    checking whether make sets ${MAKE}... (cached) yes
    checking for working aclocal... found
    checking for working autoconf... found
    checking for working automake... found
    checking for working autoheader... found
    checking for working makeinfo... found
    checking for gcc... (cached) gcc
    checking whether the C compiler (gcc ) works... yes
    checking whether the C compiler (gcc ) is a cross-compiler... no
    checking whether we are using GNU C... (cached) yes
    checking whether gcc accepts -g... (cached) yes
    checking for c++... (cached) c++
    checking whether the C++ compiler (c++ ) works... yes
    checking whether the C++ compiler (c++ ) is a cross-compiler... no
    checking whether we are using GNU C++... (cached) yes
    checking whether c++ accepts -g... (cached) yes
    creating ./config.status
    creating Makefile
    creating src/Makefile
    creating config.h
    config.h is unchanged

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured