Click here to Skip to main content
14,303,639 members

C / C++ / MFC

 
GeneralRe: Found Api's Causing Heap Corruption Pin
CPallini5-Dec-18 7:49
mveCPallini5-Dec-18 7:49 
QuestionCComboBox list Appears After Trying to Close out Dialog Pin
ForNow4-Dec-18 16:06
memberForNow4-Dec-18 16:06 
GeneralRe: CComboBox list Appears After Trying to Close out Dialog Pin
Richard MacCutchan4-Dec-18 22:13
protectorRichard MacCutchan4-Dec-18 22:13 
GeneralRe: CComboBox list Appears After Trying to Close out Dialog Pin
ForNow5-Dec-18 2:09
memberForNow5-Dec-18 2:09 
GeneralRe: CComboBox list Appears After Trying to Close out Dialog Pin
Richard MacCutchan5-Dec-18 2:41
protectorRichard MacCutchan5-Dec-18 2:41 
GeneralRe: CComboBox list Appears After Trying to Close out Dialog Pin
ForNow5-Dec-18 2:50
memberForNow5-Dec-18 2:50 
GeneralRe: CComboBox list Appears After Trying to Close out Dialog Pin
Richard MacCutchan5-Dec-18 7:36
protectorRichard MacCutchan5-Dec-18 7:36 
Question"undefined reference " error - what am I missing ? Pin
Vaclav_4-Dec-18 7:19
memberVaclav_4-Dec-18 7:19 
I am getting
undefined reference
error.

I have "included " relevant headers in souce files , I have "common path" in project includes (/usr/include /bluetooth ) ,
I can access "Open Declaration" in my IDE and it identifies function and its file...
I have no errors indicating missing
bluetooth/hci_lib.h
in text file...

What did I missed??


<pre>
#ifndef MODULES_M_BT_H_
#define MODULES_M_BT_H_

#include <iostream>
#include <stdint.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/socket.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>



C++ function

<pre>int C_BT::Scan(void) {
	cout << "C_BT::Scan(void)   " << endl;
	// Get bluetooth device id
	int device_id = hci_get_route(NULL); // Passing NULL argument will retrieve the id of first avalaibe device
	if (device_id < 0) {
		printf("Error: Bluetooth device not found");
		exit(1);
	}
	return 0;
}




Error



./src/MODULES/M_BLUETOOTH/CBT.o: In function `std::C_BT::Scan()':
/media/jim/DEV/eclipse-workspace/VNAR_1204/Debug/../src/MODULES/M_BLUETOOTH/CBT.cpp:42: undefined reference to `hci_get_route'
collect2: error: ld returned 1 exit status
makefile:75: recipe for target 'VNAR_1204' failed
make: *** [VNAR_1204] Error 1


Can I get a second opinion ?

Cheers
Vaclav
AnswerRe: "undefined reference " error - what am I missing ? Pin
leon de boer4-Dec-18 7:36
memberleon de boer4-Dec-18 7:36 
GeneralRe: "undefined reference " error - what am I missing ? Pin
Vaclav_4-Dec-18 7:50
memberVaclav_4-Dec-18 7:50 
QuestionRe: "undefined reference " error - what am I missing ? Pin
Richard MacCutchan4-Dec-18 8:55
protectorRichard MacCutchan4-Dec-18 8:55 
AnswerRe: "undefined reference " error - what am I missing ? Pin
Joe Woodbury4-Dec-18 9:02
professionalJoe Woodbury4-Dec-18 9:02 
GeneralRe: "undefined reference " error - what am I missing ? Pin
Vaclav_4-Dec-18 12:33
memberVaclav_4-Dec-18 12:33 
GeneralRe: "undefined reference " error - what am I missing ? Pin
Joe Woodbury4-Dec-18 12:36
professionalJoe Woodbury4-Dec-18 12:36 
GeneralRe: "undefined reference " error - what am I missing ? Pin
Vaclav_4-Dec-18 15:15
memberVaclav_4-Dec-18 15:15 
GeneralRe: "undefined reference " error - what am I missing ? Pin
Joe Woodbury4-Dec-18 18:48
professionalJoe Woodbury4-Dec-18 18:48 
GeneralRe: "undefined reference " error - what am I missing ? Pin
Vaclav_5-Dec-18 4:35
memberVaclav_5-Dec-18 4:35 
GeneralRe: "undefined reference " error - what am I missing ? Pin
Richard MacCutchan4-Dec-18 22:00
protectorRichard MacCutchan4-Dec-18 22:00 
QuestionString Search In C++ Pin
Hack Baba4-Dec-18 6:07
memberHack Baba4-Dec-18 6:07 
AnswerRe: String Search In C++ Pin
jeron14-Dec-18 6:10
memberjeron14-Dec-18 6:10 
GeneralRe: String Search In C++ Pin
Hack Baba4-Dec-18 6:21
memberHack Baba4-Dec-18 6:21 
GeneralRe: String Search In C++ Pin
jeron14-Dec-18 7:49
memberjeron14-Dec-18 7:49 
AnswerRe: String Search In C++ Pin
Richard MacCutchan4-Dec-18 6:33
protectorRichard MacCutchan4-Dec-18 6:33 
GeneralRe: String Search In C++ Pin
Hack Baba4-Dec-18 6:45
memberHack Baba4-Dec-18 6:45 
GeneralRe: String Search In C++ Pin
Richard MacCutchan4-Dec-18 8:49
protectorRichard MacCutchan4-Dec-18 8:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.