Try adding _alloca_probe_16 and _ftol2_sse to pal\win32\rotor_pal.src.
The best place to do that is right below the existing "_alloca_probe"
line.
Barry
-----Original Message-----
From: Discussion of the Rotor Shared Source CLI implementation
[mailto:
DOTNET-ROTOR@DISC...] On Behalf Of Muhammad Abubakar
Sent: Friday, September 23, 2005 6:01 AM
To:
DOTNET-ROTOR@DISC...
Subject: Re: [DOTNET-ROTOR] Building Rotor with VS 2005 Beta 2
i'm stuck building the pal rt. It seems that my rotor_pal.dll has not
been
built 100% correctly. Its missing some functions. Like alloca I guess.
Can
you tell me what does this error means while I'm building the pal rt:
+++++++++++++
......
many lines before this
cl : warning D9036 : use 'EHs-c-' instead of 'GX-'
cl : warning D9035 : option 'Gi-' has been deprecated and will be
removed in
a future release
cl : warning D9002 : ignoring unknown option '/QIfdiv-'
cl : warning D9002 : ignoring unknown option '/QI0f'
cl : warning D9002 : ignoring unknown option '/G6'
Compiling - variant.cpp for i386
Building Library -
d:\sscli\clr\bin\rotor_x86\fastchecked\rotor_palrt.lib
for rotor_x86
lib : warning LNK4224: /DEBUGTYPE:CV is no longer supported; ignored
Building Library -
d:\sscli\clr\bin\rotor_x86\fastchecked\rotor_palrt.lib
for rotor_x86
lib : warning LNK4224: /DEBUGTYPE:CV is no longer supported; ignored
Building Browse File -
d:\sscli\clr\bin\rotor_x86\fastchecked\rotor_palrt.lib for all platforms
BUILD: Linking d:\sscli\palrt\src directory
Linking Executable -
d:\sscli\clr\bin\rotor_x86\fastchecked\rotor_palrt.dll
for i386
link : warning LNK4224: /DEBUG:FULL is no longer supported; ignored
bignum.obj : error LNK2019: unresolved external symbol __alloca_probe_16
referenced in function "public:
stat
ic int __stdcall BigNum::InvMod(class BigNum *,class BigNum *,class
BigNum
*)"
(?InvMod@BigNum@@SGHPAV1@00@Z)
crypt.obj : error LNK2001: unresolved external symbol __alloca_probe_16
convert.obj : error LNK2019: unresolved external symbol __ftol2_sse
referenced in function "long __stdcall
Co
nvI4FromR8(double)" (?ConvI4FromR8@@YGJN@Z)
variant.obj : error LNK2001: unresolved external symbol __ftol2_sse
d:\sscli\clr\bin\rotor_x86\fastchecked\rotor_palrt.dll : error LNK1120:
2
unresolved externals
binplace : warning BNP0000:
CopyFile(D:\sscli\clr\bin\rotor_x86\fastchecked\rotor_palrt.dll,D:\sscli
\build\v1
.x86fstchk.rotor\.\rotor_palrt.dll) failed 2
binplace : error BNP0000: Unable to place file
D:\sscli\clr\bin\rotor_x86\fastchecked\rotor_palrt.dll -
exiting.
Binplacing - d:\sscli\palrt\inc\assert.h for i386
Binplacing - d:\sscli\palrt\inc\atl.h for i386
Binplacing - d:\sscli\palrt\inc\ccombstr.h for i386
Binplacing - d:\sscli\palrt\inc\crtdbg.h for i386
Binplacing - d:\sscli\palrt\inc\ctype.h for i386
Binplacing - d:\sscli\palrt\inc\float.h for i386
Binplacing - d:\sscli\palrt\inc\guiddef.h for i386
Binplacing - d:\sscli\palrt\inc\io.h for i386
many lines below this ........
in the end the following is displayed:
.......
Binplacing - d:\sscli\palrt\inc\winresrc.h for i386
Binplacing - d:\sscli\palrt\inc\winver.h for i386
BUILD: Done
51 files compiled - 225 Warnings - 2684 LPS
2 libraries built - 2 Warnings
1 executable built - 1 Warning - 5 Errors
1 browse database built
49 files binplaced - 1 Warning - 1 Error
+++++++++++++
why is alloca unresolved? I read in the docs that its been deprecated. I
need suggestions on this one. My
hint was something to do with _MSC_VER define checks that are in so many
places but I'm not sure. Does the
following gives any hint? :
#ifdef _MSC_VER
#define alloca _alloca
#else
#define _alloca alloca
#endif //_MSC_VER
PALIMPORT void * __cdecl _alloca(size_t);
Its inside the rotor_pal.h. Also look at win32pal.h.
Btw remember in my earlier post I mentioned the ctime() error that the
"build" tools's source code was
giving and I commented the code to make the build work? Well I resolved
that. I was looking at the exports
(generated by dumpbin on msvcr80d) that it did not contain definition
for
ctime. I saw that rotor_pal.def contains (after preprocessing)
ctime = msvcr80d.ctime
but since it was not in the exported function by msvcr80d so I looked
for
one that had it and I found
crtdll.dll and added the a new macro called NOTLOGGEDCRTAB in
\sscli\pal\win32\rotor_pal.src
......
#if DBG
#define PALEXPORT(x) x = PAL_##x
#define PALEXPORTCRT(x) x = PAL_##x
#define PALEXPORTOLE(x) x = PAL_##x
#define PALEXPORTUSER(x) x = PAL_##x
#define PALEXPORTSOCKET(x) x = PAL_##x
#define NOTLOGGED(x) x = KERNEL32.##x
#if _MSC_VER == 1310
; Changes neccessary to build and run against VS7.1.
; In order to run against the 7.0 runtime modify this
; against MSVCR70D
#define NOTLOGGEDCRT(x) x = MSVCR80D.##x
#else
#define NOTLOGGEDCRTAB(x) x = crtdll.##x <-------- notice this
#define NOTLOGGEDCRT(x) x = MSVCR80D.##x
#endif
#else
.......
and replaced
NOTLOGGEDCRT(ctime)
with
NOTLOGGEDCRTAB(ctime)
Now I uncommented the source code that was using ctime() and it compiled
and
build fine.
Abubakar.
On 9/22/05, Lorenzo <
dematte@ieee...> wrote:
>
> Muhammad Abubakar writes:
>
> > well this page explains why I'm getting those last errors:
> >
http://msdn2.microsoft.com/en-us/library/ms177253(en-us,vs.80).aspx
> > also explains why I had to write /GS with minus sign like this:
/GS-.
> Cuz
> > its on by default so we have to turn it off through a - sign. The
> > /Zc:wchar_t is also on by default so we have to turn off that also
which
> is
> > causing problems in compiling pal rt sources becuase of
> > typedef unsigned short wchar_t;
> > in so many places.
> > Abubakar.
> >
http://joehacker.blogspot.com.
>
> Hey, great work! Yes, I knew that command line options changed much in
> VS2005, and with them defaults too.. And according to some articles,
they
> are going to change again in post-beta2 builds..
>
> So, how far did you get?
>
> Lorenzo
>
> ===================================
> This list is hosted by DevelopMentor(r)
http://www.develop.com
>
> View archives and manage your subscription(s) at
>
http://discuss.develop.com
>
===================================
This list is hosted by DevelopMentor(r)
http://www.develop.com
View archives and manage your subscription(s) at
http://discuss.develop.com
===================================
This list is hosted by DevelopMentorĀ®
http://www.develop.com
View archives and manage your subscription(s) at
http://discuss.develop.com
opensubscriber is not affiliated with the authors of this message nor responsible for its content.