AW: [Acdk-developer] Compiling problem
Brought to you by:
kommer
|
From: Roger R. K. <ko...@ar...> - 2005-06-10 07:05:27
|
Hi,
> ...
...obj : error LNK2001: unresolved external symbol =
"__declspec(dllimport)
const MyClass::`vftable'{for `acdk::lang::InterfaceBase'}"
(__imp_??_7MyClass@@6BInterfaceBase@lang@acdk@@@)
> ...
...\include\acdk\lang\sys\refholder3inl.h(18) : warning C4541:
'dynamic_cast' used on polymorphic type 'class acdk::lang::Object' with
/GR-; unpredictable behavior may result
> ...
1.
You have to enable RTTI in your compiler settings, otherwise nothing =
will
work - even if you eventually able to link the executable.
This aplies to all compiler on all platforms.
2.
On Windows you have to export classes/methods from you DLL you want to =
use
them outside the DLL.
Create a header in your library:
#ifndef mylib_Config_h
#define mylib_Config_h
#include <acdk.h>
#if defined(IN_MYLIB_LIB)
# define ACDK_MYLIB_PUBLIC ACDK_DLL_EXPORT
#else
# define ACDK_MYLIB_PUBLIC ACDK_DLL_IMPORT
#endif
#endif //mylib_Config_h
Now for the class inside your mylib:
class ACDK_MYLIB_PUBLIC MyClass
: extends acdk::lang::Object
{
// ...
};
In the compiler settings for the mylib.dll project you have to define
IN_MYLIB_LIB.
In the compiler settings for the executable, which make use of =
mylib.dll,
you don't need to define this symbol.
Hope this helps,
Roger Rene Kommer
-----Urspr=FCngliche Nachricht-----
Von: acd...@li...
[mailto:acd...@li...] Im Auftrag von =
Miroslav
Nachev
Gesendet: Donnerstag, 9. Juni 2005 12:37
An: acd...@li...
Betreff: [Acdk-developer] Compiling problem
Hi,
Yesterday everything works OK, but today without any changes I have =
the
following errors:
...obj : error LNK2001: unresolved external symbol =
"__declspec(dllimport)
const MyClass::`vftable'{for `acdk::lang::InterfaceBase'}"
(__imp_??_7MyClass@@6BInterfaceBase@lang@acdk@@@)
...obj : error LNK2001: unresolved external symbol =
"__declspec(dllimport)
const MyClass::`vftable'" (__imp_??_7MyClass@@6B@) ...obj : error =
LNK2001:
unresolved external symbol "__declspec(dllimport) const
MyClass::`vftable'{for `acdk::lang::ObjectBase'}"
(__imp_??_7MyClass@@6BObjectBase@lang@acdk@@@)
...obj : error LNK2001: unresolved external symbol =
"__declspec(dllimport)
const MyClass::`vbtable'" (__imp_??_8MyClass@@7B@) ...obj : error =
LNK2001:
unresolved external symbol "__declspec(dllimport) public: void =
__thiscall
MyClass::`vbase destructor'(void)" (__imp_??_DMyClass@@QAEXXZ)
Debug/acdktest1.exe : fatal error LNK1120: 5 unresolved externals Error
executing link.exe.
acdktest1.exe - 6 error(s), 413 warning(s)
Also I have too many warning like this:
...\include\acdk\lang\sys\heapframe.h(108) : warning C4251: '_top' : =
class
'SysRefHolder<class acdk::lang::sys::HeapFrame>' needs to have =
dll-interface
to be used by clients of class 'acdk::lang::sys::HeapFrame'
...\include\acdk\lang\sys\heapframe.h(109) : warning C4251: '_name' : =
class
'acdk::lang::sys::core_string' needs to have dll-interface to be used by
clients of class 'acdk::lang::sys::HeapFrame'
...\include\acdk\lang\sys\core_string.h(39) : see declaration of
'core_string'
...\include\acdk\lang\sys\allocator.h(97) : warning C4251: 'name' : =
class
'acdk::lang::sys::core_string' needs to have dll-interface to be used by
clients of class 'acdk::lang::sys::AllocatorInfo'
...\include\acdk\lang\dmi\metainfo.h(194) : warning C4800: 'int' : =
forcing
value to bool 'true' or 'false' (performance warning)
...\include\acdk\lang\sys\refholder3inl.h(18) : warning C4541:
'dynamic_cast' used on polymorphic type 'class acdk::lang::Object' with
/GR-; unpredictable behavior may result
...\include\acdk\lang\sys\refholder3inl.h(67) : see reference to =
function
template instantiation 'class acdk::lang::String *__cdecl dmi_cast(class
acdk::lang::ObjectBase *)' being compiled
Any help?
Best Regards,
Miroslav Nachev
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you
shotput a projector? How fast can you ride your desk chair down the =
office
luge track?
If you want to score the big prize, get to know the little guy. =20
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=3D20
_______________________________________________
Acdk-developer mailing list
Acd...@li...
https://lists.sourceforge.net/lists/listinfo/acdk-developer
|