Home » Extra libraries, Code snippets, applications etc. » OS Problems etc., Win32, POSIX, MacOS, FreeBSD, X11 etc » Dynamic library load works rare in Linux
|
Re: Dynamic library load works rare in Linux [message #6223 is a reply to message #6217] |
Thu, 02 November 2006 22:32   |
fallingdutch
Messages: 258 Registered: July 2006
|
Experienced Member |
|
|
Hi Nico,
I have downloaded and checked your code.
I don't know wether you should set up X11 again. But i don't have an idea how to solve the Problem.
It looks like this to me:
I Start the App, click on the Button (which loads the dll-Function, see below) - then The PrompOK comes up, i click ok and it seems like the PromptOK-Window has gone but it only moved behind the TopWindow of the App, if you move it aside you can see the PromptOK-Window again, but it isn't redrawn anymore. The PromptOK-Window is only closed when the App is closed, pressing the 'x' of the Title does nothing.
So with each click on the Button in the App (which loads the .so (dll) ) you get a zombie-Window after you click "ok".
code of the .so (dll)
#include <CtrlLib/CtrlLib.h>
extern "C" void test() {
Ctrl::InitX11(NULL);
PromptOK("Hello World");
Ctrl::CloseTopCtrls();
Ctrl::ExitX11();
}
Bas
[Updated on: Thu, 02 November 2006 22:32] Report message to a moderator
|
|
|
Re: Dynamic library load works rare in Linux [message #6241 is a reply to message #6223] |
Fri, 03 November 2006 14:28   |
nicomesas
Messages: 104 Registered: September 2006 Location: Barcelona, Spain
|
Experienced Member |
|
|
Hi Bas!
Your description of the behavior is exactly as it happens to me.
fallingdutch wrote on Thu, 02 November 2006 22:32 |
I Start the App, click on the Button (which loads the dll-Function, see below) - then The PrompOK comes up, i click ok and it seems like the PromptOK-Window has gone but it only moved behind the TopWindow of the App, if you move it aside you can see the PromptOK-Window again, but it isn't redrawn anymore. The PromptOK-Window is only closed when the App is closed, pressing the 'x' of the Title does nothing.
So with each click on the Button in the App (which loads the .so (dll) ) you get a zombie-Window after you click "ok".
|
The start of X11 is necessary, so that the program works at least. You can comment it and you will see the result: program crashes. Then you will debug PromptOK function and you will see the error. the X11 is not started!
I have made a pair of tests on this and have obtained similar results if I take with the function system a executable (not dll) GUI U++ with a non-complicated dialog. In this case, if I move the resulting window, the main window redraws badly
I upload the code of executable, and you can launch it with this code, from the main window.
void onLaunchSystem()
{
// use your out path ;)
system( "/media/GIGANTE/DSRLLO/upp/out/GCC32.Debug_full.Gui.Shared/testDLL_EXE" ) ;
}
I don't understand in deep how U++ uses X11.
|
|
|
|
|
|
Goto Forum:
Current Time: Wed May 14 22:29:34 CEST 2025
Total time taken to generate the page: 0.00532 seconds
|