Comments (4)
waf dumplib --target=cphd03-c++
(adjust the target as appropriate) will give you the link flags you need to pass to gcc in the correct order.
You can also combine targets. E.g.
>> waf dumplib --target=six-c++
-lsix-c++.2.2.9 -lscene-c++.2.2.9 -lnitf-c++.2.8 -lxml.lite-c++.1.2 [...]
>> waf dumplib --target=six-c++,cphd03-c++
-lcphd03-c++ -lcphd-c++.2.2.9 -lsix.sicd-c++.2.2.9 -lsix-c++.2.2.9 -lscene-c++.2.2.9 [...]
from six-library.
Thanks, this helps
But when I try
g++ -L/usr/local/lib -I/usr/local/include -lcphd03-c++ -lcphd-c++.2.2.9 -lsix.sicd-c++.2.2.9 -lsix-c++.2.2.9 -lscene-c++.2.2.9 -lnitf-c++.2.8 -lxml.lite-c++.1.2 -llogging-c++.1.1 -lio-c++.1.0 -lmath.linear-c++.0.2 -lpolygon-c++.1.0 -lmt-c++.1.1 -lmem-c++.1.0 -lmath-c++.0.1 -lsys-c++.1.2 -lstr-c++.1.0 -lexcept-c++.1.0 -lXML_DATA_CONTENT-static-c.2.8 -lnitf-c.2.8 -lnrt-c -lxerces-c -ldl -lrt -lm print_cphd_header.cpp -std=c++11 -o ./go
I still get the error above. I've confirmed the files are in /usr/local/include
..
from six-library.
You need to have the libraries after the source file.
g++ -std=c++11 print_cphd_header.cpp -L/usr/local/lib -I/usr/local/include -lcphd03-c++ -lcphd-c++.2.2.9 -lsix.sicd-c++.2.2.9 -lsix-c++.2.2.9 -lscene-c++.2.2.9 -lnitf-c++.2.8 -lxml.lite-c++.1.2 -llogging-c++.1.1 -lio-c++.1.0 -lmath.linear-c++.0.2 -lpolygon-c++.1.0 -lmt-c++.1.1 -lmem-c++.1.0 -lmath-c++.0.1 -lsys-c++.1.2 -lstr-c++.1.0 -lexcept-c++.1.0 -lXML_DATA_CONTENT-static-c.2.8 -lnitf-c.2.8 -lnrt-c -lxerces-c -ldl -lrt -lm -o ./go
from six-library.
Awesome, thanks. In my case the library -lpthread
was needed too.
So the working compilation looked like this:
g++ -std=c++11 print_cphd_header.cpp -L/usr/local/lib -I/usr/local/include -lcphd03-c++ -lcphd-c++.2.2.9 -lsix.sicd-c++.2.2.9 -lsix-c++.2.2.9 -lscene-c++.2.2.9 -lnitf-c++.2.8 -lxml.lite-c++.1.2 -llogging-c++.1.1 -lio-c++.1.0 -lmath.linear-c++.0.2 -lpolygon-c++.1.0 -lmt-c++.1.1 -lmem-c++.1.0 -lmath-c++.0.1 -lsys-c++.1.2 -lstr-c++.1.0 -lexcept-c++.1.0 -lXML_DATA_CONTENT-static-c.2.8 -lnitf-c.2.8 -lnrt-c -lxerces-c -ldl -lrt -lm -lpthread -o ./go
from six-library.
Related Issues (20)
- Expose nitf::BandInfo to python
- CSM3.0.3 version is out of date HOT 2
- Build fails if tests are disabled
- Numpyutils-c++ unit test fails build on Centos 7
- Slow performance reading and writing AMP8I_PHS8I HOT 7
- Embedding xsd schemas HOT 1
- Compilation Error six-library 3.1.2
- CSM project not included in CMake build system
- Enums.cpp does not compile under C++11 HOT 2
- Incorrect partial derivatives from ProjectionModel::slantToImagePartials
- build with shared libs broken
- Unable to configure build on Windows
- The configuration failed (complete log in C:\source-engine-master\build\config.log)
- SIDD 2.0.0 reading fails if no LUT present HOT 1
- Broken Sample SICD Links
- Issue with trying to build six 3.2.4, "numpyutils/AutoPtr.h" not found HOT 1
- CPHD Reader for build HOT 1
- python cphd module has broken SWIG bindings
- Where can one acquire sample CPHD?
- Building, installing and linking with six-library
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from six-library.