|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++.windows.32-bits - Some questions
Hi, I'm trying to comile some C++ code and have some problems with the
so loved "symbol undefined" errors. I have this class:
File: mk4.h
/// Used to get or set double precision values.
class c4_DoubleRef : public c4_Reference
{
public:
/// Constructor
c4_DoubleRef (const c4_Reference&);
/// Get the value as floating point
operator double () const;
/// Set the value to the specified floating point
c4_DoubleRef& operator= (double);
};
File: mk4.inl
/////////////////////////////////////////////////////////////////////////////
// c4_DoubleRef
d4_inline c4_DoubleRef::c4_DoubleRef (const c4_Reference& value_)
: c4_Reference (value_)
{
}
File: viewx.cpp
c4_DoubleRef::operator double () const
{
c4_Bytes result;
if (!GetData(result))
return 0;
d4_assert(result.Size() == sizeof (double));
return *(const double*) result.Contents();
}
c4_DoubleRef& c4_DoubleRef::operator= (double value_)
{
SetData(c4_Bytes (&value_, sizeof value_));
return *this;
}
And I get this error, when compiling some other code using the library
where the above code belongs to:
mkstorage.obj(mkstorage)
Error 42: Symbol Undefined ??Bc4_DoubleRef QBENXZ (operator double
syscall c4_DoubleRef::(void )const )
mkstorage.obj(mkstorage)
Error 42: Symbol Undefined ??4c4_DoubleRef QAEAAV0 N Z (c4_DoubleRef
&syscall c4_DoubleRef::=(double ))
OPTLINK : Warning 134: No Start Address
--- errorlevel 2
Any idea why those two unknown symbols show up? Somehow a reference to
the shown signatures must be compiled but I have no idea where this
happens. Could it be some implicit conversions? Any hint welcome.
--
Robert M. Münch
Management & IT Freelancer
http://www.robertmuench.de
Aug 28 2005
I'd check to see that veiwx.obj is being linked in. Aug 30 2005
On Wed, 31 Aug 2005 06:35:04 +0200, Walter <newshound digitalmars.com> wrote:I'd check to see that veiwx.obj is being linked in. Sep 02 2005
On Wed, 31 Aug 2005 06:35:04 +0200, Walter <newshound digitalmars.com> wrote:I'd check to see that veiwx.obj is being linked in. Sep 02 2005
"Robert M. Münch" <robert.muench robertmuench.de> wrote in message news:op.swg1irql3b5602 news.digitalmars.com...On Wed, 31 Aug 2005 06:35:04 +0200, Walter <newshound digitalmars.com> wrote:I'd check to see that veiwx.obj is being linked in. Sep 02 2005
|