GCC and xcode.

Joined
Jun 24, 2010
Messages
2
Reaction score
0
Points
1
Hi,
Is it possible to install GCC 4.5 in macos 10.6.4 and use in xcode 3.2.2?If possible how can i install it and use GCC4.5 in xcode 3.2.2?

How can i build the application using GCC4.5 in OSX 10.6.4 ?

The problem is our mac application crashes,while enabling openMp.The crash is observed in gomp_resolve_num_threads.
(GOMP_parallel_start at parallel.c:70
----> gomp_resolve_num_threads at parallel.c:48)

We are using MacOS 10.6.4 ,GCC 4.2 and xcode 3.2.2 .

Is there any solution for this?
-Thanks.
 
Joined
Feb 25, 2009
Messages
2,112
Reaction score
71
Points
48
Your Mac's Specs
Late 2013 rMBP, i7, 750m gpu, OSX versions 10.9.3, 10.10
Just out of curiosity, are you sure it's not a bug in your code? I went to OpenMP and compiled their test code on my system with Xcode 3.2.2 and it compiled and ran fine; granted it was extremely simple code, but it does appear that OpenMP is working at least on a basic level...

here's the code and my output:
Code:
#include <omp.h>
#include <stdio.h>
int main() {
#pragma omp parallel
printf("Hello from thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads());
}

output:
Code:
videoed-imac:test nethfel$ gcc -fopenmp omptest.c
videoed-imac:test nethfel$ ./a.out
Hello from thread 0, nthreads 2
Hello from thread 1, nthreads 2
videoed-imac:test nethfel$
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top