passing vectors by reference

What am I doing wrong here?

1
2
3
4
5
6
7
8
9
10
11
12
13
class Demod {
private:
	DemodNyq	dnI;
	DemodNyq	dnQ;
	vector<int32_t>	phaseBufferI;
	vector<int32_t>	phaseBufferQ;
...
void Demod::cycle(bool clockEnable,
		   bool resetFlag)
{
		dnI.cycle(phaseBufferI,
			 clockEnable,
			 resetFlag);


And the dnI cycle declaration looks like this:

1
2
3
	void cycle(vector<int32_t>& nyqInp,
			   bool	clockEnable,
			   bool	resetFlag);


But I'm getting an undefined symbol error for the (dnI) cycle routine. This doesn't occur when I pass the vector by value, but...I'd much rather pass it by reference.

Thanks.
cycle(vector<int32_t>&,bool,bool) is seemingly, in the global scope. It's not a member of DemodNyq.
Sorry for the confusion: here's the full class declaration:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
class DemodNyq {
private:
	vector<DemodNyqCell>	cells;
	vector<int32_t>			inpBuffer;
	vector<int32_t>			coeffs;
public:
	DemodNyq(int32_t rv);
	DemodNyq(const DemodNyq &d);
	~DemodNyq();
	void cycle(vector<int32_t>& nyqInp,
			   bool	clockEnable,
			   bool	resetFlag);
	void reset();
};


The actual routine:

1
2
3
4
5
6
7
8
void DemodNyq::cycle(vector<int32_t>& nyqInp,
					 bool	clockEnable,
					 bool	resetFlag) {
	int i, j, k, index;

	if (resetFlag)
	{
...
What's the error?
Undefined symbols:
"DemodNyq::cycle(std::vector<int, std::allocator<int> >, bool, bool)", referenced from:
Demod::cycle(bool, bool)in demod.o
Demod::cycle(bool, bool)in demod.o


Again, it's only when I try to pass by reference.
The error doesn't mention references. Do you happen to have by any chance a second declaration that passes by value (to be honest, I'm not sure that'd be valid).
Doesn't appear so, but...I just rebuilt my entire project, and the problem magically disappeared. (I think qmake has some bugs in it.) Thanks for looking; I appreciate it.
Topic archived. No new replies allowed.