What happened to __TRY?
Michael Ost
most at museresearch.com
Thu Nov 6 10:59:16 CST 2008
Rob Shearman wrote:
> 2008/11/6 Michael Ost <most at museresearch.com>:
>> Hi all,
>>
>> When I upgraded wine-develfrom 1.0 to 1.1.7, my winelib app that uses
>> __TRY no longer links. It complains that RtlUnwind cannot be found. I
>> can see that RtlUnwind was added to wine/exception.h, but I am not sure
>> how to fix it.
>>
>> I tried adding -lntdll and -lwine to the link command line but it didn't
>> help. Any suggestions?
>
> Yes, you need to link to ntdll. Linking to libwine shouldn't be
> necessary. Please post the command line you are using and errors you
> are getting even when you link to ntdll.
I tried linking to ntdll and kernel32, but same result. Unless I am
linking in the wrong way? Command line and result are below.
BTW - I thought that wineg++ linked in ntdll and kernel32 automatically...?
Thanks! ... mo
PS: Command line that builds test.o and links the app that fails:
wineg++ -UNDEBUG -g -O0 -Wall -Werror
-I/home/most/Desktop/cvs/sandbox/mo/vst-player/make/../source
-I/home/most/Desktop/cvs/sandbox/mo/vst-player/make/../../../..//muse/libraries/medioid
-I/home/most/Desktop/cvs/sandbox/mo/vst-player/make/../../../..//muse/libraries/muselock
-c -MMD -MP -o test.o
/home/most/Desktop/cvs/sandbox/mo/vst-player/make/../source/win32/test.cpp
wineg++ -UNDEBUG -g -O0 -Wall -Werror
-I/home/most/Desktop/cvs/sandbox/mo/vst-player/make/../source
-I/home/most/Desktop/cvs/sandbox/mo/vst-player/make/../../../..//muse/libraries/medioid
-I/home/most/Desktop/cvs/sandbox/mo/vst-player/make/../../../..//muse/libraries/muselock
-o vst-player.exe.so VstPlayerApp.o test.o PaceablePlugin.o
PlayerMixer.o
/home/most/Desktop/cvs/sandbox/mo/vst-player/make/../../../..//muse/libraries/medioid/wine-debug/libmedioid.a
-lboost_filesystem -ldl -lrt -lasound -lpthread
/home/most/Desktop/cvs/sandbox/mo/vst-player/make/../../../..//muse/libraries/muselock/wine-debug/libmuselock.a
/home/most/Desktop/cvs/sandbox/mo/vst-player/make/../../../..//muse/libraries/muselock/source/win32/PlugInLib.a
-lusb -lcomdlg32 -lgdi32 -lcomdlg32 -lntdll -lkernel32
test.o: In function `__wine_rtl_unwind':
/usr/include/wine/exception.h:250: undefined reference to
`RtlUnwind(void*, void*, _EXCEPTION_RECORD*, void*)'
PlayerMixer.o: In function `__wine_rtl_unwind':
/usr/include/wine/exception.h:250: undefined reference to
`RtlUnwind(void*, void*, _EXCEPTION_RECORD*, void*)'
collect2: ld returned 1 exit status
winegcc: g++ failed
PPS: test.cpp source that uses __TRY:
#include <windows.h> // WinMain
#include <wine/exception.h> // __TRY
void test_function();
LONG WINAPI process_exception_handler(EXCEPTION_POINTERS* exceptions)
{
return(EXCEPTION_EXECUTE_HANDLER);
}
void test_function()
{
__TRY {
}
__EXCEPT(process_exception_handler) {
}
__ENDTRY
}
More information about the wine-devel
mailing list