Trouble building BRL.Clipboard

Started by Adam Novagen, October 03, 2020, 15:48:41

Previous topic - Next topic

Adam Novagen

Hey all,

So I downloaded brl.clipboard from the MaxNG git, but when I try to build the module, I get the following error:

►brl.clipboard was scheduled to next iteration
C:/BlitzMax/mod/brl.mod/clipboard.mod/libclipboard/src/clipboard_win32.c: In function 'clipboard_new':
C:/BlitzMax/mod/brl.mod/clipboard.mod/libclipboard/src/clipboard_win32.c:115:47: error: 'HWND_MESSAGE' undeclared (first use in this function)
C:/BlitzMax/mod/brl.mod/clipboard.mod/libclipboard/src/clipboard_win32.c:115:47: note: each undeclared identifier is reported only once for each function it appears in
Build Error: failed to compile C:/BlitzMax/mod/brl.mod/clipboard.mod/libclipboard/src/clipboard_win32.c
►►►►brl.clipboard was not built. See error information on latest attempt.


Now, it should be noted that I am still using "classic" BlitzMax, i.e. the last official Sibly release which I think was 1.51(?), configured with a manual installation of TDM-GCC, 4.7 I'm pretty sure. Can this module actually be installed in old Max? Do I need to install the whole whack of MaxNG modules for this to work? And if so, are there any sneaky little changes to existing modules I should know about?
We all know the main problem with dictionaries is that they contain too many words, and not enough butterscotch sauce!

Derron

Brl and pub ng modules do not work with legacy...at least most of them need adjustments..soome even use stuff now which is only available in NG (structs etc).

Also NG has some stuff for "win32" (uint etc) legacy did not have and used Byte Ptr etc for it.


So with some manual work on the module you could possibly get it to work.


Bye
Ron

Adam Novagen

Nuts, I was afraid of that. Alright, guess I'll leave that off the table; clipboard support isn't critical here, and I have my actual game engine 99% completed in classic BMax so there's no sense in switching everything for one tiny feature.

Out of curiosity, is there a clipboard module floating around anywhere that was made for classic BMax?
We all know the main problem with dictionaries is that they contain too many words, and not enough butterscotch sauce!

Derron

I am not aware of such a module ... but as you only use legacy you surely are only planning to support Windows 32bit (Mac ... is 64bit and new Linux distributions come in 64bit too).

So it might be easier for you to wrap up some code directly using the win32 api stuff (maybe even the code archives have something for you then).



bye
Ron

Adam Novagen

True, but it jist wouldn't be worth the time it would take me to learn it; I'm in a rush production phase at this point to finish the editor by New Year's, so I can get the game's content produced by the end of 2021.

No big loss anyway, the data is just a hex colour code that will be in a text field the user can copy from anyway, it was just for a "copy to clipboard" shortcut idea. Thanks for the info though!
We all know the main problem with dictionaries is that they contain too many words, and not enough butterscotch sauce!

Derron

As said ... if it is win32 only (no linux, no mac) then use existing stuff (if you find some).


https://www.syntaxbomb.com/index.php?topic=5068.0
leading to code at
https://mojolabs.nz/posts.php?topic=58004


bye
Ron

Adam Novagen

Oh... Oh that's what you meant... My apologies, I feel stupid now  :))

That snippet works perfectly, will use that. Thanks a million!
We all know the main problem with dictionaries is that they contain too many words, and not enough butterscotch sauce!