Can not compile/link simplest test on Ubuntu 18 (how to use UNIX_ENV, XMP_DynamicBuild and so on)
- Dominant language
- C++
- Stars
- 262
- Forks
- 110
- PR merge metrics
- No merged PRs in 30d
Description
Here's the simplest cpp file I wanted to compile with XMP Toolkit test.cpp:
```
#include "iostream"
#include
/*
#define XMP_DynamicBuild 1
//#define ENABLE_CPP_DOM_MODEL 1
#define UNIX_ENV 1
#define XMP_64 1
#define __LITTLE_ENDIAN__ 1
*/
#define XMP_INCLUDE_XMPFILES 1
// Must be defined to instantiate template classes
#define TXMP_STRING_TYPE std::string
// Ensure XMP templates are instantiated
#include "XMP.incl_cpp"
// Provide access to the API
#include "XMP.hpp"
int main(void)
{
std::cout << "Started to init SXMPMeta"</public/include directory:

2. Lib/x64 which contains dynamic *.so (only) files built into the /public/libraries/i80386linux_x64/release

All I wanted is compile this test.cpp file and see that both SXMPMeta and SXMPFiles were initialized successfully using libXMPCore.so and libXMPFiles.so.
3. Here's the command line:
version: g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
`g++ *.cpp -fpermissive -std=c++0x -I/home/ubuntu/tmp/test/Interface -std=c++0x -L/home/ubuntu/tmp/test/Lib/x64/ -static -o testXMP
`
Hundreds of errors were printed out:

**Can you please provide command line to compile and link this simple file ?** I see many variables were defined in the /samples/build/cmake , like compiler arguments:
-fPIC
-Wno-multichar
-funsigned-char
-m64
-fexceptions
-Wformat
-Wformat-security
-Wall
-Wno-reorder
-std=c++0x
-Os
some variable were defined:
-DENABLE_CPP_DOM_MODEL=1
-DUNIX_ENV=1
-DXMP_64=1
-DXMP_StaticBuild=1
-D__LITTLE_ENDIAN__=1
There is nothing about it in the XMPProgrammerGuide. The provided sample (ReadingXMP ) seems to use only the static libs.
Regards
Alex
Contributor guide
Research direction
Start with samples/build/cmake and the provided ReadingXMP sample to compare compiler definitions, library paths, and static versus dynamic linking. Reproduce the command with test.cpp and the XMP Toolkit SDK 2020.1 headers and libraries; done means the sample compiles, links, and initializes SXMPMeta and SXMPFiles successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, ubuntu
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100