PDA

View Full Version : linking issue: undefined reference



carloval
2nd December 2014, 15:08
I created an application with a goal of doing a Multicore communication.
I have added the necessary header files and lib files.
The autocomplete works when typing the name of the function.
Also when mouse hover is done function information is displayed.
My thinking it is added correctly.

However when i compiled i got undefined reference errors:



undefined reference to `mcc_initialize(unsigned int)'
undefined reference to `mcc_get_info(unsigned int, mcc_info_struct*)'
undefined reference to `mcc_destroy(unsigned int)'
undefined reference to `mcc_create_endpoint(mcc_endpoint*, unsigned int)'

Can anybody guide me what went wrong?

10774

Also how do i force to add the lib file to be last.

currently when compiling:

-L/home/carlo/pcm052/toolchain/usr/lib -lmcc -ltQtGui -L/usr/lib -lQtNetwork -lQtCore -lpthread

i want the mcc to be in the last part

-L/home/carlo/pcm052/toolchain/usr/lib -ltQtGui -L/usr/lib -lQtNetwork -lQtCore -lpthread -lmcc

carloval
3rd December 2014, 02:56
issue is solved.

extern "C"
{
#include <linux/mcc_config.h>
#include <linux/mcc_common.h>
#include <mcc_api.h>
}