I've been experiencing BSCMAKE warning BK4504 ( minor error in .SBR file
'%s' ignored ) with the following code. I get this warning every time I
attempt to use a
.NET enum.
I am using Visual Studio .NET Beta 2 Enterprise Edition.
I have installed Visual Studio .NET Beta 2 Service Pack 2
stdafx.h:
// Not changed from generated file
stdafx.cpp:
// Not changed from generated file
EnumWarningExample.cpp:
#include "stdafx.h"
#using <mscorlib.dll>
using namespace System;
int main(void)
{
System::Threading::Thread::CurrentThread->ApartmentState =
System::Threading::ApartmentState::STA;
return 0;
}
AssemblyInfo.cpp:
// Not changed from generated file
I am using the following compiler options for stdafx.cpp:
/Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /FD /EHsc /MTd /GS /Yc"stdafx.h" \
/Fp"Debug/EnumWarningExample.pch" /Fo"Debug/" /Fd"Debug/vc70.pdb"
\
/FR"Debug/" /W3 /nologo /c /Zi /clr /TP
I am using the following compiler options for
EnumWarningExample.cpp and AssemblyInfo.cpp:
/Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /FD /EHsc /MTd /GS /Yu"stdafx.h"
\
/Fp"Debug/EnumWarningExample.pch" /Fo"Debug/" /Fd"Debug/vc70.pdb"
/FR"Debug/" \
/W3 /nologo /c /Zi /clr /TP
I am using the following linker options:
/OUT:"Debug/EnumWarningExample.exe" /INCREMENTAL /NOLOGO /DEBUG
\
/PDB:"Debug/EnumWarningExample.pdb" kernel32.lib user32.lib gdi32.lib
winspool.lib \
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
odbc32.lib odbccp32.lib
( The only option I have changed is to enable building the browser
database )
There is a KB article about this message (Q179270), but it doesn't apply
since RTTI
isn't enabled, and the PCH is being built for stdafx.cpp.
If I use the explicit enum value like this:
System::Threading::Thread::CurrentThread->ApartmentState =
(System::Threading::ApartmentState) 0;
I don't get the warning, however this is worse in my opinion than getting
the warning,
especially for enums that values are combined for.
Anyone have more on this?
Does it really change anything?
--
Adrian Sloan
aas...@ctcweb.net
result: no warning.
Here is the code that I have in the cpp file:
#include "stdafx.h"
#using <mscorlib.dll>
#include <tchar.h>
using namespace System;
// This is the entry point for this application
int _tmain(void)
{
System::Threading::Thread::CurrentThread->ApartmentState =
System::Threading::ApartmentState::STA;
return 0;
}
Please give me more info if I'm missing something here. Using the enums
shouldnt give you any warning at all... I am interested in this issue.
thanks,
Robert Svilpa
Software Design Engineer in Test
Managed Extensions for C++, Visual C++
Microsoft Corporation
This posting is covered by the Conditions of Use:
http://www.microsoft.com/info/cpyright.htm.
"Adrian Sloan" <aas...@ctcweb.net> wrote in message
news:OoAB$1BJBHA.1948@tkmsftngp05...
relevant file versions:
cl.exe: 13.0.9254
link.exe: 7.0.9254
bscmake.exe: 7.0.9254
mscorlib.dll: 1.0.2914.16
Are there others you are interested in?
--
Adrian Sloan
aas...@ctcweb.net
"Robert Svilpa" <rob...@microsoft.com> wrote in message
news:eOiM5BFJBHA.1556@tkmsftngp04...
The cause is that the language structure allows setups
that the browser file structure can not handle.
>-----Original Message-----
>Hello,
>
>I've been experiencing BSCMAKE warning BK4504 ( minor
error in .SBR file
>'%s' ignored ) with the following code. I get this
warning every time I
>attempt to use a
>..NET enum.
Yu"stdafx.h"
>\
>/Fp"Debug/EnumWarningExample.pch" /Fo"Debug/" /Fd"Debug/vc
70.pdb"
>.
>