Skip to content

Multiple definition of function comp_max_heap() #2

@QDXG-CXK

Description

@QDXG-CXK

I encountered a link error while executing the "make pqtree" command. Below is the error message:
"
/opt/rh/devtoolset-10/root/usr/libexec/gcc/x86_64-redhat-linux/10/ld: CMakeFiles/pqtree.dir/pq_tree.cpp.o:/home/cuixk/tmp/DeltaPQ/pq_tree.cpp:394: multiple definition of `comp_max_heap'; CMakeFiles/pqtree.dir/main.cpp.o:/home/cuixk/tmp/DeltaPQ/main.cpp:98: first defined here
"
Since the function comp_max_heap() is not called in the file pq_tree.cpp, the issue can be resolved by removing its definition from pq_tree.cpp at line 394.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions