undefined reference to `LresultFromObject@12' Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
Alexandre GESP
Knows some wx things
Knows some wx things
Posts: 27
Joined: Sat Jan 30, 2010 7:46 pm
Location: France

undefined reference to `LresultFromObject@12'

Post by Alexandre GESP »

Hello.
I have just download the new wxWidget 3.1.1, and compile the librairies (MONOLITHIC=1) with gcc (tdm-1) 5.1.0, the one include with codeblocks 17.10
There was no errors during the build.

When I try to compile my project, I have many linker errors:

Code: Select all

mingw32-g++.exe -LC:\WpdPack\lib -LC:\wx311\lib\gcc_lib -o "bin\Debug\Journal couleur.exe" obj\Debug\CodeBlocks\communs\MaLibrairie.o  "obj\Debug\CodeBlocks\Journal et croix full color\resource.res" -mthreads  -lwxmsw31ud -lwxpngd -lwxjpegd -lwxtiffd -lwxzlibd -lwxregexud -lwxexpatd -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -lversion -lshlwapi -mwindows

C:\wx311\lib\gcc_lib/libwxmsw31ud.a(monolib_window.o): In function `ZN8wxWindow16MSWHandleMessageEPljjl':
C:\wx311\build\msw/../../src/msw/window.cpp:3489: undefined reference to `LresultFromObject@12'
C:\wx311\build\msw/../../src/msw/window.cpp:3668: undefined reference to `GetThemeBackgroundContentRect@24'
and many mores...
I guess something has changed in librairies between 3.1.0 and 3.1.1, or that the librairies names has changed.
My 1st question: Can I know witch librairie I need to link just with the name of the missing call ?
2d question: Has anybody an encounter this error of missing reference
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: undefined reference to `LresultFromObject@12'

Post by doublemax »

These are Windows functions. When this happens, Google "msdn LresultFromObject" and it will take you to the documentation, which will tell you that this function is in "Oleacc.lib".

Repeat until all Windows references are found.
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: undefined reference to `LresultFromObject@12'

Post by ONEEYEMAN »

Hi,
Why did you build MONOLITHIC library? There is no gain vs. multiple libraries - just more headache.
Library name(s) are not changed - just the suffix changed from 3.0 to 3.1.

Try to re-build wx with multiple libraries and rebuild the application. Or try to build the minimal sample and see if it runs.

Thank you.
Alexandre GESP
Knows some wx things
Knows some wx things
Posts: 27
Joined: Sat Jan 30, 2010 7:46 pm
Location: France

Re: undefined reference to `LresultFromObject@12'

Post by Alexandre GESP »

To doublemax: Thanks, its works. I do have tried the minimum sample given with codeblocks 17.12, but it does not include the two missing librairies lUxTheme and oleacc:

Code: Select all

mingw32-g++.exe -LC:\wx311\lib\gcc_lib -o bin\Debug\test.exe  obj\Debug\testApp.o obj\Debug\testMain.o obj\Debug\resource.res -mthreads -m32  -lwxmsw31ud -lwxpngd -lwxjpegd -lwxtiffd -lwxzlibd -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -lshlwapi -lversion -loleacc -lUxTheme -mwindows
Output file is bin\Debug\test.exe with size 80.84 MB
To ONEEYEMAN: My fault: When I was young and hadesome, many, many years ago, I started with a MONOLITHIC=1 switch just to avoid searching witch librairie to include in project, and now that I have dozen of active projects, I will be complicated to modify all my cbp project file to use MONOLITHIC=0 build... Lazy one day, lazy forever....
Alexandre GESP
Knows some wx things
Knows some wx things
Posts: 27
Joined: Sat Jan 30, 2010 7:46 pm
Location: France

Re: undefined reference to `LresultFromObject@12'

Post by Alexandre GESP »

BTW: I have not found how to mark this topic as [SOLVED]
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: undefined reference to `LresultFromObject@12'

Post by doublemax »

Alexandre GESP wrote:BTW: I have not found how to mark this topic as [SOLVED]
Click the check box icon in the post that helped you the most. The tooltip for that button will be "Accept this answer".
Use the source, Luke!
Post Reply