Lexical or Preprocessor issue ‘xxx.h’ file not found

公開日: : iPad, iPhone ,

NSMutableArray に要素をランダムに並び替える機能を入れようと思い、
objective c – What's the Best Way to Shuffle an NSMutableArray? – Stack Overflow
を見て、NSMutableArray にカテゴリを追加するために .h .m を追加したところ、ビルド時に
Lexical or Preprocessor issue ‘xxx.h’ file not found
が発生。いろいろ試したが解決できない。

いつものようにこのエラー文言で検索したところ下記を発見。
Lexical or Preprocessor issue 'Xxx.h' file not found – 悪あがきプログラマー
Xcode4再起動でビルドできるようになった。

たまにXcode再起動で直る問題がありますな…

本題と関係ないけれども、追加したカテゴリはこちら。

//  NSMutableArray_Shuffling.h
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#else
#include <Cocoa/Cocoa.h>
#endif

// This category enhances NSMutableArray by providing
// methods to randomly shuffle the elements.
@interface NSMutableArray (Shuffling)
- (void)shuffle;
@end

#import “NSMutableArray_Shuffling.h”

@implementation NSMutableArray (Shuffling)

– (void)shuffle
{
NSUInteger count = [self count];
for (NSUInteger i = 0; i < count; ++i) { // Select a random element between i and end of array to swap with. int nElements = count - i; int n = (arc4random() % nElements) + i; [self exchangeObjectAtIndex:i withObjectAtIndex:n]; } } @end [/c]

関連記事

no image

App Storeの売り上げを簡単に確認できるMacアプリAppViz

App Storeでのアプリの毎日の売り上げを確認したい場合、これまでは AppSalesを使ってい

記事を読む

no image

確かに薄い iPhoneケース eggshell iPhone クリア

試しにiPhoneアプリのwordpressで更新してみる。 とにかく薄いiPhoneケースがほしく

記事を読む

no image

MacPeople 2010.02

定期購読している MacPeople 2010年2月号が今日届いた。 今回はメールアプリとUbunt

記事を読む

Topeak Ridecase for iPhone 7 Plus は2017年1月発売

(画像はiPhone 6 Plus 用 Ridecase)7月にTopeak Ridecase fo

記事を読む

ようやくAppStore に Submit

@ITの 日本人がつまずかないためのiPhone開発ポイント を読みながらAppStoreにアプリ公

記事を読む

no image

初代 iPad mini 16GB ブラックスレート注文

予約は10/26(金)16:00 きっかりに開始され、iPad mini 16GB ブラックスレート

記事を読む

[iOS SDK] iPhone 6 Plus を Xcode に追加する

なぜか毎回新規デバイス追加に少し手間取ってしまう。 今回は先日購入した iPhone 6 Plus

記事を読む

Apple Event Sep 2022 Far Out

毎年恒例の Apple Event が 2022/09/07 に行われた。日本時間は 9/8 2:

記事を読む

no image

タッチ!にほんちずHD Ver.1.1.0 Submit

タッチ!にほんちずHDのバージョンアップ版(Ver.1.1.0)を App Store に提出しまし

記事を読む

no image

[iOS SDK] iOS5 の Twitter 機能を利用してみる

iOS5でシンプルツイッター機能をあなたのアプリにも。 | mipoiApp-iPhoneアプリ

記事を読む

Message

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください

ポモドーロテクニック用物理タイマーならTime Timer

会社ではなかなか自由に時間を使えないが、家で読書や作業をする

DELL 32インチディスプレイ U3223QE 購入

Dell U3223QE は解像度 3840x216

WWDC 2023 Vision Pro発表

2023/6/5 (日本時間 2023/06/06 2AM)のWWD

M1 MacBook Air を Venturaにアップデートする

M1 MacBook Air を macOS Montere

iOS16でaurioTouch の inBufferFramesが1になる

https://developer.apple.com/librar

→もっと見る

PAGE TOP ↑