Adding minizip Objective-C breaks

I am trying to add ZipArchive to my project by following the wiki page. I added it to my project and tried to build, but now NSObjRuntime.h, NSObject.h and countless other header files have problems with the analysis!

I included a screenshot of my workspace

workspace

and mistakes ...

errors

More about the project.

  • Creation vs iOS5.
  • Using ARC.
+8
objective-c xcode
source share
4 answers

So, I finally figured it out. Instead of adding groups and adding files to these groups, I dragged the ZipArchive folder into the project. In the dialog that appears ... I selected "Create folder links for any added folders."

Copy image

This gave me BLUE folders in my workspace, and now everything compiles.

Blue folders

Although, now I need to find out the difference between folder links and group links.

+6
source share

The solution we found is to change the File Type for all .c files in the minizip folder from C-Source to Objective-C source on the "Identification and Type" tab on the right side.

It works for us.

Good luck.

+5
source share

The problem is probably related to Objective-C in your C files. This could be caused by an import in your PCH. You need to wrap them in #ifdef __OBJC__

i.e.

 #ifdef __OBJC__ #import "SomeObjecitveCFile.h" #endif 
+4
source share

Dragging and dropping the ZipArchive folder into the project did not work for me. Instead, I dragged the minizip folder to the same folder where I added the ZipArchive.h and ZipArchive.m files separately. I selected "Create folder links for any added folders." Reason: In the ZipArchive.h file we do

  #include "minizip/zip.h" #import "AppDelegate.h" #include "minizip/unzip.h" 
+1
source share

All Articles