Click here to Skip to main content
15,923,120 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
SuggestionRe: What is the learning path? Pin
Richard Deeming11-Dec-18 1:09
mveRichard Deeming11-Dec-18 1:09 
QuestionAfxMessage doesn’t block Pin
ForNow6-Dec-18 2:02
ForNow6-Dec-18 2:02 
AnswerRe: AfxMessage doesn’t block Pin
Victor Nijegorodov6-Dec-18 5:22
Victor Nijegorodov6-Dec-18 5:22 
GeneralRe: AfxMessage doesn’t block Pin
ForNow6-Dec-18 5:26
ForNow6-Dec-18 5:26 
GeneralRe: AfxMessage doesn’t block Pin
Victor Nijegorodov6-Dec-18 8:45
Victor Nijegorodov6-Dec-18 8:45 
GeneralRe: AfxMessage doesn’t block Pin
ForNow6-Dec-18 8:49
ForNow6-Dec-18 8:49 
QuestionKeyboard functionality for IExplorerBrowser Pin
_Flaviu5-Dec-18 20:59
_Flaviu5-Dec-18 20:59 
QuestionFound Api's Causing Heap Corruption Pin
ForNow5-Dec-18 2:23
ForNow5-Dec-18 2:23 
AnswerRe: Found Api's Causing Heap Corruption Pin
CPallini5-Dec-18 3:08
mveCPallini5-Dec-18 3:08 
GeneralRe: Found Api's Causing Heap Corruption Pin
ForNow5-Dec-18 3:11
ForNow5-Dec-18 3:11 
GeneralRe: Found Api's Causing Heap Corruption CPallini You are Great thanks Pin
ForNow5-Dec-18 3:40
ForNow5-Dec-18 3:40 
GeneralRe: Found Api's Causing Heap Corruption CPallini You are Great thanks Pin
CPallini5-Dec-18 6:50
mveCPallini5-Dec-18 6:50 
GeneralRe: Found Api's Causing Heap Corruption CPallini You are Great thanks Pin
ForNow5-Dec-18 7:28
ForNow5-Dec-18 7:28 
GeneralRe: Found Api's Causing Heap Corruption Pin
Richard MacCutchan5-Dec-18 7:43
mveRichard MacCutchan5-Dec-18 7:43 
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
ForNow4-Dec-18 16:06 
GeneralRe: CComboBox list Appears After Trying to Close out Dialog Pin
Richard MacCutchan4-Dec-18 22:13
mveRichard MacCutchan4-Dec-18 22:13 
GeneralRe: CComboBox list Appears After Trying to Close out Dialog Pin
ForNow5-Dec-18 2:09
ForNow5-Dec-18 2:09 
GeneralRe: CComboBox list Appears After Trying to Close out Dialog Pin
Richard MacCutchan5-Dec-18 2:41
mveRichard MacCutchan5-Dec-18 2:41 
GeneralRe: CComboBox list Appears After Trying to Close out Dialog Pin
ForNow5-Dec-18 2:50
ForNow5-Dec-18 2:50 
GeneralRe: CComboBox list Appears After Trying to Close out Dialog Pin
Richard MacCutchan5-Dec-18 7:36
mveRichard MacCutchan5-Dec-18 7:36 
Question"undefined reference " error - what am I missing ? Pin
Vaclav_4-Dec-18 7:19
Vaclav_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??


C++
<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

C++
<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
leon de boer4-Dec-18 7:36 
GeneralRe: "undefined reference " error - what am I missing ? Pin
Vaclav_4-Dec-18 7:50
Vaclav_4-Dec-18 7:50 
QuestionRe: "undefined reference " error - what am I missing ? Pin
Richard MacCutchan4-Dec-18 8:55
mveRichard MacCutchan4-Dec-18 8:55 

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.