| ~~ Licensed to the Apache Software Foundation (ASF) under one or more |
| ~~ contributor license agreements. See the NOTICE file distributed with |
| ~~ this work for additional information regarding copyright ownership. |
| ~~ The ASF licenses this file to You under the Apache License, Version 2.0 |
| ~~ (the "License"); you may not use this file except in compliance with |
| ~~ the License. You may obtain a copy of the License at |
| ~~ |
| ~~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~~ |
| ~~ Unless required by applicable law or agreed to in writing, software |
| ~~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~~ See the License for the specific language governing permissions and |
| ~~ limitations under the License. |
| ------ |
| Building Apache log4cxx with Apple Xcode |
| ------ |
| ------ |
| ------ |
| |
| Building Apache log4cxx with Apple Xcode |
| |
| *Building log4cxx.dylib |
| |
| Open projects/log4cxx.xcodeproj with Xcode 2.4 or later, address issues described below |
| and build as normal. |
| |
| *Running unit tests |
| |
| Open projects/testsuite.xcodeproj or projects/testsuite-standalone.xcodeproj |
| (test suite and implementation in one project) in Xcode and address issues |
| described below. |
| |
| Select the executable in Groups & Files and press Info and |
| |
| * In the General pane, set Working Directory to Custom with path "../src/test/resources". |
| * In the Arguments pane, add following key value pairs to "Variables to be set in the environment": |
| TOTO=wonderful, key1=value1 and key2=value2. |
| |
| Individual tests can be specified by specifying the test name in |
| "Arguments to be passed on launch" Specifying "-v" as an argument |
| will run the tests in a verbose mode. |
| |
| *Issues |
| |
| Xcode fails when linking to apr and aprutil dylibs in /usr/lib, |
| however it will succeed linking to symbolic links to the same files. |
| As a workaround until a resolution is found: |
| |
| Create symbolic links to the libraries in some arbitrary directory: |
| |
| +-----+ |
| mkdir ~/apr-dylib |
| cd ~/apr-dylib |
| ln -s /usr/lib/libapr-1.dylib libapr-1.dylib |
| ln -s /usr/lib/libaprutil-1.dylib libaprutil-1.dylib |
| +------+ |
| |
| Then add the arbitary directory to the Library Search Paths |
| (Build tab of the Get Info page for the project). |
| |
| |
| The project file generation does does not |
| properly create an entry in the "Link Binary with Libraries" |
| build phase for projects that depend on log4cxx. To |
| work around the problem, open the project in Xcode and |
| in the Groups & Files pane, drag log4cxx.dylib |
| and drop on the "Link Binary with Libraries" folder |
| under Targets. |
| |
| See issue {{{http://issues.apache.org/jira/browse/LOGCXX-245}LOGCXX-245}} for further information. |