ld: library not found for -lz

前端 未结 2 871
无人共我
无人共我 2021-02-09 16:32

This is driving me crazy, when i try to compile on the simulator, everything is ok, but on the device i got this error:

ld: library not found for -lz
Command /De         


        
2条回答
  •  猫巷女王i
    2021-02-09 17:17

    i got the same error with a different library:

    ld: library not found for -lssl
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    

    to resolve this, under search paths -> user header search paths -> release i put:

    "$(BUILD_ROOT)/../IntermediateBuildFilesPath/UninstalledProducts/include"
    

    keep in mind that I get this bug only when I archive, and my archive is a based off my release scheme..


    update: I got the same problem (on a different occasion/project) for the lpods Library (ie cocoapods).. the way i figured out to solve this is by realizing that the build worked fine on my development scheme but not my debug scheme. basically the development scheme had no for build active architectures only whereas debug had yes. I simply changed debug to no in all the targets under cocoapods

提交回复
热议问题