Re: Issues building FOX ToolKit

Jeroen van der Zijp <[email protected]> Wed, 22 Jan 2025 18:59:07 -0600
Newsgroups gmane.comp.lib.fox-toolkit.user
Organization FOX Toolkit
Message-ID <20250122185907.7dce9cc0@caladan>
On Wed, 22 Jan 2025 23:45:07 +0000
Charbel Khawand <[email protected]> wrote:

> Hi Jeron,
> 
> I downloaded your Fox ToolKit latest and tried to build it in visual studio 2022.
> 
> I hit an issue with the gif files in Adie.cpp as follows:
> 
>   smallicon = new FXGIFIcon(this, small_gif);
>   newicon=new FXGIFIcon(this,new_gif);
>   newfileicon=new FXGIFIcon(this,newfile_gif);
>   reloadicon=new FXGIFIcon(this,reload_gif);
>   openicon=new FXGIFIcon(this,open_gif);
> 
> etc...
> 
> The icons directory is there under Adie source project but those files fail to build.
> 
> Please let me know if you have a workaround.
> 
> Thanks,

The delivered project file is for an older version of VC++ [2015 I believe].

I have tested up to 2019 to upgrade projects, that seems to work.  I have not
tested VS2022 yet, it is possible some things have changed.

I can help you fill in the missing pieces:

1) The first project to be built should be "reswrap".  Reswrap is a tool that
   takes binary files [such as images and icons], and turns them into C data
   arrays, typically icons.h and icons.cpp.  For each such file, it'll generate
   a declaration in icons.h and a data array in the corresponding icons.cpp.

2) A "custom build rule" runs before the build starts.  It kicks of reswrap
   two times, onces for the icons.h and once for the icons.cpp.  These files
   should be already listed as dependencies for the FOX library, but the files
   may not yet exist yet until the custom build step creates them.

3) Input to the custom build step is the list of .bmp, .png, and .gif images/icons
   you find in the lib directory [and the directories of the sub-projects].
   Its kind of a long list.  You may want to do something like ls *.gif *.png *.bmp
   > list to build it, then paste the list into the "inputs" box of the custom
   build rule.

4) In principle, you are now able to build.


I suspect the project upgrade may have mangled the custom build step; its also possible
some icons got left out by accident.

If direct upgrade from VS2015 to VS2022 does not work, maybe upgrade via VS2019 does; I
know because I've used this on occasion I believe.


Best of luck,


             -- JVZ