Skip to content

Commit 6724117

Browse files
authored
DOC-9047-C3 -- Resolve C Install issues (#507)
https://issues.couchbase.com/browse/DOC-9047
1 parent 99d59b9 commit 6724117

File tree

2 files changed

+48
-46
lines changed

2 files changed

+48
-46
lines changed

antora.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ version: '3.0'
33
title: Couchbase Lite
44
start_page: ROOT:index.adoc
55
nav:
6-
- modules/ROOT/nav.adoc
6+
- modules/android/nav-android.adoc
7+
- modules/clang/nav-clang.adoc
8+
- modules/csharp/nav-csharp.adoc
9+
- modules/java/nav-java.adoc
10+
- modules/objc/nav-objc.adoc
11+
- modules/swift/nav-swift.adoc
12+
- modules/ROOT/nav-javascript.adoc
713
asciidoc:
814
attributes:
915
prerelease: BETA

modules/clang/pages/gs-install.adoc

Lines changed: 41 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ include::{root-partials}_get-started-topic-group.adoc[]
1515

1616
:rootdir: pass:q,a[`libcblite-3.0.0`]
1717

18-
== Package
18+
== Download Contents
1919

2020
_Couchbase Lite for C_ **beta** is available as a compressed binary download -- see: https://tbd
21-
The unpacked released package contains these directories within the root directory ({rootdir}):
21+
The unpacked download's root directory ({rootdir}) contains these directories:
2222

2323
* `lib` +
2424
The `lib` folder contains binaries and other packaging components
@@ -27,15 +27,12 @@ The unpacked released package contains these directories within the root directo
2727
* `bin` (*Windows-only*) +
2828
Contains the Couchbase Lite for C `.dll` files.
2929

30-
Installation will vary by platform and compiler, but you can use these steps to install Couchbase Lite for C on any of the supported platforms:
30+
Installation will vary by platform and compiler, but you can use these steps to install Couchbase Lite for C on any of the supported platforms -- see <<lbl-steps>>.
3131

32-
<<lbl-linux-steps, Linux>> |
33-
<<lbl-windows-steps, Windows>> |
34-
<<lbl-mac-steps, Mac OS>>
3532

3633
== Platforms
3734

38-
WARNING: For BETA releases, only the downloadable release package option is available
35+
WARNING: For BETA releases, only the downloadable binary release option is available
3936

4037
.Couchbase Lite for C installation options
4138
[#tbl-inst-opts,cols="^1,2m,2a", options="header"]
@@ -44,7 +41,7 @@ WARNING: For BETA releases, only the downloadable release package option is avai
4441
|Platform
4542
2+^|Options
4643

47-
|GNU/Linux
44+
|Linux
4845
a|* <<lbl-linux-repos,apt>>
4946
* binary libraries
5047
.3+.^|It may also be downloaded from: https://tbd
@@ -59,54 +56,51 @@ a|* <<lbl-linux-repos,apt>>
5956
|===
6057

6158

62-
63-
== Linux
64-
65-
=== Release Package
59+
[#lbl-steps]
60+
== How-to Install
61+
====
62+
[{tabs}]
63+
=====
64+
Linux::
65+
+
66+
--
6667
[#lbl-linux-repos]
67-
// include::{root-partials}_block-caveats.adoc[tags="not-beta"]
68-
6968
The various Linux distributions contain the following packages within the root directory, {rootdir}:
7069

7170
[#tbl-linux-pkgs,cols="1,4", options="noheader"]
7271
|===
7372

74-
|``**lcblite**``
73+
|`lib`
7574
| The core library package for running
7675

77-
|``**lcblite-dev**``
76+
|`include`
7877
|The headers and development files for _inclusion_
7978

8079
|===
8180

82-
=== Install from Download
8381

8482
[#lbl-linux-steps]
85-
====
86-
. *Download* and *Unpack* the release package
87-
. From within the root directory, {rootdir},
88-
.. Copy the following directories to a location already in the system path (for example, `/usr/include` or `/usr/local/lib`)
89-
** lcblite
90-
** lcblite-dev
83+
. *Download* and *Unpack* the binary release
84+
. From within the root directory, {rootdir}, copy the following directories to an appropriate location
85+
*** lib
86+
*** include
87+
9188
+
92-
Your compiler will detect them automatically with no alterations needed
89+
TIP: If you copy these to locations already in the system path (for example, `/usr/include` or `/usr/local/lib`), then your compiler will detect them automatically with no alterations needed
9390

94-
.. Alternatively:
95-
... Add the `lcblite` location to your compiler's include path -- `<path-to>/lcblite`
96-
... Add the `lcblite-dev` location to your compiler's linker search path -- `<path-to>/lcblite`
91+
. Add the `lib` location to your compiler library search path (`-L`) -- `<path-to>/lib`
92+
. Add the `include` location to your compiler's include path (`-I`) -- `<path-to>/include`
9793

9894
. Link with the binaries library using, for example, `gcc -lcblite`.
99-
====
100-
10195

10296
If you are familiar with _CMake_, then you can use this as a method of creating cross-platform projects; including Couchbase Lite itself.
10397
As a convenience, the release package includes a _CMake_ file in `lib/cmake/CouchbaseLite`
98+
--
10499

105-
106-
[#install-windows]
107-
== Windows
108-
109-
To install the Couchbase for C libraries on Windows from a downloaded release package:
100+
Windows::
101+
+
102+
--
103+
To install the Couchbase for C libraries on Windows from a downloaded release binary:
110104

111105
[#lbl-windows-steps]
112106
. Download and extract the release package from http://tbd
@@ -119,35 +113,37 @@ Ensure you select the correct package for your application's compiler and archit
119113
.. *Create* a new C++ project
120114
+
121115
Be sure to select x64 for 64-bit builds
122-
.. Within *Project Properties* -> *C++ directories* -> *Include Directories*
123-
... *Add* `<path-to-deployed-directories>/include`
124-
... *Add* `<path-to-deployed-directories>/lib`
116+
.. Within *Project Properties* -> *C++ directories* -> *Library Directories*, *Add* `<path-to-deployed-directories>/lib`
117+
.. Within *Project Properties* -> *C++ directories* -> *Include Directories*, *Add* `<path-to-deployed-directories>/include`
125118
.. Within *Project Properties* -> *Linker* -> *Input* -> *Additional Dependencies*, *Add* `cblite.lib`
126119
. *Copy* `<path-to-deployed-directories>/bin/cblite.dll` to your build location
127120
+
128121
Couchbase Lite for C does not have any preferred installation path for the `.dll`.
129122
It is up to you to determine where best to place it so it is available during execution, though copying to a location on the system path is not recommended on Windows
123+
--
130124

131-
You will now be able to build and run your app .
132-
133-
134-
== Mac OS
125+
Mac OS::
126+
+
127+
--
135128

136129
To install the Couchbase for C libraries on Mac OS X from a downloaded release package:
137130

138131
[#lbl-mac-steps]
139132
. Download and extract the release package from http://tbd
140133
// codesign -sv <location>/lib/libcblite.3.dylib (note if you don't have an Apple developer account this won't work)
141-
. From within the root directory, {rootdir}, *Copy* the `include` and `lib` folders to `/usr/local/`
134+
. Ootionally ... From within the root directory, {rootdir}, *Copy* the `include` and `lib` folders to `/usr/local/`
142135
. Within _Xcode_:
143136
.. *Create* a new project
144-
.. *Add* `/usr/local/include` to the project's _Header Search Path_
145-
.. *Add* `/usr/local/lib` to the project's _Library Search Path_
137+
.. *Add* `<path/to>/include` to the project's _Header Search Path_
138+
.. *Add* `<path/to>/lib` to the project's _Library Search Path_
146139
.. *Drag* `libcblite.3.dylib` into your Xcode project, then within the dialog:
147140
... *Select* _Create Folder References If Needed_
148141
... *Check* the correct target is selected
142+
--
143+
=====
149144
150-
You will now be able to build and run your app from Xcode.
145+
On completion of the above steps you will be able to build and run your app.
151146
147+
====
152148

153149
include::{root-partials}block-related-content-start.adoc[]

0 commit comments

Comments
 (0)