Function() declared but not defined

Hallo rooters,

I want create my own header-file, but the error “function() declared but not defined” occurs.
As a simple example I wrote:
analog.h:

#ifndef analog_H_INCLUDED #define analog_H_INCLUDED void analog(); #endif

analog.cpp:

#include "analog.h"
void analog()
{
// do sth.
}

main:

#include "analog.h" void pdAnalyzer(){ analog(); }

Compiling this doesn’t work. What is wrong?

Thanks!

I get no problem: root [0] .L analog.cpp++ Info in <TUnixSystem::ACLiC>: creating shared library /.../analog_cpp.so root [1] .L pdAnalyzer.cpp++ Info in <TUnixSystem::ACLiC>: creating shared library /.../pdAnalyzer_cpp.so root [2]