
Dear all,
I have a peculiar problem when compiling my unit tests. The reason why I
find it peculiar is that I can compile the same code in a normal
function just fine. Here is what I have in a main function:
// std
#include <iostream>
// project
#include "headers/common_definitions.hpp"
#include "classes/C_ParameterManager.hpp"
int main(int argc, char** argv) {
using std::cout;
using std::endl;
gsl_error_handler_t* const old_handler = gsl_set_error_handler_off();
rfn::ParameterManager* my_test = NULL;
my_test->instance(rfn::flow_evolved);
cout << my_test->instance() << endl;
return (EXIT_SUCCESS);
The ParameterManager::instance function is declared as follows:
static ParameterManager* instance(const FunctionalNetworkScheme scheme);
and in the main function it correctly returns a pointer.
For testing purposes I use the following code:
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE rfn test suite
// project
#include "../headers/common_definitions.hpp"
#include "../classes/C_ParameterManager.hpp"
// boost
#include