?我怎樣才能從C程序彙編代碼我用這個recommendation 我用這樣的-c -fmessage-length=0 -O2 -S
在Eclipse,但我有一個錯誤,在此先感謝您的幫助從C到裝配
現在我有這樣的錯誤
atam.c:11: error: conflicting types for 'select'
/usr/include/sys/select.h:112: error: previous declaration of 'select' was here
atam.c:11: error: conflicting types for 'select'
/usr/include/sys/select.h:112: error: previous declaration of 'select' was here
這是我的功能
int select(int board[],int length,int search){
int left=0, right=length-1;
while(1){
int pivot_index=(right+left)/2;
int ordered_pivot=partition(board,left,right,pivot_index);
if(ordered_pivot==search){
return board[ordered_pivot];
}
else if(search<ordered_pivot){
right=ordered_pivot-1;
}
else{
left=ordered_pivot+1;
}
}
}
Eclipse不是C編譯器,但我猜你正在使用GCC作爲後端,所以'-S'應該足夠了 – 2010-05-22 21:37:29