Click here to Skip to main content
15,797,604 members
Home / Discussions / Linux Programming
   

Linux Programming

 
GeneralRe: system call syntax ? Pin
Vaclav_7-Feb-19 11:23
Vaclav_7-Feb-19 11:23 
GeneralRe: system call syntax ? Pin
k50547-Feb-19 12:20
mvek50547-Feb-19 12:20 
AnswerRe: system call syntax ? Pin
Richard MacCutchan7-Feb-19 23:26
mveRichard MacCutchan7-Feb-19 23:26 
GeneralRe: system call syntax ? Pin
Vaclav_8-Feb-19 4:23
Vaclav_8-Feb-19 4:23 
GeneralRe: system call syntax ? Pin
Richard MacCutchan8-Feb-19 5:56
mveRichard MacCutchan8-Feb-19 5:56 
GeneralRe: system call syntax ? Pin
k50548-Feb-19 6:23
mvek50548-Feb-19 6:23 
GeneralRe: system call syntax ? Pin
Richard MacCutchan8-Feb-19 6:53
mveRichard MacCutchan8-Feb-19 6:53 
GeneralRe: system call syntax ? Pin
Vaclav_8-Feb-19 10:42
Vaclav_8-Feb-19 10:42 
C++
int iCPU = 0;
	iCPU = omp_get_num_procs();
	//iCPU = system ("omp_get_num_procs");
	cout << "# of CPU's " << dec << +iCPU << endl;
	exit(1);


Using system( ) because without it I get



C++
./src/VNA_1022_BASE.o: In function `main':
/media/jim/DEV/Eclipse_2019_03_M1/workspace/eclipse-workspace/VNAR_19280/Debug/../src/VNA_1022_BASE.cpp:253: undefined reference to `omp_get_num_procs'
makefile:80: recipe for target 'VNAR_19280' failed
collect2: error: ld returned 1 exit status
make: *** [VNAR_19280] Error 1
"make all" terminated with exit code 2. Build might be incomplete.




I believe it is NOT only syntax issue, but something is missing in setting OpenMP.
I'll take a look at the verbose output of both complier and linker to see anything obvious.
GeneralRe: system call syntax ? Pin
k50548-Feb-19 11:03
mvek50548-Feb-19 11:03 
GeneralRe: system call syntax ? Pin
Vaclav_8-Feb-19 15:37
Vaclav_8-Feb-19 15:37 
GeneralRe: system call syntax ? Pin
Richard MacCutchan8-Feb-19 23:27
mveRichard MacCutchan8-Feb-19 23:27 
Questionfrom "ls" to C++ buffer? Pin
Vaclav_15-Jan-19 5:03
Vaclav_15-Jan-19 5:03 
AnswerRe: from "ls" to C++ buffer? Pin
k505415-Jan-19 7:02
mvek505415-Jan-19 7:02 
GeneralRe: from "ls" to C++ buffer? Pin
Vaclav_15-Jan-19 10:10
Vaclav_15-Jan-19 10:10 
GeneralRe: from "ls" to C++ buffer? Pin
k505415-Jan-19 21:37
mvek505415-Jan-19 21:37 
AnswerRe: from "ls" to C++ buffer? Pin
Vaclav_15-Jan-19 15:30
Vaclav_15-Jan-19 15:30 
GeneralRe: from "ls" to C++ buffer? Pin
Richard MacCutchan15-Jan-19 22:24
mveRichard MacCutchan15-Jan-19 22:24 
GeneralRe: from "ls" to C++ buffer? Pin
Vaclav_16-Jan-19 8:05
Vaclav_16-Jan-19 8:05 
GeneralRe: from "ls" to C++ buffer? Pin
Richard MacCutchan16-Jan-19 9:20
mveRichard MacCutchan16-Jan-19 9:20 
GeneralRe: from "ls" to C++ buffer? Pin
Vaclav_16-Jan-19 16:03
Vaclav_16-Jan-19 16:03 
Questionioctl - from code to hardware Pin
Vaclav_3-Jan-19 5:41
Vaclav_3-Jan-19 5:41 
SuggestionRe: ioctl - from code to hardware Pin
Richard MacCutchan3-Jan-19 7:31
mveRichard MacCutchan3-Jan-19 7:31 
GeneralRe: ioctl - from code to hardware Pin
Vaclav_3-Jan-19 12:03
Vaclav_3-Jan-19 12:03 
GeneralRe: ioctl - from code to hardware Pin
Richard MacCutchan3-Jan-19 23:11
mveRichard MacCutchan3-Jan-19 23:11 
GeneralRe: ioctl - from code to hardware Pin
Vaclav_4-Jan-19 6:36
Vaclav_4-Jan-19 6:36 

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.