# Amalgamation problems with Xcode 6.4 when compiling for device

**URL:** <https://discuss.zetetic.net/t/amalgamation-problems-with-xcode-6-4-when-compiling-for-device/682>\
**Category:** Issues\
**Created:** [July 24, 2015, 1:17pm UTC](https://discuss.zetetic.net/t/amalgamation-problems-with-xcode-6-4-when-compiling-for-device/682 "2015-07-24T13:17:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lutz](https://avatars.discourse-cdn.com/v4/letter/l/c4cdca/32.png) [@Lutz](https://discuss.zetetic.net/u/Lutz)\
**Post date:** [July 24, 2015, 1:17pm UTC](https://discuss.zetetic.net/t/amalgamation-problems-with-xcode-6-4-when-compiling-for-device/682/1 "2015-07-24T13:17:28Z")

</div>

Hi,

I followed your instruction to from here: [https://www.zetetic.net/sqlcipher/ios-tutorial/](https://www.zetetic.net/sqlcipher/ios-tutorial/)

When compiling for the simulator everything works fine, but when compiling for the device I see the following error in the config.log:

```
-- snip ---
configure:2891: checking whether the C compiler works
configure:2913: gcc -DSQLITE_HAS_CODEC -DSQLITE_TEMP_STORE=2 conftest.c >&5
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr/lib/libSystem.dylib, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr/lib/libSystem.dylib (3 slices)
ld: dynamic main executables must link with libSystem.dylib for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
configure:2917: $? = 1
configure:2955: result: no
configure: failed program was:
| /* confdefs.h */
-- snip ---

```

The result is, that there’s no sqlite3.c and the project fails to compile. I saw that there was a similar issue ([Unable to configure and make sqlite3.c from Xcode 6.1](https://discuss.zetetic.net/t/unable-to-configure-and-make-sqlite3-c-from-xcode-6-1/281/5)), but I am already using the latest master branch ☹ .

Any idea how I can fix this?

Thank you!

Cheers, Michael
