[wx-dev] Re: undefined references SelectObject
Stefan.Neis at t-online.de
Stefan.Neis at t-online.de
Sun Jun 1 11:29:50 PDT 2008
Hi,
> > Yes, look up the missing functions in the MSDN -- it has a "Requirements"
> > section which says e.g. "Use ole32.lib" for CoCreateInstance().
>
> ole32 is still there as you can see in the build log.
>
> mingw32-g++.exe -LC:\wxWidgets\lib\gcc_lib -LC:\MinGW\lib -o
> FileShakeRS.exe .objs_rels\randomc\MERSENNE.o
> ..objs_rels\randomc\RANCOMBI.o .objs_rels\randomc\RANROTB.o
> ..objs_rels\main.o -lwxpng -lcomctl32 -lole32 -loleaut32 -luuid
> -lwinmm -lwxregexu -lwxmsw29u -lwxzlib
As Vadim already suggested: Simply use the linker command from the
samples.
In this case, the problem is (yet again), that the linker is sensitive
to the _order_ of the libraries as well, not only to which libraries
you enumerate or not.
I.e. if you use -llib2 -llib1, any references from lib1 to functions in
lib2 will (potentially) remain unresolved, while -llib1 -llib2 will work
(and if you have functions in lib1 which reference functions in lib2
_and_ vice versa, you'll need something like -llib1 -llib2 -llib1).
HTH,
Stefan
More information about the wx-dev
mailing list