Use xcode to develop an application based on the network library ace

Source: Internet
Author: User

Environment: macosx10.6.5 xcode 3.2.5 ace 6.0.0

Ace is from memory. Besides, it is not likely to be generated using the MPC.

On the console, go to the ace_wrappers directory that you decompressed. First, compile the create a bash Profile

cd …../ACE_wrappers export ACE_ROOT=$(pwd) echo "export ACE_ROOT=$ACE_ROOT" >> bash_profile echo "export LD_LIBRARY_PATH=$ACE_ROOT/ace:$ACE_ROOT/lib" >> bash_profile echo "export DYLD_LIBRARY_PATH=$ACE_ROOT/ace:$ACE_ROOT/lib" >> bash_profile echo "export MACOSX_DEPLOYMENT_TARGET=10.6" >> bash_profile. ~/.bashsrc

You can also add this sentence for a specific SDK version.

export CFLAGS="-g -O2-isysroot /Developer/SDKs/MacOSX10.6.sdk"

Create config. h In the ace_wrappers/ace directory. The content is as follows:

#include"ace/config-macosx-snowleopard.h"

Create platform_macros.gnu in the ace_wrappers/include/makeinclude directory. The content is as follows:

DEBUG = 1shared_libs = 0 // when you create a shared library, it is 1; otherwise, it is 0static_libs = 1 // when you create a static library, it is 1, otherwise 0 include $ {ace_root}/include/makeinclude/platform_macosx_snowleopard.gnu install_prefix =/opt/local

Go back to the console and make the entire Ace

 cd $ACE_ROOT
make

Then you can see the links of each static library under $ ace_root/lib, such as libace. A and libgateway..

Next, installace/usr/local to the system. Sub-directories include and LIB can be sudo mkdir if they are not available.

 sudo ln -s $ACE_ROOT/ace/usr/local/include/ace(incluce)
sudo ln -s $ACE_ROOT/ace/libACE.a/usr/local/lib/

Open xcode, add existing frameworks to the new C ++ project, and find/usr/local/lib/libace..

The next step is the # include <ace ***. h> header.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.