how to compile an own test

[email protected]
Newsgroups gmane.science.robotics.orocos.user
Message-ID <[email protected]>
we have written a simple test file (prova.cpp) and we want to compile it with a
gnulinux system 

#include "os/fosi.h"
#include "UnitTest.hpp"
#include <TaskNonPreemptible.hpp>
using namespace StoneHead;
class TaskOne : public TaskNonPreemptible
{
public:
        TaskOne()
        : TaskNonPreemptible(0.001)   // period is 1ms
        { // constructor, executed once on new ... }
        ~TaskOne()        { // destructor, executed on delete ... }
        void initialise() { cout<<"inizialize"; }
        void step()       { // your periodic task code ... }
        void finalise()   { cout<<"finalize"; }
};
void initFunction()
{
        task1 = new TaskOne(); // constructor called
        task1->start();        // initialise is called once
                               // step is executed periodically
}
void termFunction()
{
        task1->stop();         // step is no longer called, finalise is called.
        delete task1;          // call destructor
}
int UTInit (int param)
{
TaskOne* task1;
initFunction();
}
int UTCleanup()
{
termFunction();
}

Is this code compilable ? 

We  have changed the tests/MakeFile.am and /configure.ac files as shown in the
online manual, but  the compilation process exits with this error:
 make[1]: *** No rule to make target `test_prova-gnulinux', needed by `all-am'.
 Stop.

This are the lines added in MakeFile.am:

test_prova_gnulinux_SOURCES = prova.cpp module.c
test_prova_gnulinux_LDADD = -L ../src -lorocos_core-gnulinux -lstdc++

Can you help us?

Regards
Piercarlo
Fabrizio
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.