compile problems in Fedora 11


Results 1 to 5 of 5

Thread: compile problems in Fedora 11

  1. #1
    Join Date
    Jan 2008
    Location
    Sol-Om-On's Temple
    Posts
    25

    compile problems in Fedora 11

    I've just upgraded my OS to Fedora 11.

    I'm trying to compile a program with make, but I get an error...
    ../main/dynamic.cpp: In member function ‘void K_Hierarchy::RemoveLayer(const std::string&)’:
    ../main/dynamic.cpp:1739: error: no matching function for call to ‘find(__gnu_cxx::__normal_iterator<K_Layer**, std::vector<K_Layer*, std::allocator<K_Layer*> > >, __gnu_cxx::__normal_iterator<K_Layer**, std::vector<K_Layer*, std::allocator<K_Layer*> > >, K_Layer*&)’

    ...

    make[1]: *** [../main/dynamic.o] エラー 1
    The code line 1739 is the one with the find()...
    Code:
    void K_Hierarchy::RemoveLayer(const std::string& path)
    {
        ...
        
        // Remove this layer from the stack
        std::vector<K_Layer*>::iterator it;
        it = std::find(layers.begin(), layers.end(), layer);
        assert(it != layers.end());
        layers.erase(it);
       
        ...
    }
    Does anyone know what I can do to get it to compile?

    If useful, the gcc version is as follows...

    $ gcc --version
    gcc (GCC) 4.4.0 20090506 (Red Hat 4.4.0-4)
    $ g++ -v
    Using built-in specs.
    Target: i586-redhat-linux
    コンフィグオプション: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i586 --build=i586-redhat-linux
    スレッドモデル: posix
    gcc version 4.4.0 20090506 (Red Hat 4.4.0-4) (GCC)
    $ which c++
    /usr/lib/ccache/c++
    $ which g++
    /usr/lib/ccache/g++
    lrwxrwxrwx. 1 root root 16 2009-06-16 21:28 /usr/lib/ccache/c++ -> ../../bin/ccache
    lrwxrwxrwx. 1 root root 16 2009-06-16 21:28 /usr/lib/ccache/g++ -> ../../bin/ccache
    -rwxr-xr-x. 1 root root 41456 2009-02-24 16:42 /usr/bin/ccache

  2. #2
    Join Date
    Sep 2002
    Location
    Harlow, UK
    Posts
    1,788
    Have you installed libstdc++? It'll be available on your fedora disc or via the package manager.
    If you have to ask why you want to install Linux, then perhaps you shouldn't.
    -- Michael D. Watts (Gone but never forgotten)

    Linux is not Windows | Posting Guidelines

    Code Monkey (YouTube)

  3. #3
    Join Date
    Jan 2008
    Location
    Sol-Om-On's Temple
    Posts
    25
    I currently have all these installed...
    Package libstdc++-4.4.0-4.i586 already installed and latest version
    Package compat-libstdc++-33-3.2.3-66.i586 already installed and latest version
    Package compat-libstdc++-296-2.96-142.i586 already installed and latest version
    Package libstdc++-devel-4.4.0-4.i586 already installed and latest version
    I only just install the compat ones, but it made no difference

  4. #4
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,936
    You need -dev packages (so libstdc++*-dev, not just libstdc++-*). However, I'm not sure that's the problem.

    This is a template error, so it's really hard to track down when you don't post the *entire* error message. One thing that's missing is the list of candidates for the function call that it's unable to match, for instance. Please don't abbreviate. Another thing that's missing is the compilation command line that you ran when you got this error.

    Yet another thing that's missing (though this is less related to the above two things) is the type declaration for "layer" in the code you posted. The type declaration for "layers" is also highly relevant here...

  5. #5
    Join Date
    Jan 2008
    Location
    Sol-Om-On's Temple
    Posts
    25
    bwkaz,

    thanks for your help. I'm getting the impression this is a much bigger problem than I thought. There are also some other error messages further up which I had missed. I'm no expert in C and just add pieces.

    It turns out the whole software suite cannot be compiled under GCC 4.4 and it would be quite a task to port it to it.

    I'm now compiling on another machine under GCC 4.1.2 which works fine.

    Thanks.

Posting Permissions

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