Note that there are some explanatory texts on larger screens.

plurals
  1. POWhen compiling a static libssh2 library as i386 it always returns an x86_64 library
    primarykey
    data
    text
    <p>Been working on this for hours now so any insight would be greatly appreciated.</p> <p>I'm trying to compile libssh2 for the iPhone Simulator on OS X (I already have it compiled successfully for the device).</p> <p>I'm using the following environment variables and commands:</p> <pre><code>export DEVROOT=/Developer/Platforms/iPhoneSimulator.platform/Developer export SDKROOT=$DEVROOT/SDKs/iPhoneSimulator3.0.sdk export CC=$DEVROOT/usr/bin/gcc-4.2 export LD=$DEVROOT/usr/bin/ld export CPP=$DEVROOT/usr/bin/cpp-4.2 export CXX=$DEVROOT/usr/bin/g++-4.2 export AR=$DEVROOT/usr/bin/ar export AS=$DEVROOT/usr/bin/as export NM=$DEVROOT/usr/bin/nm export CXXCPP=$DEVROOT/usr/bin/cpp-4.2 export RANLIB=$DEVROOT/usr/bin/ranlib export LDFLAGS="-arch i386 -pipe -no-cpp-precomp -isysroot $SDKROOT -L/Users/&lt;USERNAME&gt;/Desktop/Dev/iphonesimulator-os/lib" export CFLAGS="-arch i386 -pipe -no-cpp-precomp -isysroot $SDKROOT -I/Users/&lt;USERNAME&gt;/Desktop/Dev/iphonesimulator-os/include" export CXXFLAGS="-arch i386 -pipe -no-cpp-precomp -isysroot $SDKROOT -I/Users/&lt;USERNAME&gt;/Desktop/Dev/iphonesimulator-os/include/" export CFLAGS=-m32 export CPPFLAGS=-m32 cd /Users/&lt;USERNAME&gt;/Desktop/Dev/src/gnupg-1.4.10 sudo ./configure --host=i386-apple-darwin --prefix=/Users/&lt;USERNAME&gt;/Desktop/Dev/iphonesimulator-os sudo make sudo make install cd /Users/&lt;USERNAME&gt;/Desktop/Dev/src/libgpg-error-1.7 sudo ./configure --host=i386-apple-darwin --prefix=/Users/&lt;USERNAME&gt;/Desktop/Dev/iphonesimulator-os --enable-shared=no sudo make sudo make install cd /Users/&lt;USERNAME&gt;/Desktop/Dev/src/libgcrypt-1.4.5 sudo ./configure --host=i386-apple-darwin --prefix=/Users/&lt;USERNAME&gt;/Desktop/Dev/iphonesimulator-os --enable-shared=no --with-gpg-error-prefix=/Users/&lt;USERNAME&gt;/Desktop/Dev/iphonesimulator-os --disable-asm sudo make sudo make install sudo ./configure --host=i386-apple-darwin --prefix=/Users/&lt;USERNAME&gt;/Desktop/Dev/iphonesimulator-os --with-libgcrypt-prefix=/Users/&lt;USERNAME&gt;/Desktop/Dev/src/libgcrypt-1.4.5 cd /Users/&lt;USERNAME&gt;/Desktop/Dev/src/libssh2-1.2.7 sudo make sudo make install </code></pre> <p>The dylib that is produced shows as x86_64 and when trying to use the static library .a file in the iPhone app is says libssh2.a, file was built for unsupported file format which is not the architecture being linked (i386).</p> <p>libgcrypt and the other required libraries have all compiled with no issue.</p> <p>Thanks in advance!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload