[Scons-users] scons and openmp problem

Bill Deegan bill at baddogconsulting.com
Thu May 5 13:26:31 EDT 2016


Do you have multitple versions of gcc installed?
What's the path to the one you want to use?

My first guess is you're picking up and older version of g++ from /usr/bin
and your gcc 5.3.0 is installed elsewhere so you'll have to be explicit
about it's location.

-Bill

On Thu, May 5, 2016 at 1:10 PM, mohammed shambakey <shambakey1 at gmail.com>
wrote:

> Hi
>
> I'm trying to compile a c++ program that has openmp reduction clause. When
> running scons, it gives me the following error:
>
> scons: Building targets ...
> g++ -o etc/section.o -c -Wall -fopenmp -O2 -Ietc -Ilib etc/section.cc
> etc/section.cc: In function 'int data_location(Section*, char*)':
> etc/section.cc:18: error: expected '+', '*', '-', '&', '^', '|', '&&', or
> '||' before 'min'
> scons: *** [etc/section.o] Error 1
> scons: building terminated because of errors.
>
> I tried to compile the etc/section.cc file with g++ only as indicated in
> the second line in the above error as follows:
>
> g++ -o etc/section.o -c -Wall -fopenmp -O2 -Ietc -Ilib etc/section.cc
>
> and it compiled correctly.
>
> The g++ version is g++ (GCC) 5.3.0, with support for openmp 4.0. I tried
> simple example for "reduction" with "min" operation and it worked correctly
> when compiled with g++ (I haven't tried it with scons)
>
> I don't know what is wrong?
>
> Thanks
>
> --
> Mohammed
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20160505/e286621c/attachment.html>


More information about the Scons-users mailing list