Click here to Skip to main content
15,880,651 members
Home / Discussions / Linux Programming
   

Linux Programming

 
AnswerRe: Developing bluetooth app using "bluez" Pin
Richard MacCutchan5-Mar-19 6:32
mveRichard MacCutchan5-Mar-19 6:32 
GeneralRe: Developing bluetooth app using "bluez" Pin
Vaclav_5-Mar-19 6:46
Vaclav_5-Mar-19 6:46 
GeneralRe: Developing bluetooth app using "bluez" Pin
Richard MacCutchan5-Mar-19 6:50
mveRichard MacCutchan5-Mar-19 6:50 
GeneralRe: Developing bluetooth app using "bluez" Pin
Vaclav_5-Mar-19 9:03
Vaclav_5-Mar-19 9:03 
GeneralRe: Developing bluetooth app using "bluez" Pin
Richard MacCutchan5-Mar-19 22:45
mveRichard MacCutchan5-Mar-19 22:45 
GeneralRe: Developing bluetooth app using "bluez" Pin
Vaclav_5-Mar-19 7:39
Vaclav_5-Mar-19 7:39 
AnswerRe: Developing bluetooth app using "bluez" Pin
k50545-Mar-19 9:44
mvek50545-Mar-19 9:44 
GeneralRe: Developing bluetooth app using "bluez" Pin
Vaclav_5-Mar-19 13:37
Vaclav_5-Mar-19 13:37 
GeneralRe: Developing bluetooth app using "bluez" Pin
k50546-Mar-19 6:57
mvek50546-Mar-19 6:57 
GeneralRe: Developing bluetooth app using "bluez" Pin
Vaclav_5-Mar-19 16:02
Vaclav_5-Mar-19 16:02 
GeneralRe: Developing bluetooth app using "bluez" Pin
k50546-Mar-19 8:50
mvek50546-Mar-19 8:50 
GeneralRe: Developing bluetooth app using "bluez" Pin
Vaclav_6-Mar-19 11:58
Vaclav_6-Mar-19 11:58 
QuestionLinking to library Pin
Vaclav_3-Mar-19 5:22
Vaclav_3-Mar-19 5:22 
AnswerRe: Linking to library Pin
Richard MacCutchan3-Mar-19 5:53
mveRichard MacCutchan3-Mar-19 5:53 
GeneralRe: Linking to library Pin
Vaclav_3-Mar-19 7:08
Vaclav_3-Mar-19 7:08 
AnswerRe: Linking to library Pin
k50543-Mar-19 6:03
mvek50543-Mar-19 6:03 
GeneralRe: Linking to library Pin
Vaclav_3-Mar-19 7:09
Vaclav_3-Mar-19 7:09 
AnswerRe: Linking to library Pin
k50543-Mar-19 6:32
mvek50543-Mar-19 6:32 
GeneralRe: Linking to library Pin
Vaclav_3-Mar-19 7:05
Vaclav_3-Mar-19 7:05 
AnswerRe: Linking to library Pin
Vaclav_3-Mar-19 7:15
Vaclav_3-Mar-19 7:15 
GeneralRe: Linking to library Pin
k50543-Mar-19 7:44
mvek50543-Mar-19 7:44 
GeneralRe: Linking to library Pin
Vaclav_3-Mar-19 8:12
Vaclav_3-Mar-19 8:12 
GeneralRe: Linking to library Pin
k50543-Mar-19 9:04
mvek50543-Mar-19 9:04 
No. Its not -lfopenmp, it is -fopenmp.

Given this hello.cpp:
C++
#include <iostream>

int main()
{
     std::cout << "hello world\n";
     return 0;
}

then g++ -fopenmp hello.cpp -o hello produces an executable. We can use ldd to check the libraries linked in and we can see:
ldd hello
        linux-vdso.so.1 (0x00007ffed35fb000)
        libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fc385128000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fc384fa0000)
        libgomp.so.1 => /lib64/libgomp.so.1 (0x00007fc384f68000)
        libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fc384f48000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc384f20000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fc384d58000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fc3852e8000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fc384d50000)
So using -fopenmp adds in libgomp (and turns on other OpenMP processing for you, too).

I'm wondering if you've produced any cross-compiled executables, yet. I'm using Fedora29, which doesn't seem to provide libstdc++ or any of the c++ include files for cross compiling arm. You're apparently using a non red-hat derived system, so your mileage will definitely vary, or you may already have resolved the cross-compilation issues, in which case, kudos!
GeneralRe: Linking to library Pin
Richard MacCutchan3-Mar-19 21:34
mveRichard MacCutchan3-Mar-19 21:34 
GeneralRe: Linking to library Pin
Vaclav_4-Mar-19 4:28
Vaclav_4-Mar-19 4:28 

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.