enabling altivec in XCode
enabling altivec in XCode
- Subject: enabling altivec in XCode
- From: Michael Hanna <email@hidden>
- Date: Tue, 1 Feb 2005 21:41:49 -0500
This may be a bit off-topic, but I'd imagine there are vDSP users here..
in the /Developer/Examples/Accelerate/vDSP/vDSPExamples/main.c
there is
#if defined(__VEC__)
...stuff
#endif
well when I compile it, it compiles and runs fine without error.
However when I created my own project, main.c :
#if defined(__VEC__)
Boolean HasAltiVec(void) {
int mib[2], gHasAltivec;
size_t len;
mib[0] = CTL_HW;
mib[1] = HW_VECTORUNIT;
len = sizeof(gHasAltivec);
sysctl(mib, 2, &gHasAltivec, &len, NULL, 0);
return (gHasAltivec != 0);
}
#endif
int main (int argc, const char * argv[]) {
// insert code here...
Boolean hasVectorUnit = HasAltiVec();
printf("Hello, World!\n %d", hasVectorUnit);
return 0;
}
I get an error
[Session started at 2005-02-01 21:12:12 -0500.]
ZeroLink: unknown symbol '_HasAltiVec'
Executable “Test_vdsp” has exited due to signal 6 (SIGABRT).
so it seems it can't find Boolean HasAltiVec(void) so I checked the
XCode settings, and I noticed the "Enable Altivec Extensions" checkbox.
Still no difference. I noticed that the vDSPExamples project doesn't
even have this setting on and it still seems to work. How do I enable
Altivec?
regards,
Michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden