MinGW compilation error: cannot find shobjidl.h

1,387 views
Skip to first unread message

Nathan Ridge

unread,
Apr 19, 2011, 10:57:25 PM4/19/11
to wx-u...@googlegroups.com

Hello,

I am trying to compile the latest wxWidgets trunk (r67527) with MinGW gcc 4.5,
and I get the following error:

../src/msw/textentry.cpp:58:22: fatal error: shobjidl.h: No such file or directory

A bit of googling around reveals that this is a Windows header that is
not provided by MinGW.

Is there a workaround for this?

Thanks,
Nate.

Igor Korot

unread,
Apr 20, 2011, 3:31:35 AM4/20/11
to wx-u...@googlegroups.com
Hi,

This is most likely a licensing issue and, therefore, can't be
supplied with MinGW.
Is this file part of some Windows library?

Thank you.
>
> Thanks,
> Nate.
>
> --
> Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
>
> To unsubscribe, send email to wx-users+u...@googlegroups.com
> or visit http://groups.google.com/group/wx-users

Nathan Ridge

unread,
Apr 20, 2011, 3:04:47 PM4/20/11
to wxWidgets Mailing List

> From: ikor...@gmail.com

> On Tue, Apr 19, 2011 at 7:57 PM, Nathan Ridge wrote:
> >
> > Hello,
> >
> > I am trying to compile the latest wxWidgets trunk (r67527) with MinGW gcc 4.5,
> > and I get the following error:
> >
> > ../src/msw/textentry.cpp:58:22: fatal error: shobjidl.h: No such file or directory
> >
> > A bit of googling around reveals that this is a Windows header that is
> > not provided by MinGW.
> >
> > Is there a workaround for this?
>
> This is most likely a licensing issue and, therefore, can't be
> supplied with MinGW.
> Is this file part of some Windows library?
>

I believe it's part of the Windows SDK.

Thanks,
Nate.

Vadim Zeitlin

unread,
Apr 20, 2011, 6:30:03 PM4/20/11
to wx-u...@googlegroups.com
On Wed, 20 Apr 2011 02:57:25 +0000 Nathan Ridge <zerat...@hotmail.com> wrote:

NR> I am trying to compile the latest wxWidgets trunk (r67527) with MinGW
NR> gcc 4.5, and I get the following error:
NR>
NR> ../src/msw/textentry.cpp:58:22: fatal error: shobjidl.h: No such file or directory
NR>
NR> A bit of googling around reveals that this is a Windows header that is
NR> not provided by MinGW.
NR>
NR> Is there a workaround for this?

Unfortunately it looks that not only MinGW doesn't come with this file but
that it also doesn't define IAutoCompleteDropDown anywhere and this
interface is absolutely required for dynamic auto-completion in wxTextCtrl
to work. Interestingly enough this header is included in mingw64 but not in
32 bit version for some reason.

Anyhow, unless somebody knows about some other place containing this
interface declaration we will need to redeclare it manually in our own
code, I don't see any other possibility.

Thanks for reporting this,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/

Nathan Ridge

unread,
Apr 20, 2011, 8:15:14 PM4/20/11
to wxWidgets Mailing List

> From: va...@wxwidgets.org

> NR> I am trying to compile the latest wxWidgets trunk (r67527) with MinGW
> NR> gcc 4.5, and I get the following error:
> NR>
> NR> ../src/msw/textentry.cpp:58:22: fatal error: shobjidl.h: No such file or directory
> NR>
> NR> A bit of googling around reveals that this is a Windows header that is
> NR> not provided by MinGW.
> NR>
> NR> Is there a workaround for this?
>
> Unfortunately it looks that not only MinGW doesn't come with this file but
> that it also doesn't define IAutoCompleteDropDown anywhere and this
> interface is absolutely required for dynamic auto-completion in wxTextCtrl
> to work. Interestingly enough this header is included in mingw64 but not in
> 32 bit version for some reason.
>
> Anyhow, unless somebody knows about some other place containing this
> interface declaration we will need to redeclare it manually in our own
> code, I don't see any other possibility.
>
> Thanks for reporting this,
> VZ

You're welcome. In the meantime, what can I do to get wxWidgets to compile?
I remember an older revision of the trunk used to compile, but I no longer have
the revision number...

Thanks,
Nate.

Catalin

unread,
Apr 21, 2011, 3:20:29 AM4/21/11
to wx-u...@googlegroups.com
r67508 should work (before the changes to text entry/ctrl). Probably a few later ones too.
You can check in more detail using SVN changelog: http://wx.ibaku.net/changelog/

Regards,
C


From: Nathan Ridge <zerat...@hotmail.com>
Sent: Thursday, 21 April 2011, 3:15

Vadim Zeitlin

unread,
Apr 21, 2011, 11:48:11 AM4/21/11
to wx-u...@googlegroups.com
On Wed, 20 Apr 2011 02:57:25 +0000 Nathan Ridge <zerat...@hotmail.com> wrote:

NR> I am trying to compile the latest wxWidgets trunk (r67527) with MinGW gcc 4.5,
NR> and I get the following error:
NR>
NR> ../src/msw/textentry.cpp:58:22: fatal error: shobjidl.h: No such file or directory

Should be fixed in r67567, please let me know if you still have any
problems (including not working auto-completion...).

Thanks,

Nathan Ridge

unread,
Apr 21, 2011, 3:09:38 PM4/21/11
to wxWidgets Mailing List

> From: va...@wxwidgets.org

> NR> I am trying to compile the latest wxWidgets trunk (r67527) with MinGW gcc 4.5,
> NR> and I get the following error:
> NR>
> NR> ../src/msw/textentry.cpp:58:22: fatal error: shobjidl.h: No such file or directory
>
> Should be fixed in r67567, please let me know if you still have any
> problems (including not working auto-completion...).

I now get different errors:

../src/msw/textentry.cpp: In constructor 'wxTextAutoCompleteData::wxTextAutoCompleteData(wxTextEntry*)':
../src/msw/textentry.cpp:366:25: error: reference to 'CLSID_AutoComplete' is ambiguous
c:\programs\dev\mingw\bin\../lib/gcc/mingw32/4.5.0/../../../../include/shlguid.h:67:19: error: candidates are: const GUID CLSID_AutoComplete
../src/msw/textentry.cpp:90:1: error: const GUID <unnamed>::CLSID_AutoComplete
../src/msw/textentry.cpp:420:40: error: 'ACO_AUTOAPPEND' was not declared in this scope

Regards,
Nate.

M Nealon

unread,
Apr 21, 2011, 3:34:57 PM4/21/11
to wx-u...@googlegroups.com
On Thu, Apr 21, 2011 at 5:48 PM, Vadim Zeitlin <va...@wxwidgets.org> wrote:
On Wed, 20 Apr 2011 02:57:25 +0000 Nathan Ridge <zerat...@hotmail.com> wrote:

NR> I am trying to compile the latest wxWidgets trunk (r67527) with MinGW gcc 4.5,
NR> and I get the following error:
NR>
NR> ../src/msw/textentry.cpp:58:22: fatal error: shobjidl.h: No such file or directory

 Should be fixed in r67567, please let me know if you still have any
problems (including not working auto-completion...).


Building with MinGW_w64 results in 

"../../src/msw/textentry.cpp:83:70: warning: 'stdcall' attribute ignored
../../src/msw/textentry.cpp:84:51: warning: 'stdcall' attribute ignored
../../src/msw/textentry.cpp: In constructor 'wxTextAutoCompleteData::wxTextAutoCompleteData(wxTextEntry*)':
../../src/msw/textentry.cpp:366:25: error: reference to 'CLSID_AutoComplete' is ambiguous
c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.2/../../../../x86_64-w64-mingw32/include/shlguid.h:169:1: error: candidates are: const GUID CLSID_AutoComplete
../../src/msw/textentry.cpp:90:1: error:                 const GUID <unnamed>::CLSID_AutoComplete
mingw32-make: *** [gcc_mswu\monolib_textentry.o] Error 1"


Regards
Mal

Vadim Zeitlin

unread,
Apr 21, 2011, 7:52:26 PM4/21/11
to wxWidgets Mailing List
On Thu, 21 Apr 2011 19:09:38 +0000 Nathan Ridge <zerat...@hotmail.com> wrote:

NR> > From: va...@wxwidgets.org
NR> > NR> I am trying to compile the latest wxWidgets trunk (r67527) with MinGW gcc 4.5,
NR> > NR> and I get the following error:


NR> > NR>
NR> > NR> ../src/msw/textentry.cpp:58:22: fatal error: shobjidl.h: No such file or directory

NR> >
NR> > Should be fixed in r67567, please let me know if you still have any
NR> > problems (including not working auto-completion...).
NR>
NR> I now get different errors:
NR>
NR> ../src/msw/textentry.cpp: In constructor 'wxTextAutoCompleteData::wxTextAutoCompleteData(wxTextEntry*)':
NR> ../src/msw/textentry.cpp:366:25: error: reference to 'CLSID_AutoComplete' is ambiguous
NR> c:\programs\dev\mingw\bin\../lib/gcc/mingw32/4.5.0/../../../../include/shlguid.h:67:19: error: candidates are: const GUID CLSID_AutoComplete
NR> ../src/msw/textentry.cpp:90:1: error: const GUID <unnamed>::CLSID_AutoComplete
NR> ../src/msw/textentry.cpp:420:40: error: 'ACO_AUTOAPPEND' was not declared in this scope

This should be fixed too now (r67569 and r67570).

On Thu, 21 Apr 2011 21:34:57 +0200 M Nealon <malcolm...@gmail.com> wrote:

MN> Building with MinGW_w64 results in
MN>
MN> "../../src/msw/textentry.cpp:83:70: warning: 'stdcall' attribute ignored
MN> ../../src/msw/textentry.cpp:84:51: warning: 'stdcall' attribute ignored

Strange, I don't see this warning with my version (4.6.0 20100831). Does
putting wxSTDCALL before the return type help by chance?

MN> ../../src/msw/textentry.cpp: In constructor
MN> 'wxTextAutoCompleteData::wxTextAutoCompleteData(wxTextEntry*)':
MN> ../../src/msw/textentry.cpp:366:25: error: reference to 'CLSID_AutoComplete'
MN> is ambiguous

This is the same as above so should be fixed too. Strange that it didn't
complain about the redefinition of CLSID_AutoComplete before.

Regards,

Nathan Ridge

unread,
Apr 21, 2011, 9:23:21 PM4/21/11
to wxWidgets Mailing List

> From: va...@wxwidgets.org

> NR> > From: va...@wxwidgets.org
> NR> > NR> I am trying to compile the latest wxWidgets trunk (r67527) with MinGW gcc 4.5,
> NR> > NR> and I get the following error:
> NR> > NR>
> NR> > NR> ../src/msw/textentry.cpp:58:22: fatal error: shobjidl.h: No such file or directory
> NR> >
> NR> > Should be fixed in r67567, please let me know if you still have any
> NR> > problems (including not working auto-completion...).
> NR>
> NR> I now get different errors:
> NR>
> NR> ../src/msw/textentry.cpp: In constructor 'wxTextAutoCompleteData::wxTextAutoCompleteData(wxTextEntry*)':
> NR> ../src/msw/textentry.cpp:366:25: error: reference to 'CLSID_AutoComplete' is ambiguous
> NR> c:\programs\dev\mingw\bin\../lib/gcc/mingw32/4.5.0/../../../../include/shlguid.h:67:19: error: candidates are: const GUID CLSID_AutoComplete
> NR> ../src/msw/textentry.cpp:90:1: error: const GUID ::CLSID_AutoComplete

> NR> ../src/msw/textentry.cpp:420:40: error: 'ACO_AUTOAPPEND' was not declared in this scope
>
> This should be fixed too now (r67569 and r67570).

OK, now wxWidgets builds without errors, but I get the following errors
when I try to link my program to it:

wxWidgets-trunk\build-gcc-4.5\lib/libwx_mswu_core-2.9.a(corelib_msw_textentry.o):textentry.cpp:(.text+0x869): undefined reference to `wxCLSID_AutoComplete'
wxWidgets-trunk\build-gcc-4.5\lib/libwx_mswu_core-2.9.a(corelib_msw_textentry.o):textentry.cpp:(.text+0x93e): undefined reference to `wxIID_IAutoCompleteDropDown'

Regards,
Nate.

Vadim Zeitlin

unread,
Apr 22, 2011, 11:20:06 AM4/22/11
to wxWidgets Mailing List
On Fri, 22 Apr 2011 01:23:21 +0000 Nathan Ridge <zerat...@hotmail.com> wrote:

NR> OK, now wxWidgets builds without errors, but I get the following errors
NR> when I try to link my program to it:
NR>
NR> wxWidgets-trunk\build-gcc-4.5\lib/libwx_mswu_core-2.9.a(corelib_msw_textentry.o):textentry.cpp:(.text+0x869): undefined reference to `wxCLSID_AutoComplete'
NR> wxWidgets-trunk\build-gcc-4.5\lib/libwx_mswu_core-2.9.a(corelib_msw_textentry.o):textentry.cpp:(.text+0x93e): undefined reference to `wxIID_IAutoCompleteDropDown'

Should be fixed too now (thanks Vaclav).

Tim

unread,
Apr 22, 2011, 11:24:47 AM4/22/11
to wx-u...@googlegroups.com
Hi,

Is there a document that describes the structure of the "src" directory?

Here is a sampling of my questions so you can understand the type of roadmap I am looking for.

Some of the directories are platforms (cocoa, msdos, msw, os2, osx, palmos, unix)
   I believe "cocoa" is obsolete, replaced by "osx", so if you eliminate "cocoa", the rest make sense.

Under "osx" appear the directories carbon, cocoa, iphone, and core.  
  The first three are obviously platforms.  
  What is "core" and what is the difference between the files in osx and in osx/core?

Some of the directories are window managers (gtk, gtk1, motif, x11)
   Why is there a gtk and a gtk1?  Perhaps gtk is the newer GTK 2.0?
   How are these four different than the "unix" platform above?
   Why is "gnome" a subdirectory of "gtk"?

Three of them seem to be platform agnostic (common, generic, univ)
   What is the difference between those three?
   I think "common" is shared across all platforms
   But if that is true, then what is the difference between "generic" and "univ"?   

Some of the directories appear to be external libraries (jpeg, regex, zlib, png, tiff, expat).
Some appear to be wxWidgets features (html, xrc, propgrid, ribbon, richtext, stc, xml)
   Have I missed a subtle difference between what I called "external libraries" and "wxWidget features"?
   Why are the ones I called "wxWidgets features" not in "common"?

Some I don't know how to classify (aui, dfb, mgl) because I don't recognize the acronyms.

Thanks,

Tim

Vadim Zeitlin

unread,
Apr 22, 2011, 11:34:02 AM4/22/11
to wx-u...@googlegroups.com
On Fri, 22 Apr 2011 08:24:47 -0700 (PDT) Tim <tim9...@yahoo.com> wrote:

T> Is there a document that describes the structure of the "src" directory?

No, not really. I guess it's supposed to be self-explanatory...

T> Some of the directories are platforms (cocoa, msdos, msw, os2, osx,
T> palmos, unix)    I believe "cocoa" is obsolete, replaced by "osx", so if
T> you eliminate "cocoa", the rest make sense.

Yes, "cocoa" is obsolete (and so are "msdos", "palmos" and "mgl") but
still makes sense.

T> Under "osx" appear the directories carbon, cocoa, iphone, and core.  
T> The first three are obviously platforms.     What is "core" and what is
T> the difference between the files in osx and in osx/core?

Only Stefan can answer this authoritatively, I'm not so sure about this
one myself.

T> Some of the directories are window managers (gtk, gtk1, motif, x11)

They're called "toolkits" FWIW.

T>    Why is there a gtk and a gtk1?  Perhaps gtk is the newer GTK 2.0?

Yes, gtk1 contains the old files for GTK 1.x.

T> How are these four different than the "unix" platform above?

"unix" contains toolkit-independent files, i.e. typically non-GUI stuff.

T> Why is "gnome" a subdirectory of "gtk"?

Because wxGTK can use some GNOME libraries.

T> Three of them seem to be platform agnostic (common, generic, univ)
T>    What is the difference between those three?
T>    I think "common" is shared across all platforms

Yes.

T>    But if that is true, then what is the difference between "generic"
T> and "univ"?   

"generic" is used in the native ports, "univ" contains the files used in
the separate wxUniversal platform, so it's another "toolkit" in fact.

T> Some of the directories appear to be external libraries (jpeg, regex,
T> zlib, png, tiff, expat). Some appear to be wxWidgets features (html,
T> xrc, propgrid, ribbon, richtext, stc, xml)    Have I missed a subtle
T> difference between what I called "external libraries" and "wxWidget
T> features"?    Why are the ones I called "wxWidgets features" not in
T> "common"?

Just for organization purposes.

T> Some I don't know how to classify (aui, dfb, mgl) because I don't
T> recognize the acronyms.

"aui" is another wx sub-library (as html, xrc, ...). "dfb" and "mgl" are 2
more toolkits (DirectFB and MGL), the latter is obsolete.

Regards,

Stefan Csomor

unread,
Apr 22, 2011, 3:38:55 PM4/22/11
to wx-u...@googlegroups.com
Hi Tim

>T> Under "osx" appear the directories carbon, cocoa, iphone, and core.
>T> The first three are obviously platforms. What is "core" and what is
>T> the difference between the files in osx and in osx/core?

I haven't followed things 100% yet, but the general idea was to have
'osx/core' carry code that uses calls that exist under every osx platform
eg CoreFoundation, while 'osx' itself contains only osx-common code that
calls the impls, but not directly into eg CoreFoundation


Best,

Stefan

Tim

unread,
Apr 25, 2011, 11:50:28 PM4/25/11
to wx-u...@googlegroups.com, Tim
Hi,

Thanks for the guidance.  I wrote down what I learned here:
  http://wiki.wxwidgets.org/WxWidgets_Source_Code_Overview

Just writing it down helped me to understand it better.  And perhaps it will be useful to someone else who has similar questions in the future.

If you see any errors in it, you can either tell me the errors or correct the errors yourself, whichever is easier for you.

Thanks,

Tim

Hi Tim

Best,

Stefan

----- Original Message -----
From: Vadim Zeitlin <va...@wxwidgets.org>
To: wx-u...@googlegroups.com
Cc:
Sent: Friday, April 22, 2011 8:34 AM
Subject: Re: Structure of the src directory

On Fri, 22 Apr 2011 08:24:47 -0700 (PDT) Tim <tim9...@yahoo.com> wrote:

T> Is there a document that describes the structure of the "src" directory?

No, not really. I guess it's supposed to be self-explanatory...

T> Some of the directories are platforms (cocoa, msdos, msw, os2, osx,
T> palmos, unix)    I believe "cocoa" is obsolete, replaced by "osx", so if
T> you eliminate "cocoa", the rest make sense.

Yes, "cocoa" is obsolete (and so are "msdos", "palmos" and "mgl") but
still makes sense.

<-- lines deleted -->

----- Original Message -----
From: Tim <tim9...@yahoo.com>
To: "wx-u...@googlegroups.com" <wx-u...@googlegroups.com>
Cc:
Sent: Friday, April 22, 2011 8:24 AM
Subject: Structure of the src directory

Hi,

Is there a document that describes the structure of the "src" directory?

Here is a sampling of my questions so you can understand the type of roadmap I am looking for.

Some of the directories are platforms (cocoa, msdos, msw, os2, osx, palmos, unix)

<--lines deleted-->

Reply all
Reply to author
Forward
0 new messages