unresolved external symbol _allmul & __allshr

Login to reply to this topic.
Tue, 2004-11-30 11:46
Joined: 2004-09-27
Forum posts: 122
Hi  dudes,
While linking application for emulator I'm getting the __allmul & __allshr undefined external error. After going through  the build log file i found that some of my inline function doing multiplication as
   return (long)((((__int64)a)*((__int64)b))>>15);
and due to this 64 bit multiplication these undefined symbol is coming.

I dont have have idea abt this but i think either its a compiler bug or ......

Pls pass thesolution if any one has gone through this prob before & have
find solution.

BR
chandrashekhar

Tue, 2004-11-30 12:07
Joined: 2004-11-29
Forum posts: 23
unresolved external symbol _allmul & __allshr
try linking with msvcrt.dll or something similar. (or uncheck 'ignore default libs'), or search web for __allshr. It is quite a common problem.
Tue, 2004-11-30 12:24
Joined: 2004-09-27
Forum posts: 122
unresolved external symbol _allmul & __allshr
I'm not compiling for windows but for symbian so i can't use dll.

How to solve it on symbian.

Any way thanks alot .
Tue, 2004-11-30 12:31
Joined: 2004-11-29
Forum posts: 23
unresolved external symbol _allmul & __allshr
if you are compiling for the emulator, you are indeed compiling for windows. the .app you produce is a normal win32 .dll. If you compile from command line, add LIBRARY line to .mmp file, embraced by
#if defined(WINS) ... #endif
Wed, 2004-12-01 02:17
Joined: 2004-09-27
Forum posts: 122
unresolved external symbol _allmul & __allshr
Hi  good morning,
Does this problem will not occur for target when i will compile for actual series 60 target? If it will come for target also then actually i like to solve it for both so for emulator it is ok to add dll but for target what i will do ?

BR
chandrashekhar
Wed, 2004-12-01 02:36
Joined: 2004-09-27
Forum posts: 122
unresolved external symbol _allmul & __allshr
i have added these lines to .mmp file n rebuild the proj but while  compiling it gives error as dll not found.

#ifdef __WINS__
SYSTEMINCLUDE   c:\windows\system32
#endif
LIBRARY           msvcrt.dll
Wed, 2004-12-01 06:03
Joined: 2004-05-20
Forum posts: 83
unresolved external symbol _allmul & __allshr
What compiler do you use? I have found neiter __ allmul, no __ allshr references in Visual Studio .NET C ++. So they are absent in Symbian libraries/dlls for target ARMI/THUMB platform.

c0deab1e

Wed, 2004-12-01 08:10
Joined: 2004-09-27
Forum posts: 122
unresolved external symbol _allmul & __allshr
At present compiling for emulator(Symbian\7.0s\Series60_v21\) and getting this error.  Using vc 7.0 .NET edition.
Wed, 2004-12-01 10:07
Joined: 2004-05-20
Forum posts: 83
unresolved external symbol _allmul & __allshr
Ok, I've found it. __int64 is a Miscosoft specific keyword, why do you use it? Note that gcc for target Symbian platform does not know anything about __int64 so it will not compile your source file.

c0deab1e

Thu, 2004-12-02 02:25
Joined: 2004-09-27
Forum posts: 122
unresolved external symbol _allmul & __allshr
Hi,
in symbian also this data type is available. Pls see the   epoc32\include\e32def.h file line no 50. it is defined as long long.



#if defined(__CW32__)
#define __NO_CLASS_CONSTS__
#define IMPORT_C __declspec(dllexport)
#define EXPORT_C __declspec(dllexport)
#define TEMPLATE_SPECIALIZATION template<>
#define _asm   asm
#ifndef __int64
#pragma longlong on
#define __int64  long long
#endif
#pragma exceptions off      // no support for C++ exception handling
#pragma RTTI off         // no support for C++ runtime type information
#endif
Thu, 2004-12-02 07:05
Joined: 2004-05-20
Forum posts: 83
unresolved external symbol _allmul & __allshr
Yes, __int64 is defined for CodeWarrior compiler but not for gcc. Is CodeWarrior able to produce code for ARM/THUMB? Simply I have never used CodeWarrior, only gcc, I have not even seen it ever, so I don't know it certain.  The only thing I am confident in that gcc doesn't support __int64.

c0deab1e

Thu, 2004-12-02 08:19
Joined: 2004-09-27
Forum posts: 122
unresolved external symbol _allmul & __allshr
yes u r right. But can u  suggest me some way to do it for gcc , because multiplication and storing result into 64 bit is necessity of my application.
Thu, 2004-12-02 08:26
Joined: 2004-05-20
Forum posts: 83
unresolved external symbol _allmul & __allshr
So why don't you want to try TInt64 class defined in e32std.h?

c0deab1e

Thu, 2004-12-02 09:17
Joined: 2004-09-27
Forum posts: 122
unresolved external symbol _allmul & __allshr
Thanx alot, I have just started implementing in this way mean while i got ur reply. Cheezy

Thanks alot
chandrashekhar
Mon, 2004-12-06 04:18
Joined: 2004-09-27
Forum posts: 122
unresolved external symbol _allmul & __allshr
hi all,
Still that problem does not solved so pls any body has idea how to do?

My function is as follows:

static INLINE long  MUL32x32s32( long a, long b )
{
   return (long )((((long long int)a)*((long long int)b))>>32);
}

it gives linking error as :
proj error LNK2019: unresolved external symbol __allmul referenced in function _MUL32x32s32
proj error LNK2019: unresolved external symbol __allshr referenced in function _MUL32x32s32

can any body help me out.

BR
chandrashekhar
Mon, 2004-12-06 08:43
Joined: 2004-11-29
Forum posts: 23
unresolved external symbol _allmul & __allshr
The simplest implementation, that will do the same:

TInt32 Mul32x32s32(TInt32 a, TInt32 b)
{
TInt64 ret(a);
ret *=b;
ret >>=32;
return ret.Lo()
}

Maybe you could optimise it somehow...
  • Login to reply to this topic.