- Code: Select all
****************************************************
// Test.h
int initCallBack(int (*callBack)(int cmd));
****************************************************
// Test.cpp
#include "Test.h"
int (*callBackP)(int cmd);
// initialize callback
int initCallBack(int (*callBack)(int cmd)) {
callBackP = callBack;
return 0;
}
****************************************************
However, I was able to get it to work correctly by prepending 'extern' to the hdr declaration. I guess my question now is, is this 'expected' behaviour by Und or am I still missing something? It's no big deal but I like things as simple as possible + none of my other hdr decs require 'extern'.
Thanks, Will.
