简体   繁体   中英

Import files exists to project eclipse C++ Linux

I am using eclipse to dev my application for linux. I have my library source in workspace/mylib/ and the project in workspace/project. In a source of my project i include the relative path of source library file, example: #include "../mylib/foo.h" The problem start when i try build it, in all parts that use library source eclipse shows this error: undefined reference to 'function()'

I think that it is by library files don't have in src folder or not link.

Any Idea?

Thanks!

error: undefined reference to 'function()'

Indicates that the linker cannot find the definition of the function() . Either you have not defined it in your source code Or If you are using a library which defines it, the library is not getting linked.

This or this posts explain what you should do to add external libraries to eclipse.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM