uint8_t and unsigned char linking error
Posted
by
mnn
on Stack Overflow
See other posts from Stack Overflow
or by mnn
Published on 2011-01-01T15:29:24Z
Indexed on
2011/01/01
15:54 UTC
Read the original article
Hit count: 254
I'm using template function:
template<typename T> void func(const T& value)
{
obj->func(value);
}
where obj is object of class:
void my_object::func(int64_t value) { ... }
void my_object::func(uint64_t value) { ... }
void my_object::func(uint32_t value) { ... }
void my_object::func(uint16_t value) { ... }
void my_object::func(uint8_t value) { ... }
The problem is with uint8_t overload of my_object::func() override. Linker complains about unresolved external symbols to overloads, which should have unsigned char parameter.
Should I replace uint8_t overload with unsigned char overload?
Edit: Just now noticed, that linker complains about uint64_t and int64_t too.
I compile on Windows using MSVC++ 2008 Express.
© Stack Overflow or respective owner