How to get rid of the warning “file was built for unsupported file format” when linking with a static library?

前端 未结 3 1912
鱼传尺愫
鱼传尺愫 2020-12-13 03:10

I\'ve an application which includes an external library I developed, and I\'m getting the following warning message every time I compile using the device as target:

3条回答
  •  旧时难觅i
    2020-12-13 03:34

    I was having this same problem with the SQLite 3 library (libsqlite3.dylib). I opened up an older project and the same library compiled. I compared the Target Info > Build Settings > Search Paths on each project, and while the older (working) project was empty, there were multiple search paths in "Framework Search Paths" in the newer project. Deleting all of them solved the issue. Hope this helps someone, this took me many, many hours to figure out.

提交回复
热议问题