Announcement

Collapse
No announcement yet.

Problem building in KDevelop

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Problem building in KDevelop

    I'm trying to build a simple C++ project in KDevelop for the first time and have run into a problem. Here is the collection of errors that the linker is spitting out.

    Code:
    cd '/home/luggw1/Joel/Code/hello_world/debug' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" LC_MESSAGES="C" LC_CTYPE="C" make -k 
    make all-recursive
    Making all in src
    /bin/bash ../libtool --tag=CXX --mode=link g++ -O0 -g3 -o hello_world hello_world.o 
    ../libtool: line 832: X--tag=CXX: command not found
    ../libtool: line 865: libtool: ignoring unknown tag : command not found
    ../libtool: line 832: X--mode=link: command not found
    ../libtool: line 999: *** Warning: inferring the mode of operation is deprecated.: command not found
    ../libtool: line 1000: *** Future versions of Libtool will require --mode=MODE be specified.: command not found
    gcc: no input files
    gcc: no input files
    gcc: no input files
    gcc: no input files
    ../libtool: line 2237: X-O0: command not found
    ../libtool: line 2237: X-g3: command not found
    ../libtool: line 2406: Xhello_world: command not found
    X: user not authorized to run the X server, aborting.
    ../libtool: line 2418: Xhello_world: command not found
    ../libtool: line 2426: mkdir /.libs: No such file or directory
    mkdir: cannot create directory `/.libs': Permission denied
    make[2]: *** [hello_world] Error 1
    make[2]: Target `all' not remade because of errors.
    make[2]: Nothing to be done for `all-am'.
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2
    *** Exited with status: 2 ***
    No executable is produced. Can anyone give me a clue of what I need to do to get this beast working?

    Thanks.
    Bill Lugg

    #2
    Re: Problem building in KDevelop

    Bill,
    It looks to me like you have a version incompatibility with libtool. That is common in dev tools composed of several disparate components.


    Allow me to suggest that instead of KDevelop that you try qt-creator, which is in the repository. Install all the Qt4.5 stuff, too. libqt4-xxx, qt4-xxx, etc. Qt-creator is a GUI RAD for Qt4 that has the power of Visual Studio for C++, and includes all of its features, like code completion, and more.

    For version control try bzr and its front end, qbzr. The bzr webpage has an execellent tutorial, and bzr is a snap to learn and use.

    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Re: Problem building in KDevelop

      I am using QtCreator for my GUI based development work, and I must say that I am quite impressed with its capabilities. However, my son is preparing for a beginning class in C++ and needs to be able to compile simple terminal based programs that aren't based on the Qt libraries. When I initially looked at QtCreator, it looked like it was focused exclusively on building GUI based apps. Is there a way to do terminal based programming in QtCreator?

      Thanks.
      Bill Lugg

      Comment


        #4
        Re: Problem building in KDevelop

        Qt4 uses qmake to create the project *.pro file, and using that pro file it creates the MakeFile which gcc uses to compile the sources to give the ELF binary. If one doesn't use qmake and a *.pro file to create MakeFile, and Qt libs are not wanted, then Qt4 & Qt-Creator are not necessary and all one has to do is use is the source file and the appropriate gcc command line switches, the use of which should be part of the class your son is taking. If not, there are several online C++ tutorials which give the necessary switches to gcc. Here is a reference site leading to many resources: http://www.linuxselfhelp.com/HOWTO/C...-HOWTO-13.html

        Here is a quick and easy C++ tutorial: http://www.cplusplus.com/doc/tutorial/


        All of the standard includes are present on most Linux systems (/usr/include/c++/4.3 on my Kubuntu 9.04 system, with gcc 4.3 installed. They include iostream, string, cstring, cmath, cfloat, etc..., and other includes under subdirectories beneath ../4.3/.

        Using KDevelop is still overkill and under performance, IMO. It's like operating with boxing gloves on. Allow me to suggest that your son use Kate. !!! It is a marvelous WYSIWYG source code editor, which I used at work for several years to write Qt4 applications, and it works perfectly well for C++ console application code, and many other languages as well. It includes a simple code completion (for words and libs already referenced at least once), etc... It also includes a directory/document panel, a source code editor panel, and a console panel in which the compile command is issued.... usually an up-arrow is used to recall the previously used compile command. What is nice about it is that it does not conceal the simple processes that are concealed by KDevelop and Qt-Creator. When one issues the gcc compile command the error mesages point exactly to the lines containing any compile errors, and what the errors are, right there in the console window.

        Kdbg is an excellent graphical debugger with all the usual capabilities.... stacks, breakpoints, var drill down, step into, step over, etc.. You can load the compiled executable and source code, set the breakpoints, vars, etc... and execute the binary to step through the code. Very nice.




        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment

        Working...
        X