In my test.cpp I have:
#include <iostream>
#include "first.h"
using namespace std;
int main ()
{
    auto dliste = d::data_preparation::prepare_d(100);
    cout << "Hello World!\n";
    return 0;
}
In my first.h I have:
namespace d {
    namespace data_preparation {
        something;
        std::vector<row<mdata::dliste>> prepare_d(int f);
        something;
    }
}
In my first.cpp I have:
#include "first.h"
something;
namespace d {
    namespace data_preparation {
        vector<row<mdata::dliste>> prepare_d(int f) {
            vector<row<mdata::dliste>> dliste;
            cout << f << '\n';
            return dliste;
        }
    }
}
When I compile this I get:
undefined reference to `d::data_preparation::prepare_d(int)'
EDITED
In my Makefile I have:
test: test.o
        $(CXX) -o $@ $(LDFLAGS) $^ $(LDLIBS)
Should I modify it somehow?
 
    