Author Topic: LinkRes2Exe fix (hack)  (Read 3403 times)

0 Members and 1 Guest are viewing this topic.

JRS

  • Guest
Re: LinkRes2Exe fix (hack)
« Reply #15 on: July 27, 2019, 11:26:38 AM »
Hi James,

It is gratifying to see Charles getting contributions at the compiler source code level. I'm sure self compiling has made that easier. It would great if Mike and Jose would conjure up some O2 magic as well.

jcfuller

  • Guest
Re: LinkRes2Exe fix (hack)
« Reply #16 on: July 28, 2019, 02:42:19 AM »
Charles,
  If you remove #compact from co2.o2bas source Defender gets all in a tizzy
James

Charles Pegge

  • Guest
Re: LinkRes2Exe fix (hack)
« Reply #17 on: July 28, 2019, 03:02:25 AM »
Defender has been quite disruptive recently, but they fix it within a few hours, once the false positive has been reported.

I'm including AddResources inside oxygen.dll, and indirectly in co2

All you will need to do is include myresources.res in the source code:

uses myresources.res

or using command line co2:

co2 -32 myprog myresources.res


Nearly ready to post :)

Charles Pegge

  • Guest
Re: LinkRes2Exe fix (hack)
« Reply #18 on: July 29, 2019, 07:48:09 AM »
Version 0.2.5 now released including the built-in resource linker, as well as LinkRes and an updated Co2 compiler

Also, true=-1 instead of 1

jcfuller

  • Guest
Re: LinkRes2Exe fix (hack)
« Reply #19 on: July 29, 2019, 08:48:41 AM »
Charles,
  BIG thumbs UP on new co2 and uses *.res. Very simple integration with RadAsm3.
Looks like it's time to put together a new O2RadAsm package.

James

Arnold

  • Guest
Re: LinkRes2Exe fix (hack)
« Reply #20 on: July 29, 2019, 10:24:34 AM »
Hi Charles,

that is just amazing, and I can only say "Wow!". Oxide can now compile and execute the source code immediately integrating the resource file. This gives a total new feeling. You have taken another (very) big step in the development of Oxygenbasic.

Roland

Code: [Select]
% SND_SYNC   = 0
% SND_RESOURCE = 262148


! PlaySound lib "winmm.dll" alias "PlaySoundA"
! Sleep     lib "kernel32.dll"

uses wow.res

Sleep 500
PlaySound("MySound", 0, SND_RESOURCE or SND_SYNC)
Sleep 300
PlaySound("MySound", 0, SND_RESOURCE or SND_SYNC)
print "Wow!"
« Last Edit: July 30, 2019, 12:04:57 AM by Arnold »

jcfuller

  • Guest
Re: LinkRes2Exe fix (hack)
« Reply #21 on: July 29, 2019, 11:56:48 AM »
Here is a FYI in case you did not know it.
I always use ID's for my resources in all languages I use which means MAKEINTRESOURE(100) or (char*)100 for O2.
You can also use "#100".
James

Brian Alvarez

  • Guest
Re: LinkRes2Exe fix (hack)
« Reply #22 on: July 29, 2019, 11:58:01 AM »
This is the way to go!!!

 Many programmers think that the more complex a source code is, the more advanced it is...
Charles is proving that simplicity can be very powerful wih features like this. :)

 Thmubs up Charles! and Thanks!