ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

catkin_make fails - Undefined symbols for architecture x86_64

asked 2014-11-07 05:26:45 -0500

Rufio gravatar image


i am struggling the last few days and tried many things out which i've found on the web. My problem is to build with catkin_make. I am quite new to all this stuff and have absolutely no clue what to do. Would be very happy if anybody can help me.

i get following error

Undefined symbols for architecture x86_64:
"dircol<Dimensions<10ul, 3ul> >::setFinalState(Eigen::Matrix<double, 10, 1, 0, 10, 1>)", referenced from:
  _main in dircol_rezero_ipopt.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/Users/lukasmoller/catkin_ws/devel/lib/dircol/dircol_rezero_ipopt] Error 1
make[2]: *** [CMakeFiles/dircol_rezero_ipopt.dir/all] Error 2
make[1]: *** [CMakeFiles/dircol_rezero_ipopt.dir/rule] Error 2
make: *** [dircol_rezero_ipopt] Error 2
Invoking "make" failed

Thanks very much

edit retag flag offensive close merge delete


Please do not use answers to make comments, either comment on my answer or edit your question.

William gravatar image William  ( 2014-11-10 12:27:31 -0500 )edit

Were you able to solve this issue? Stuck with this.

kunalgrover05 gravatar image kunalgrover05  ( 2015-09-06 23:26:10 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-11-09 14:23:14 -0500

William gravatar image

Hi @Rufio, this is more of a C++ question than a catkin_make question. The error you are getting:

Undefined symbols for architecture x86_64:
"dircol<Dimensions<10ul, 3ul> >::setFinalState(Eigen::Matrix<double, 10, 1, 0, 10, 1>)", referenced from:
  _main in dircol_rezero_ipopt.cpp.o

Is from the C++ linker. It is complaining that it cannot find the _main symbol which means you are trying to build an executable but you do not have a main function in any of your source files you are compiling and linking together for the executable.

Check your program to make sure it has a main function and if it does, make sure the file which contains it is used in compiling your executable.

If you need more help we will need you to share your CMakeLists.txt and possibly some of the source files. The easiest way to get help would be to post your whole package on and point people there (assuming you can do that).

edit flag offensive delete link more


(moved from answer) "It is very strange: when i do "catkin_make" with ubuntu on my virtual machine, it works without any error :). So it must be anything with my system. Unfortunately it is a project from my university and i most probably are not allowed to share any files :(."

William gravatar image William  ( 2014-11-10 12:25:15 -0500 )edit

(moved from answer) "Could it be that it is an error which arise only for mac osx (10.10)?"

William gravatar image William  ( 2014-11-10 12:25:32 -0500 )edit

@Rufio Not that I know of, you should try to narrow down the problem, removing everything until you can reproduce it without any of your projects code. If you can do that and still have the problem then you can post the minimal project which exposes it and we can help using that as an example.

William gravatar image William  ( 2014-11-10 12:26:58 -0500 )edit

Question Tools

1 follower


Asked: 2014-11-07 05:26:45 -0500

Seen: 436 times

Last updated: Nov 09 '14