Help with IUP 3.13 for FreeBASIC 1.03 (and wx.C )

External libraries (GTK, GSL, SDL, Allegro, OpenGL, etc) questions.
Post Reply
Tristano
Posts: 7
Joined: Sep 28, 2015 14:17
Location: Italy
Contact:

Help with IUP 3.13 for FreeBASIC 1.03 (and wx.C )

Post by Tristano »

Hi everybody,

I am starting to work with FreeBASIC v1.03.0 on Windows 7 64bit— I'm using FB in standalone, both 32 and 63bits version, side-by-side.

I've chosen FreeeBASIC for a project I want to work on, and right now I'm interested in some GUI libraries, and my intereste goes toward IUP and wx.c.

I'm having trouble setting IUP. So I have some questions for you; keep in mind that I'm using FB for the first time, so some questions might look trivial.

1) IUP VERSION: In the FBWiki it mentions that the Header version is 3.13. Does this mean that I should download exactly that version of IUP (and not, lets say, a higher one)?

2) IUP 32 or 64bit: Both FreeBASIC and IUP are available for 32 or 64bits. Does IUP work only with 32bit FreeBASIC, or I can use 64bits? FBWiki mentions "Platforms supported: Win32, Linux". My aim though is to compile to both Windows and Linux, so I'd rather stick to 32 bit if using 64bits would exclude any of the two.

3) IUP DOWNLOAD: When I go to the Sourceforge download page for IUP, for each release version of IUP I get a number of choices:

Windows Libraries: "Static / Dynamic". Which ones should I be going for?

Both Static and Dynamic Win Libraries come in a number of different formats, each with a different suffix to the file name:
  • iup-3.13_Win64_dllw4_lib.zip
    iup-3.13_Win32_dllw4_lib.zip
    iup-3.13_Win64_dll11_lib.zip
    iup-3.13_Win64_dll12_lib.zip
    iup-3.13_Win32_dll12_lib.zip
    iup-3.13_Win64_dll9_lib.zip
    iup-3.13_Win64_dll10_lib.zip
    iup-3.13_Win32_dll10_lib.zip
    iup-3.13_Win32_dll11_lib.zip
    iup-3.13_Win32_dll9_lib.zip
Again, which ones am I looking for?

4) IUP INSTALL: Once I've downloaded the right files, what should I do with them? I did fetch most of the available downloads, and looked inside the archives, read the README files, ecc., but I didn't quite work out what I should make available to FB compiler, and where (something that I have to put in FreeBASIC folders, or in Windows system folders?).

As for wx.c, after experimenting a bit, and reading on forums, I've got the impression that wx.NET v0.9.2 is not compatible with Win7 64 bits. I couldn't even run the demo files, while with version 0.7.2 I can run them ok (both downloaded from Sourceforge). On wx.NET website documentation there is mention of a v0.9.3 release, but there is no download for it ...

Anyone experienced the same problems with Win7? Any solutions?

Thanks a lot

Tristano
D.J.Peters
Posts: 8631
Joined: May 28, 2005 3:28
Contact:

Re: Help with IUP 3.13 for FreeBASIC 1.03 (and wx.C )

Post by D.J.Peters »

this is for the GCC MinGW 4.x.x port use it with FreeBASIC 64/32 bit
iup-3.13_Win64_dllw4_lib.zip
iup-3.13_Win32_dllw4_lib.zip

this are for MicroSoft C++

static
iup-3.13_Win64_dll9_lib.zip VisualStudio 8 (no typo)
iup-3.13_Win64_dll10_lib.zip VisualStudio 10
iup-3.13_Win64_dll11_lib.zip VisualStudio 11
iup-3.13_Win64_dll12_lib.zip VisualStudio 12

dynamic
iup-3.13_Win32_dll9_lib.zip ' ...
iup-3.13_Win32_dll10_lib.zip
iup-3.13_Win32_dll11_lib.zip
iup-3.13_Win32_dll12_lib.zip
Tristano
Posts: 7
Joined: Sep 28, 2015 14:17
Location: Italy
Contact:

Re: Help with IUP 3.13 for FreeBASIC 1.03 (and wx.C )

Post by Tristano »

Dear Peters, thanks a lot.

Ok, so I have those two archives:
D.J.Peters wrote: this is for the GCC MinGW 4.x.x port use it with FreeBASIC 64/32 bit
iup-3.13_Win64_dllw4_lib.zip
iup-3.13_Win32_dllw4_lib.zip
I see they contain a (rather high) number of .dll and .a files, plus a "include" folder with .h files.

OK: I'VE MANAGED TO MAKE THE IUP EXAMPLES WORK! But only for the Win32 version of FB.

It seems the Win64 version of FB is not compatible with IUP headers.

This is how I've proceeded:

I placed all the .a files in FB "\lib\win32" subfolder.

I've placed all the .dll files in the project folder where I moved the source files into.

As for the .h files, are they of any need to FreeBASIC, or I can just keep ignoring them?

Thanks again!

Tristano
St_W
Posts: 1634
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Help with IUP 3.13 for FreeBASIC 1.03 (and wx.C )

Post by St_W »

Tristano wrote:1) IUP VERSION: In the FBWiki it mentions that the Header version is 3.13. Does this mean that I should download exactly that version of IUP (and not, lets say, a higher one)?
New library versions are compatible as long as the API of existing functions does not change. Typically that does happen very seldom, so the current version will probably work. Added API functions (if any) will not be available of course as you are still using the old headers.
btw I wouldn't rely on the documentation in such things that change constantly. I'd rather suggest to take a look into the headers itself (e.g. "iup.bi"). The latest headers (development version; not yet officially released) support version 3.15: https://github.com/freebasic/fbc/tree/master/inc/IUP
You can download the current headers e.g. from: http://users.freebasic-portal.de/stw/bu ... eaders.zip
Tristano wrote:2) IUP 32 or 64bit: Both FreeBASIC and IUP are available for 32 or 64bits. Does IUP work only with 32bit FreeBASIC, or I can use 64bits? FBWiki mentions "Platforms supported: Win32, Linux". My aim though is to compile to both Windows and Linux, so I'd rather stick to 32 bit if using 64bits would exclude any of the two.
When a header is 64-bit ready it typically supports both Windows and Linux, or in other words: when it is not 64-bit ready is doesn't work on Windows as well as Linux. The headers currently supported in the 64-bit versions are included in the 64-bit FreeBasic package.
The latest headers (see link above) seem to support 64-bit (at least they are not excluded from the 64-bit package as far as I can see). [fyi: I'm referring to this: https://github.com/freebasic/fbc/blob/m ... efile#L881 ]
Tristano wrote:3) IUP DOWNLOAD: When I go to the Sourceforge download page for IUP, for each release version of IUP I get a number of choices:
Windows Libraries: "Static / Dynamic". Which ones should I be going for?
Both Static and Dynamic Win Libraries come in a number of different formats, each with a different suffix to the file name:
[...]
Again, which ones am I looking for?
First the difference static / dynamic:
Static libraries are linked into the exe, that means you don't require additional external libraries at runtime. During compilation you pass the ".a" (or sometimes especially on Windows ".lib") file to the linker (I think the headers do that automatically via #inclib, if you #include them).
Dynamic libraries are not fully linked into the exe, only a small interface. So at runtime you need the external library, which is a ".dll" file on Windows and a ".so" file on linux. During compilation you may have a ".dll.a" file, which is the interface linked into the exe - this is not needed in many cases however, as it can be automatically generated typically (from the dll).
One hint about naming: a library "my" is named (on windows) "my.dll" ( + "my.dll.a" maybe) if it's dynamic, "libmy.a" if it's static. On the command line or for #inclib you just specify the library name "my" ! (not "libmy" or "libmy.a" !)

Regarding the different files (suffixes): As D.J.Peters said they specify the compiler version used to build them. For FreeBasic you can use any of them, not just the MinGW ones! (as the C ABI is well defined). However, the libraries are different in regard of their dependencies. The libraries compiled with Microsoft's MSVC typically depend on the "Microsoft Visual C++ xyz Runtime" (insert the version for "xyz"). So that needs to be installed if you decide to use them. The MinGW library usually does not depend on anything, which is not included with the operating system, so it's probably still a good decision to use it also on Windows.

Tristano wrote:4) IUP INSTALL: Once I've downloaded the right files, what should I do with them? I did fetch most of the available downloads, and looked inside the archives, read the README files, ecc., but I didn't quite work out what I should make available to FB compiler, and where (something that I have to put in FreeBASIC folders, or in Windows system folders?).
Put the ".a" files into the "lib\<platform>" subfolder of your freebasic install dir (replace "<platform>" with the according platform name, e.g. "win32") OR into your source code folder. Put ".dll"/".so" files into the source code (application) folder.
If there are ".lib" files instead of ".a" you can typically just rename "xyz.lib" to "libxyz.a". You don't need any other files for compilation. ".def" files can be used for creating ".dll.a" interface library files for dynamic linking, ".h" files are C headers (you are using the tranlated ones for FreeBasic, ".bi" in inc\iup).
Tristano wrote:As for wx.c, after experimenting a bit, and reading on forums, I've got the impression that wx.NET v0.9.2 is not compatible with Win7 64 bits. I couldn't even run the demo files, while with version 0.7.2 I can run them ok (both downloaded from Sourceforge). On wx.NET website documentation there is mention of a v0.9.3 release, but there is no download for it ...
I can not recommend to use wx-c in its current state as it is a bit buggy and unmaintained. The last 0.9.2 release is already quite old and based on the old wxWidgets 2.x.


Tristano wrote:It seems the Win64 version of FB is not compatible with IUP headers.
The latest headers should be compatible (see link in the first answer). Do replace at least IUP and win headers in "/inc" (or /include) subfolder of your FB installation. Probably it's best to replace just the whole inc folder.
Tristano wrote:I placed all the .a files in FB "\lib\win32" subfolder.
For 64-bit you need to put the 64-bit library into the \lib\win64 subfolder accordingly.
Tristano wrote:As for the .h files, are they of any need to FreeBASIC, or I can just keep ignoring them?
These are C header files. In FreeBasic only FB header files (.bi) are supported (currently). The FB headers are included in the FB package/installer. Thus the C headers are of no use for FB and not needed.
Tristano
Posts: 7
Joined: Sep 28, 2015 14:17
Location: Italy
Contact:

Re: Help with IUP 3.13 for FreeBASIC 1.03 (and wx.C )

Post by Tristano »

Thank a lot indeed!

Your reply was really exhaustive and helped me to fill in the know-how-gaps that prevented me from seeing clearly into this whole issues of libraries with FB! I'll definitely make treasure of your advises: I've copied it into my working notes and will be referring to them in the future. I'm glad you managed to see through my questions and grasp the general confusion that was stalling me, helping me out of it.

Good to know that there are also updated versions of IUP headers, 64bit ready! IUP seems a good choice for the project I have in mind (GTK seems less of an option for this specific project).

Petty for wx-C, though. I was rather curious about testing it. But I guess that porting headers from C to FB is not a piece of cake (at least, it doesn't seem like it from what I've read on the Wiki).

Tristano
D.J.Peters
Posts: 8631
Joined: May 28, 2005 3:28
Contact:

Re: Help with IUP 3.13 for FreeBASIC 1.03 (and wx.C )

Post by D.J.Peters »

I have done many work on IUP for FreeBASIC same for wx-c in the past
but i don't like IUP anymore (all numeric params must be strings and so on)
The wx-c wrapper is completely out of date and it does not exist a 64bit version.

Anyway I wrote thousands lines of FLTK stuff to give FreeBASIC
a stable 32/64-bit GUI for Windows and Linux.

Joshy
tinycla
Posts: 121
Joined: Jan 07, 2006 12:51

Re: Help with IUP 3.13 for FreeBASIC 1.03 (and wx.C )

Post by tinycla »

I totally agree with D.J.Peters: in my opinion, the better choice at this moment is FLTK. It's well documented, it's really fast (I mean: very very fast) and have a good look, if you use theming. You could give a try to FLTK.
Tristano
Posts: 7
Joined: Sep 28, 2015 14:17
Location: Italy
Contact:

Re: Help with IUP 3.13 for FreeBASIC 1.03 (and wx.C )

Post by Tristano »

D.J.Peters wrote:Anyway I wrote thousands lines of FLTK stuff to give FreeBASIC
a stable 32/64-bit GUI for Windows and Linux.
Well done! I actually missed it completely because it doesn't show up in the Wiki and I am not yet versed into the forum's ongoing news. Definitely something that deserves to show up in the External Libraries Index!

I'll be looking into FLTK ( Fast Light Toolkit ). These are the links I've found (thought of pasting them here for the benefit of future visitors who might end up in this page via internet searches):
Thanks again!
petan
Posts: 683
Joined: Feb 16, 2010 15:34
Location: Europe
Contact:

Re: Help with IUP 3.13 for FreeBASIC 1.03 (and wx.C )

Post by petan »

Choice of selected GUI depends on your level of project - small, or biggy ??

My discovered way - for quickly enabled GUI - was :
TinyDialog => sGui => Dislin
because all these are simple, works with Fbgfx graphics&another screen in use.

I am playing with Dislin from yesterday, on 64 bit Win 8.1. Works perfectly with FreeBAsic 1.00 32 bit+Dislin 10.5 32 bit + FbEdit 1076c 32 bit. Download from pages of origin.
Just unpack, set 2 environment variables and test it ;)
First taste is very very good&interesting. Various FONTS, pop-up menus.., looks good for longer testing !
It has 777 routines, but don't forget it's primarily targeted to work as data visualisation tool; sothat creating highly customised GUI is not so applicable as in FLTK/GTK, seems.
With FLTK/GTK you will surely have a help on the forum..

My time to FB now is limited between hospitals visiting.
Good luck.
Tristano
Posts: 7
Joined: Sep 28, 2015 14:17
Location: Italy
Contact:

Re: Help with IUP 3.13 for FreeBASIC 1.03 (and wx.C )

Post by Tristano »

petan wrote:Choice of selected GUI depends on your level of project - small, or biggy ??
Difficoult to say, it's a prototype I'm starting to work on. Right now I'm focused on how to approach the core engine of the app, which handles data in a rather complex way and I still have to work out which is the best way to handle it. It's one of those things that are better learnt by working on them rather than planning them on paper. Also, many unsolved theoretical questions, that will be faced once I have a working prototype to experiment with.

But the GUI does stand in the way, even with a prototype, and it's not an aesthetic issue, it has to do with the way data is presented and should allow the user to interact with it. Not a scientific GUI at all, but still ... one of those GUIs that did make me consider using an HTML5/CSS3 engine at the start. But, no, I'd rather go along the "classical" path, and face the problems of how to combine controls to get something that suits the needs, instead of getting entangled with browser technology, MVC, sockets and all...
petan wrote:My discovered way - for quickly enabled GUI - was :
TinyDialog => sGui => Dislin
because all these are simple, works with Fbgfx graphics&another screen in use.
Thanks! I've manged to gather some reference links to start looking at them. Not sure about sGui though, the only link I've found is this, but I'm not sure it refers to the same sGui:

https://github.com/AgentD/sgui
petan wrote:I am playing with Dislin from yesterday, on 64 bit Win 8.1. Works perfectly with FreeBAsic 1.00 32 bit+Dislin 10.5 32 bit + FbEdit 1076c 32 bit. ... Just unpack, set 2 environment variables and test it ;)
I've visited the website, it does look interesting.
Also, I've noticed that in the examples pages, the DISLIN website offers FreeBASIC source code!
Again, pitty it's not mentioned in the Wiki, even if compatible only with older versions of FB.
petan wrote:It has 777 routines, but don't forget it's primarily targeted to work as data visualisation tool; sothat creating highly customised GUI is not so applicable as in FLTK/GTK, seems.
With FLTK/GTK you will surely have a help on the forum..
Wooow! 777 is an intriguing number, something kabalistic about it ;-)

It does provide a very flexible way of visualizing all sorts of data, but I'm not sure about the user interaction aspect. Controls seems limited. But still worth looking at its documentation. Thanks.
petan wrote:My time to FB now is limited between hospitals visiting.
Sorry to read about that.

Best wishes,

Tristano (Italy)
Lothar Schirm
Posts: 491
Joined: Sep 28, 2013 15:08
Location: Germany

Re: Help with IUP 3.13 for FreeBASIC 1.03 (and wx.C )

Post by Lothar Schirm »

I think this is the right link for sGUI: http://www.freebasic.net/forum/viewtopi ... hilit=sGUI.
marcov
Posts: 3503
Joined: Jun 16, 2005 9:45
Location: Netherlands
Contact:

Re: Help with IUP 3.13 for FreeBASIC 1.03 (and wx.C )

Post by marcov »

Tristano wrote:
Wooow! 777 is an intriguing number, something kabalistic about it ;-)
More something unixy.
Post Reply