Author Topic: O2 / IUP  (Read 15771 times)

0 Members and 5 Guests are viewing this topic.

Aurel

  • Guest
Re: O2 / IUP
« Reply #45 on: January 14, 2013, 06:38:47 AM »
Quote
This allows programmers to work with large source code libraries, and still produce small binaries.
This sounds fine.. :)

JRS

  • Guest
Re: O2 / IUP
« Reply #46 on: January 14, 2013, 08:31:47 AM »
Charles,

The new Oxygen.dll no longer likes C #define.  :'(



Code: OxygenBasic
  1. includepath "C:\iup\include\"    
  2. extern lib "iup.dll" cdecl    
  3. include "iup.h"
  4. end extern      
  5.  

Update

I had to go back to the slightly modified iup.h (iup.o2h) for it to work.

Code: C
  1. '===================================
  2. 'ADAPTATION FOR OXYGENBASIC Dec 2012
  3. '===================================
  4. 'typedef struct Ihandle_ Ihandle;
  5. 'typedef int (*Icallback)(Ihandle*);
  6. typedef void IHandle
  7. typedef sys  ICallback
  8. '===================================
  9.  
« Last Edit: January 14, 2013, 10:00:37 AM by JRS »

Charles Pegge

  • Guest
Re: O2 / IUP
« Reply #47 on: January 14, 2013, 10:38:31 AM »
Hi John,

I tested with the original IUP header. Are you sure the new DLL is in the Oxygen root folder?

I have posted a new Oxygen-in-progress including your demo as projectsb/IUP/jsdemo2H.o2bas

Charles
« Last Edit: January 14, 2013, 10:49:19 AM by Charles Pegge »

JRS

  • Guest
Re: O2 / IUP
« Reply #48 on: January 14, 2013, 11:39:27 AM »
Your latest Oxygen-in-progress works fine. I'm not sure where the issue was. (too much on-the-fly updating perhaps)

Charles Pegge

  • Guest
Re: O2 / IUP
« Reply #49 on: January 14, 2013, 11:55:15 AM »
Phew! I think it's called DLL hell. The gxo2 compiler looks for Oxygen.dll in the same folder as itself. If you compile to an oxygen-dependent binary then Oxygen needs to be included in the same folder as the binary.

Charles

Peter

  • Guest
Re: O2 / IUP
« Reply #50 on: January 14, 2013, 12:13:38 PM »
And once again for JRS.
Code: [Select]
include "iup.inc"

iupOpen 0,0
select iupAlarm("iupAlarm test", "File not saved! Save it now?", "Yes", "No", "Cancel")
       case 1
          IupMessage ("Save file", "File saved successfully - leaving program")
       case 2
          IupMessage ("Save file", "File not saved - leaving program anyway")
       case 3
          IupMessage ("Save file", "Operation canceled")
end select     
iupClose

JRS

  • Guest
Re: O2 / IUP
« Reply #51 on: January 14, 2013, 07:23:56 PM »
Thanks Peter!





Code: OxygenBasic
  1. includepath "iup\"    
  2. extern lib "iup.dll" cdecl    
  3. include "iup.h"
  4. end extern      
  5.  
  6.  
  7. iupOpen 0,0
  8. select iupAlarm("iupAlarm test", "File not saved! Save it now?", "Yes", "No", "Cancel")
  9.        case 1
  10.           IupMessage ("Save file", "File saved successfully - leaving program")
  11.        case 2
  12.           IupMessage ("Save file", "File not saved - leaving program anyway")
  13.        case 3
  14.           IupMessage ("Save file", "Operation canceled")
  15. end select      
  16. iupClose
  17.  

Peter

  • Guest
Re: O2 / IUP
« Reply #52 on: January 15, 2013, 02:50:05 AM »
Hi,

The image shows some OXYGEN-IUP programmers, after their programming of a button bar.



X
« Last Edit: January 15, 2013, 03:30:44 AM by peter »

JRS

  • Guest
Re: O2 / IUP
« Reply #53 on: January 15, 2013, 07:16:12 AM »
Peter,

Should I assume that you think IUP is a dead-end for OxygenBasic programmers or did I miss something in the translation?

John

Charles Pegge

  • Guest
Re: O2 / IUP
« Reply #54 on: January 15, 2013, 04:14:44 PM »
Another Oxygen update coming soon! COM (speech API) did not like the last one.

JRS

  • Guest
Re: O2 / IUP
« Reply #55 on: January 15, 2013, 05:50:34 PM »
Are you speaking of COM in general or the IupOleControl control?

I know the IUP thread has taken center stage recently and I just want to make sure this announcement meant you were digging into the more advanced features of the IUP API.  ;D

 

Charles Pegge

  • Guest
Re: O2 / IUP
« Reply #56 on: January 15, 2013, 07:34:06 PM »
It misreads my SAPI headers - it should not affect IUP
« Last Edit: January 16, 2013, 09:20:53 AM by Charles Pegge »

JRS

  • Guest
Re: O2 / IUP
« Reply #57 on: January 15, 2013, 08:29:21 PM »
Can you show me how I would use multiple DLLs and .h files with a program?

IE:

iup.dll
iupcontrols.dll
cd.dll
iupcd.dll

And the .h files that go with them. Look at the All Basic site BaCon OpenGL example.


Charles Pegge

  • Guest
Re: O2 / IUP
« Reply #58 on: January 16, 2013, 01:34:22 AM »
Hi John,

like this:

extern cdecl lib "lib1.dll"
include "lib1.h"
extern cdecl lib "lib2.dll"
include "lib2.h"
extern cdecl lib "lib3.dll"
include "lib3.h"
end extern


This syntax is also supported:

extern cdecl
library "lib1.dll"
include "lib1.h"
library "lib2.dll"
include "lib2.h"
library "lib3.dll"
include "lib3.h"
end extern


JRS

  • Guest
Re: O2 / IUP
« Reply #59 on: January 16, 2013, 06:50:45 AM »
Quote
This syntax is also supported:

Code: OxygenBasic
  1. extern cdecl
  2. library "lib1.dll"
  3. include "lib1.h"
  4. library "lib2.dll"
  5. include "lib2.h"
  6. library "lib3.dll"
  7. include "lib3.h"
  8. end extern
  9.  

Thanks!

It doesn't get any easier than that.

@Peter - I think I figured out your shelf of skulls post. I took a peek at the buttonbar.c example you referred to and the menu definition example. Is that what reminded you of the shelf of skulls?