Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Today's Messages (off)  | Unanswered Messages (on)

Forum: U++ Widgets - General questions or Mixed problems
 Topic: Upp Widgets in a dll
Upp Widgets in a dll [message #60549] Thu, 25 April 2024 20:13
luoganda is currently offline  luoganda
Messages: 195
Registered: November 2016
Experienced Member
This is a known issues for a long time
and this post is here just to be clear about this,
since it would be very neat to write dlls/so's in upp.

A few days ago i made a simple demo
of a basic uppApp that uses uppDll - done on win11 with upp17221.

I tried to compile it in debugVer but it doesn't compile(in release it does)
and i think there was something about '...memoryleaks... not declared' that usually
goes in hand when checking 'UseMAlloc' or 'CheckInit' appFlags.

As i saw in uppsrc UseMalloc is always on for dll, so it seems here - this is not a problem,
since it's the same without UseMalloc - dllApp does not work as it should in both cases.

TestCode:
1) you can check and compile in Debug(in my case i can't) and check why it doesn't compile.
2) when one runs this - app starts as expected, but when pressing 1stButton(which just call's simple PromptOK in dll),
and pressing ok - app crashes without any notice.

ADDED:
just a simple typo in DllPlugTest.7z,
simply edit DllPlugTest/DllPlugTest.upp and correct from DllPlugTest.h into DllPlugTest.hpp.

ADDED2:
i tried to compile same code with upp17190 in linux debug and it compiles.
i overlooked that widgets can't be declared globally, so just correct the
line in DllCode from 'Array<Ctrl> ctrls' to 'Array<Ctrl> &ctrls=Single<Array<Ctrl>>()'.
I left the flags DLL(fromwin11) and added so flag - which is probably ok,
and corrected from 'DLL_APP_MAIN' to 'GUI_APP_MAIN' - since linux doesn't have SO_APP_MAIN.
Even if i selected 'All static' in 'Clang debug' Output mode,
i still have to put some(not all) so files in same dir as DllPlugTest elf(with of course DllCode.so),
else DllCode.so doesn't have all dependencies satisfied. This should not happen since upper static flag was used,
altough messages says -shared is throwed into compiler flags somewhere.
I used extra compiler flags in linux: -fPIC -fdeclspec.
Ok - here compiles and runs, but after hitting 1st button terminal says:
'...assertion failed... GUI widgets cannot be global variables', altough
i corrected that mistake - which is written above.

[Updated on: Thu, 25 April 2024 21:30]

Report message to a moderator

Forum: ScatterDraw & ScatterCtrl
 Topic: Added SetLabelYOrientation()
Added SetLabelYOrientation() [message #60548] Tue, 23 April 2024 17:18
koldo is currently offline  koldo
Messages: 3357
Registered: August 2008
Senior Veteran
It allows to rotate 180 deg the orientation of vertical label.
Marked texts in image are shown rotated.

index.php?t=getfile&id=6921&private=0
  • Attachment: img.jpg
    (Size: 79.53KB, Downloaded 32 times)


Best regards
IƱaki



Current Time: Sat Apr 27 10:15:38 CEST 2024

Total time taken to generate the page: 0.02813 seconds