Ooops
November 30, 2020, 01:38:08 AM

Author Topic: Trouble building BRL.Clipboard  (Read 239 times)

Offline Adam Novagen

  • Jr. Member
  • **
  • Posts: 15
Trouble building BRL.Clipboard
« on: October 03, 2020, 03:48:41 PM »
Hey all,

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

Code: [Select]
►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?

Offline Derron

  • Hero Member
  • *****
  • Posts: 3265
Re: Trouble building BRL.Clipboard
« Reply #1 on: October 03, 2020, 07:17:38 PM »
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

Offline Adam Novagen

  • Jr. Member
  • **
  • Posts: 15
Re: Trouble building BRL.Clipboard
« Reply #2 on: October 03, 2020, 07:58:12 PM »
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?

Offline Derron

  • Hero Member
  • *****
  • Posts: 3265
Re: Trouble building BRL.Clipboard
« Reply #3 on: October 04, 2020, 08:25:38 AM »
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

Offline Adam Novagen

  • Jr. Member
  • **
  • Posts: 15
Re: Trouble building BRL.Clipboard
« Reply #4 on: October 04, 2020, 03:10:47 PM »
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!

Offline Derron

  • Hero Member
  • *****
  • Posts: 3265
Re: Trouble building BRL.Clipboard
« Reply #5 on: October 04, 2020, 08:32:55 PM »
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

Offline Adam Novagen

  • Jr. Member
  • **
  • Posts: 15
Re: Trouble building BRL.Clipboard
« Reply #6 on: October 05, 2020, 01:48:58 AM »
Oh... Oh that's what you meant... My apologies, I feel stupid now  :))

That snippet works perfectly, will use that. Thanks a million!

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal