X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flink.cpp;h=7cbdc03c84db1b0b7dbaaa4f96d54fcfc6935d74;hb=1a46151c99a406123c4ddfc797a7841baf3e4cc2;hp=96089da8b58116ee24d95b9d57171bca04d0cd8c;hpb=f1c967215e6b08095bdf07518472beca3067ec37;p=builder.git diff --git a/source/link.cpp b/source/link.cpp index 96089da..7cbdc03 100644 --- a/source/link.cpp +++ b/source/link.cpp @@ -9,9 +9,12 @@ using namespace std; using namespace Msp; -Link::Link(Builder &b, const Executable &exe, const Component &comp): +Link::Link(Builder &b, const Executable &exe): ExternalAction(b) { + const Component &comp=exe.get_component(); + + //XXX Determine whether to use g++ or gcc argv.push_back("g++"); if(comp.get_type()==Component::LIBRARY) @@ -27,8 +30,8 @@ Link::Link(Builder &b, const Executable &exe, const Component &comp): argv.push_back("-o"); argv.push_back(exe.get_name()); - const list &deps=exe.get_depends(); - for(list::const_iterator i=deps.begin(); i!=deps.end(); ++i) + const TargetList &deps=exe.get_depends(); + for(TargetList::const_iterator i=deps.begin(); i!=deps.end(); ++i) if(dynamic_cast(*i)) argv.push_back((*i)->get_name());