G
Gustavo L. Fabro
Greetings!
Some classes that once compiled without problems on VS 2003 have now
problems on VS 2005 Beta 1. I'm talking about a __nogc class that is
exported with __declspec(dllexport).
The compiler message is this:
VCSelectLibraryForm.cpp
...\Forms\QiForm.h(48) : error C3395: 'TQiForm::GetDotNetMouseButton' :
__declspec(dllexport) cannot be applied to a function with the __clrcall
calling convention
This is odd because I'm not using "__clrcall" anywhere in my code (at least
not explicitly). Not in the function declaration, not in the class
declaration, anywhere!
I have 2 questions then:
1st) Any reason why this could be happening? Project options, parameter that
might make all calls on a given project __clrcall, etc?
2nd) Independently of the problem: I know an exported function from a DLL
can't be guaranteed to be called from a managed site. Thus, theoretically it
can't be exported. Is this the end of the story? I mean, if I compile code
with /clr:safe or /clrure in order to cut the unmanaged entry points from
functions and have a complete MSIL code, I won't be able to modularize it in
DLLs?
My compilation parameters are:
("Arquivos de programas" is the portuguese version of the "Program Files"
folder)
/Od /Og /Ob2 /Oi /Ot /I "C:\Arquivos de programas\Microsoft Visual Studio
..NET 2003\Vc7\PlatformSDK\Include" /I "." /I ".." /I "..\..\Libbuilder" /I
"..\..\Persistence" /I "..\..\QiReportBuilder" /I
"..\..\Controls.NET\QiControls" /AI "..\VCRLibDll" /D "WIN32" /D "NDEBUG" /D
"_WINDOWS" /D "_USRDLL" /D "QIVFORMS_EXPORTS" /D "VISUAL_C" /D "NULL=0" /D
"_USE_MATH_DEFINES" /D "__TRACE" /D "_WINDLL" /D "_MBCS" /FD /EHa /MD /GS
/GR /Fo"..\VCRObj/" /Fd"..\VCRObj/vc80.pdb" /W3 /nologo /c /Wp64 /Zi
/clrldSyntax /TP /wd4290 /wd4251 /wd4275 /wd4311 /wd4800 /FU
"QiVControls.dll" /FU
"c:\WINXP\Microsoft.NET\Framework\v2.0.40607\Microsoft.VisualC.Dll" /FU
"c:\WINXP\Microsoft.NET\Framework\v2.0.40607\mscorlib.dll" /FU
"c:\WINXP\Microsoft.NET\Framework\v2.0.40607\System.dll" /FU
"c:\WINXP\Microsoft.NET\Framework\v2.0.40607\System.Data.dll" /FU
"c:\WINXP\Microsoft.NET\Framework\v2.0.40607\System.Design.dll" /FU
"c:\WINXP\Microsoft.NET\Framework\v2.0.40607\System.Drawing.dll" /FU
"c:\WINXP\Microsoft.NET\Framework\v2.0.40607\System.Windows.Forms.dll" /FU
"c:\WINXP\Microsoft.NET\Framework\v2.0.40607\System.XML.dll"
Thanks,
Fabro
Some classes that once compiled without problems on VS 2003 have now
problems on VS 2005 Beta 1. I'm talking about a __nogc class that is
exported with __declspec(dllexport).
The compiler message is this:
VCSelectLibraryForm.cpp
...\Forms\QiForm.h(48) : error C3395: 'TQiForm::GetDotNetMouseButton' :
__declspec(dllexport) cannot be applied to a function with the __clrcall
calling convention
This is odd because I'm not using "__clrcall" anywhere in my code (at least
not explicitly). Not in the function declaration, not in the class
declaration, anywhere!
I have 2 questions then:
1st) Any reason why this could be happening? Project options, parameter that
might make all calls on a given project __clrcall, etc?
2nd) Independently of the problem: I know an exported function from a DLL
can't be guaranteed to be called from a managed site. Thus, theoretically it
can't be exported. Is this the end of the story? I mean, if I compile code
with /clr:safe or /clrure in order to cut the unmanaged entry points from
functions and have a complete MSIL code, I won't be able to modularize it in
DLLs?
My compilation parameters are:
("Arquivos de programas" is the portuguese version of the "Program Files"
folder)
/Od /Og /Ob2 /Oi /Ot /I "C:\Arquivos de programas\Microsoft Visual Studio
..NET 2003\Vc7\PlatformSDK\Include" /I "." /I ".." /I "..\..\Libbuilder" /I
"..\..\Persistence" /I "..\..\QiReportBuilder" /I
"..\..\Controls.NET\QiControls" /AI "..\VCRLibDll" /D "WIN32" /D "NDEBUG" /D
"_WINDOWS" /D "_USRDLL" /D "QIVFORMS_EXPORTS" /D "VISUAL_C" /D "NULL=0" /D
"_USE_MATH_DEFINES" /D "__TRACE" /D "_WINDLL" /D "_MBCS" /FD /EHa /MD /GS
/GR /Fo"..\VCRObj/" /Fd"..\VCRObj/vc80.pdb" /W3 /nologo /c /Wp64 /Zi
/clrldSyntax /TP /wd4290 /wd4251 /wd4275 /wd4311 /wd4800 /FU
"QiVControls.dll" /FU
"c:\WINXP\Microsoft.NET\Framework\v2.0.40607\Microsoft.VisualC.Dll" /FU
"c:\WINXP\Microsoft.NET\Framework\v2.0.40607\mscorlib.dll" /FU
"c:\WINXP\Microsoft.NET\Framework\v2.0.40607\System.dll" /FU
"c:\WINXP\Microsoft.NET\Framework\v2.0.40607\System.Data.dll" /FU
"c:\WINXP\Microsoft.NET\Framework\v2.0.40607\System.Design.dll" /FU
"c:\WINXP\Microsoft.NET\Framework\v2.0.40607\System.Drawing.dll" /FU
"c:\WINXP\Microsoft.NET\Framework\v2.0.40607\System.Windows.Forms.dll" /FU
"c:\WINXP\Microsoft.NET\Framework\v2.0.40607\System.XML.dll"
Thanks,
Fabro