LNK2001: unresolved external symbol __ftol2_sse

  • Thread starter Thread starter lnickers
  • Start date Start date
L

lnickers

Guest
Please Help. I've been trying to build HL2 with Visual C++ 2005 express edition. I have managed to compile but I cannot link. I have 2 refences that are unresolved and can't figure out how to fix it.

I have dumped the symbols in th object files and they are indeed in the unresolved symbol tables:
error LNK2001: unresolved external symbol __ftol2_sse
error LNK2001: unresolved external symbol __alloca_probe_16


I think this is related to SSE assembler math routines not getting compiled. Perhaps?

Has anyone found a solution to this?


Thanks,
Larry



------ Build s------ Build started: Project: client, Configuration: Debug HL2 Win32 ------
Linking...
Creating library .\cl_dll___Win32_HL2_Debug/client.lib and object .\cl_dll___Win32_HL2_Debug/client.exp
vgui_TeamFortressViewport.obj :
c_te_spritespray.obj : error LNK2001: unresolved external symbol __ftol2_sse

client_thinklist.obj : error LNK2001: unresolved external symbol __alloca_probe_16
convar.obj : error LNK2001: unresolved external symbol __alloca_probe_16
.\cl_dll___Win32_HL2_Debug/client.dll : fatal error LNK1120: 2 unresolved externals
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 8.00.40607
Copyright (C) Microsoft Corporation. All rights reserved.
Build log was saved at "file://g:\__Games\__NickArthurSP\src\cl_dll\cl_dll___Win32_HL2_Debug\BuildLog.htm"
client - 135 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
compiling an existing C++ project with

I found this online at:

http://www.myservicescentral.com/Si...p=microsoft.private.whidbey.cplusplus.codegen

Alpha, Betas, RC1, RC2 and RTM products.
Group: microsoft.private.whidbey.cplusplus.codegen
Subject :
Date: 01 Jan 0001
I recently tried compiling an existing C++ project with
the VS .NET 2005 beta. This project uses the /QIfist
compiler flag to suppress the generation of _ftol2 calls
when converting from floating point to integer values.

There are two reasons for suppressing the _ftol2 calls.
The first is for performance reasons, the calling
overhead and potential FPU state changes go away. The
second reason is to ensure that the same codepath is used
regardless of processor. The application is a peer-to-
peer networked game, so it's important that synchronous
data be processed the same way on all machines.

I see that the /QIfist flag is deprecated in the 2005
beta and will eventually be removed. I tried using the
new floating point model (/Fp) flags, but all three of
them generate the _ftol2 call (specifically,
_ftol2_sse). Of greater concern is that this function
uses processor-specific codepaths.

The first thing the function does is check whether or not
SSE2 is available. I tried using _set_sse2_enable() to
disable SSE2 codepaths, but the "enable" state is ignored
in favor of the "available" state. I am not using the
compiler flags for enhanced instruction sets. I
considered targetting an earlier platform that does not
have SSE2 (Pentium 3), but I do not see the /G# flags for
targetting specific processor families like exist in
VS .NET 2003.

I would hope that the conversion would generate the same
results regardless of the codepaths, but I don't want to
depend on that. Is there an alternative method available
to ensure that enhanced instruction sets won't be used,
or are such features planned for the final product? The
new floating point model flags seem like a step in the
right direction as far as simplifying speed vs. accuracy
tradeoffs, but I need synchronicity as well.

Thanks,
Andrew


Seems processor specific:
I'm compiling on a :

AMD Athalon XP 2400
1.99GHZ processor

--Looks like I'm getting closer. but still don't have the answer yet ;-)
Please don't give up on me. Still need help ;)

Larry
 
Back
Top