Hi,
While compiling a WMI based example, I am getting an error "undefined reference to CLSID_WbemLocator". Following are the other informations needed:
wmi_example.o:wmi_example.cpp:(.text$_ZN7_bstr_t6Data_tC1EPKc[__ZN7_bstr_t6Data_tC1EPKc]+0x24): undefined reference to `_com_util::ConvertStringToBSTR(char const*)@4'
c:/tdm-gcc-64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld.exe: wmi_example.o: bad reloc address 0x24 in section `.text$_ZN7_bstr_t6Data_tC1EPKc[__ZN7_bstr_t6Data_tC1EPKc]'
collect2.exe: error: ld returned 1 exit status
Preprocessed file as an attachment.
OS is "Microsoft Windows XP Professional SP 3", build environment is "Windows shell".
g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=c:/tdm-gcc-64/bin/../libexec/gcc/x86_64-w64-mingw32/4.8.1/lt
o-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-4.8.1/configure --build=x86_64-w64-mingw32 --e
nable-targets=all --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable
-libgomp --enable-lto --enable-graphite --enable-cxx-flags=-DWINPTHREAD_STATIC -
-enable-libstdcxx-debug --enable-threads=posix --enable-version-specific-runtime
-libs --enable-fully-dynamic-string --enable-libstdcxx-threads --enable-libstdcx
x-time --with-gnu-ld --disable-werror --disable-nls --disable-win32-registry --p
refix=/mingw64tdm --with-local-prefix=/mingw64tdm --with-pkgversion=tdm64-2 --wi
th-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: posix
gcc version 4.8.1 (tdm64-2)
ld -v
GNU ld (GNU Binutils) 2.23.2
Thanx
Anonymous
Missing comsupp.lib