Home Help Center

FileSystem Client Compile Warning

amrufonamrufon Member AlexOrganization: ISTProject: jDatabase ✭✭
Hello.

I was trying out the File System Client in C++ (as found in the documentation on Chapter 7) using Visual Studio.NET 2002 and I got the following warnings:
Performing Custom Build Step
Compiling...
client.cpp
FileSystem.cpp
FileSystem.cpp(60) : error C2220: warning treated as error - no object file generated
FileSystem.cpp(60) : warning C4541: 'dynamic_cast' used on polymorphic type 'IceProxy::Ice::Object' with /GR-; unpredictable behavior may result

Since I'm compiling with /WX option (Treat warnings as errors), the build will fail. Of course ... I got it to work but it just bothers me that I can't specificy the /WX option.

Any ideas?

Alex

P.S.
My complete compile parameters are:
/Od /I "." /D "_DEBUG" /D "_WINDOWS" /D "_UNICODE" /D "UNICODE" /FD /EHsc /RTC1 /MDd /GS /Fo"Debug/" /Fd"Debug/vc70.pdb" /W3 /WX /nologo /c /Zi /Gd

Comments

  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Alex,

    You need to enable RTTI to use dynamic_cast. With Visual C++ 7.0, this is done by compiling with /GR. If you use the Visual Studio .NET IDE, it's an item in [Configuration Properties]/[C/C++]/[Language].

    Cheers,
    Bernard
  • amrufonamrufon Member AlexOrganization: ISTProject: jDatabase ✭✭
    Hello Bernard,

    Thanks. It worked. :)

    Alex
Sign In or Register to comment.