]> git.tdb.fi Git - builder.git/blobdiff - source/executable.cpp
Revamp problem reporting system to be more useful
[builder.git] / source / executable.cpp
index d1cc59aa174c278dac0c533e12254cbbbf71c5b7..0cae259f8b7b755bf74da0913a516ecafbd7d09a 100644 (file)
@@ -5,7 +5,8 @@ Copyright © 2006-2007 Mikko Rasa, Mikkosoft Productions
 Distributed under the LGPL
 */
 
-#include <iostream>
+#include <msp/path/utils.h>
+#include <msp/strings/formatter.h>
 #include "builder.h"
 #include "component.h"
 #include "executable.h"
@@ -59,8 +60,7 @@ void Executable::find_depends()
                                        queue.push_back(&stlib->get_component());
                        }
                        else
-                               cout<<"Couldn't find library "<<*i<<" for "<<name<<'\n';
-                               //XXX Throw an exception here or something
+                               builder.problem(comp.get_package().get_name(), format("Couldn't find library %s for %s", *i, Path::basename(name)));
                }
        }
 
@@ -89,7 +89,7 @@ we need to pass the value to the Target c'tor.
 */
 string Executable::generate_target_name(const Component &c)
 {
-       string prefix,suffix;
+       string prefix, suffix;
        const string &arch=c.get_package().get_arch();
 
        if(c.get_type()==Component::LIBRARY)