wxDevC++ and WMI?




Hi!

I'm trying to write a WMI application with the wxDev C++ RAD/IDE but
basic code won't even compile.

From the MSDN article "Initializing COM for a WMI Application":

#define _WIN32_DCOM
#include <iostream>
using namespace std;
#include <wbemidl.h>
# pragma comment(lib, "wbemuuid.lib")

Compiling this return the extensive compilation error log:

In file included from C:/Program Files/Microsoft Platform
SDK/Include/wbemidl.h:21,
from TestWMIFrm.h:39,
from TestWMIApp.cpp:11:
C:/Program Files/Microsoft Platform SDK/Include/wbemcli.h:17: warning:
ignoring #pragma warning

In file included from C:/Program Files/Microsoft Platform
SDK/Include/wbemcli.h:25,
from C:/Program Files/Microsoft Platform
SDK/Include/wbemidl.h:21,
from TestWMIFrm.h:39,
from TestWMIApp.cpp:11:
C:/Program Files/Microsoft Platform SDK/Include/rpc.h:78:1: warning:
"__RPC_API" redefined
In file included from C:/Program Files/Dev-Cpp/include/windows.h:82,
from C:/Program
Files/Dev-Cpp/include/common/wx/msw/wrapwin.h:51,
from C:/Program
Files/Dev-Cpp/include/common/wx/msw/private.h:17,
from C:/Program
Files/Dev-Cpp/include/common/wx/filefn.h:169,
from C:/Program
Files/Dev-Cpp/include/common/wx/utils.h:21,
from C:/Program
Files/Dev-Cpp/include/common/wx/cursor.h:41,
from C:/Program
Files/Dev-Cpp/include/common/wx/event.h:21,
from C:/Program
Files/Dev-Cpp/include/common/wx/wx.h:25,
from TestWMIApp.h:18,
from TestWMIApp.cpp:10:
C:/Program Files/Dev-Cpp/include/rpc.h:33:1: warning: this is the
location of the previous definition
In file included from C:/Program Files/Microsoft Platform
SDK/Include/wbemcli.h:25,
from C:/Program Files/Microsoft Platform
SDK/Include/wbemidl.h:21,
from TestWMIFrm.h:39,
from TestWMIApp.cpp:11:
C:/Program Files/Microsoft Platform SDK/Include/rpc.h:79:1: warning:
"__RPC_USER" redefined
In file included from C:/Program Files/Dev-Cpp/include/windows.h:82,
from C:/Program
Files/Dev-Cpp/include/common/wx/msw/wrapwin.h:51,
from C:/Program
Files/Dev-Cpp/include/common/wx/msw/private.h:17,
from C:/Program
Files/Dev-Cpp/include/common/wx/filefn.h:169,
from C:/Program
Files/Dev-Cpp/include/common/wx/utils.h:21,
from C:/Program
Files/Dev-Cpp/include/common/wx/cursor.h:41,
from C:/Program
Files/Dev-Cpp/include/common/wx/event.h:21,
from C:/Program
Files/Dev-Cpp/include/common/wx/wx.h:25,
from TestWMIApp.h:18,
from TestWMIApp.cpp:10:

I could go for pages and pages about this. Is this SDK (Microsoft
Platform SDK) only suitable for a Visual Studio IDE environnement?

.



Relevant Pages

  • Re: wxDevC++ and WMI?
    ... All I see is warnings. ... Please include your error messages. ... basic code won't even compile. ... In file included from C:/Program Files/Microsoft Platform ...
    (microsoft.public.win32.programmer.wmi)
  • RE: Remote debugging with VC2008
    ... just select native as the debugging code type. ... you first separate your pure managed code files and pure native code files ... select "Compile with Common Lanage Runtime support" as "No Common Language ... Additionally you can even use "#pragma managed ...
    (microsoft.public.vc.debugger)
  • Re: ATLComTime.h and alignment bug
    ... ATLComTime.h file breaks an alignment ... // Compile time assert: fails to compile if alignment of ADSVALUE ... ADSVALUE structure defined in iads.h is 4, ... #pragma pack ...
    (microsoft.public.vc.language)
  • Re: Could C++ do this without the #pragma
    ... > more common version of Test Collector, and not need macros. ... > You misunderstand the pragma. ... but there is more to the use of these directives ... than reducing code size and compile times. ...
    (comp.lang.cpp)
  • string class and vc++.wank :)
    ... #pragma once ... int XAxis, YAxis, StartFrom; ... This will compile quite happily. ...
    (microsoft.public.dotnet.languages.vc)

Loading