Another review of the documentation concerning pkg-config
This commit is contained in:
parent
77e2c417c7
commit
443edc6840
12
README.md
12
README.md
@ -417,18 +417,18 @@ $
|
||||
|
||||
#### Install MinGW Dependencies
|
||||
|
||||
Upgrade all installed packages on your system:
|
||||
|
||||
```
|
||||
$ pacman -Syu
|
||||
```
|
||||
|
||||
Install tools and dependencies:
|
||||
|
||||
```
|
||||
$ for i in base-devel git cmake coreutils python3 man gcc gdb make dos2unix diffutils zlib-devel libexpat-devel libiconv-devel; do (echo y|pacman -S $i); done
|
||||
```
|
||||
|
||||
You can upgrade all installed packages on your system with the following command. For me, this broke msys32 and I had to reinstall msys32 and all the dependencies. Your experience may be different.
|
||||
|
||||
```
|
||||
$ pacman -Syu
|
||||
```
|
||||
|
||||
#### Download exiv2 from github and build
|
||||
|
||||
```
|
||||
|
||||
@ -36,7 +36,7 @@ To compile and link your own code using installed library and include files
|
||||
---------------------------------------------------------------------------
|
||||
Method 1: Explicitly set include and linking options
|
||||
$ cd <bundle>
|
||||
$ g++ -std=c++98 samples/exifprint.cpp -I/usr/local/include -L/usr/local/lib -lexiv2 -o exifprint
|
||||
$ g++ -std=gnu++98 samples/exifprint.cpp -I/usr/local/include -L/usr/local/lib -lexiv2 -o exifprint
|
||||
$ export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
|
||||
$ ./exifprint --version
|
||||
exiv2=0.27.0
|
||||
@ -46,9 +46,9 @@ $
|
||||
|
||||
Method 2: Use pkg-config to set include and linking options
|
||||
$ cd <bundle>
|
||||
$ export PKG_CONFIG_PATH="/usr/local/share:$PKG_CONFIG_PATH"
|
||||
$ export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
$ export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
|
||||
$ g++ -std=c++98 samples/exifprint.cpp -o exifprint $(pkg-config exiv2 --libs --cflags)
|
||||
$ g++ -std=gnu++98 samples/exifprint.cpp -o exifprint $(pkg-config exiv2 --libs --cflags)
|
||||
$ ./exifprint
|
||||
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ $
|
||||
|
||||
Method 2: Use pkg-config to set include and linking options
|
||||
$ cd <bundle>
|
||||
$ export PKG_CONFIG_PATH="/usr/local/share:$PKG_CONFIG_PATH"
|
||||
$ export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
$ export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
|
||||
$ g++ -std=c++98 samples/exifprint.cpp -o exifprint $(pkg-config exiv2 --libs --cflags)
|
||||
$ ./exifprint
|
||||
|
||||
@ -33,6 +33,8 @@ $ for i in bin include lib share ; do sudo mkdir -p /usr/local/$i ; sudo cp -R $
|
||||
|
||||
To compile and link your own code using installed library and include files
|
||||
---------------------------------------------------------------------------
|
||||
Method 1: Explicitly set include and linking options
|
||||
$ cd <bundle>
|
||||
$ g++ -std=c++98 samples/exifprint.cpp -I/usr/local/include -L/usr/local/lib -lexiv2 -o exifprint
|
||||
$ export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
|
||||
$ ./exifprint --version
|
||||
@ -40,3 +42,11 @@ exiv2=0.27.0
|
||||
...
|
||||
xmlns=xmpidq:http://ns.adobe.com/xmp/Identifier/qual/1.0/
|
||||
$
|
||||
|
||||
Method 2: Use pkg-config to set include and linking options
|
||||
$ cd <bundle>
|
||||
$ export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
$ export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
|
||||
$ g++ -std=c++98 samples/exifprint.cpp -o exifprint $(pkg-config exiv2 --libs --cflags)
|
||||
$ ./exifprint
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ $
|
||||
|
||||
Method 2: Use pkg-config to set include and linking options
|
||||
$ cd <bundle>
|
||||
$ export PKG_CONFIG_PATH="/usr/local/share:$PKG_CONFIG_PATH"
|
||||
$ export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
$ export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
|
||||
$ g++ -std=c++98 samples/exifprint.cpp -o exifprint $(pkg-config exiv2 --libs --cflags)
|
||||
$ ./exifprint
|
||||
|
||||
Loading…
Reference in New Issue
Block a user