Giter VIP home page Giter VIP logo

Comments (4)

JonathanMeans avatar JonathanMeans commented on June 1, 2024

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.

khavernathy avatar khavernathy commented on June 1, 2024

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.

JonathanMeans avatar JonathanMeans commented on June 1, 2024

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.

khavernathy avatar khavernathy commented on June 1, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.