www.digitalmars.com         C & C++   DMDScript  

c++.stlsoft - Lots of undefined references with mingw

reply Neal <ntanner omniwatersolutions.com> writes:
Hello,

I am new to windows-based development and am trying to use the VOLE / STLSoft
projects to access an OPC client library that is distributed as a
COM object.  I have a bit of sample code from the OPC client vendor that they
have tested on Visual Studio 2010, but I am using gcc/mingw
within Code::Blocks.  My sample code seems to compile fine but then the linker
comes back with ~30 undefined references.

C:\dev\stlsoft\include\comstl\error\errorinfo_desc.hpp (129)  -- undefined
reference to 'GetErrorInfo 8'
C:\dev\stlsoft\include\comstl\error\errorinfo_desc.hpp (150) -- undefined
reference to 'SysFreeString 4'
C:\dev\stlsoft\include\comstl\error\errorinfo_desc.hpp (150) -- undefined
reference to 'CoTaskMemFree 4'
....
many more in exceptions.hpp, BSTR_functions.h, variant.hpp, initialisers.hpp,
creation_functions.hpp, and methods.hpp

I'm hoping that this is a relatively simple case of me setting up the
environment wrong, but I am currently stuck.  Any help would be greatly
appreciated.

Thanks
Neal
Apr 02 2012
parent "Matt Wilson" <matthewwilson acm.org> writes:
Hi Neal

Can you post (or provide URL to) smallest possible project that illustrates 
your problem, including your makefile/build instructions?

Thanks

Matt

"Neal" <ntanner omniwatersolutions.com> wrote in message 
news:jlcle1$glf$1 digitalmars.com...
 Hello,

 I am new to windows-based development and am trying to use the VOLE / 
 STLSoft projects to access an OPC client library that is distributed as a
 COM object.  I have a bit of sample code from the OPC client vendor that 
 they have tested on Visual Studio 2010, but I am using gcc/mingw
 within Code::Blocks.  My sample code seems to compile fine but then the 
 linker comes back with ~30 undefined references.

 C:\dev\stlsoft\include\comstl\error\errorinfo_desc.hpp (129)  -- undefined 
 reference to 'GetErrorInfo 8'
 C:\dev\stlsoft\include\comstl\error\errorinfo_desc.hpp (150) -- undefined 
 reference to 'SysFreeString 4'
 C:\dev\stlsoft\include\comstl\error\errorinfo_desc.hpp (150) -- undefined 
 reference to 'CoTaskMemFree 4'
 ....
 many more in exceptions.hpp, BSTR_functions.h, variant.hpp, 
 initialisers.hpp, creation_functions.hpp, and methods.hpp

 I'm hoping that this is a relatively simple case of me setting up the 
 environment wrong, but I am currently stuck.  Any help would be greatly
 appreciated.

 Thanks
 Neal 

Apr 25 2012