Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

enabling altivec in XCode



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:
http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.