FLTK logo

STR #3416

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Post Text | Post File | SVN ⇄ GIT | Prev | Next ]

STR #3416

Application:FLTK Library
Status:5 - New
Priority:3 - Moderate, e.g. unable to compile the software
Scope:2 - Specific to an operating system
Subsystem:Build Files
Summary:Changes to compile FLTK 1.4 with OpenWatcom 1.9
Version:1.4.0
Created By:FlyingJester
Assigned To:Unassigned
Fix Version:Unassigned
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

Post File ]
Name/Time/Date Filename/Size  
 
#1 FlyingJester
16:56 Oct 15, 2017
watcom.diff
17k
 
 
#2 AlbrechtS
07:35 Oct 16, 2017
build.log
48k
 
     

Trouble Report Comments:

Post Text ]
Name/Time/Date Text  
 
#1 FlyingJester
16:56 Oct 15, 2017
Attached is a diff to allow FLTK to compile with OpenWatcom 1.9

I haven't extensively tested this change yet, but the changes are very similar to what I had to do to make 1.3 compile with OpenWatcom 1.9, and I have tested that pretty well.

I don't expect this diff to make it right now because I had to modify libpng and nanosvg to get them to compile, and I obviously don't expect the project to maintain divergent versions of these libraries.

Some of the changes required:
* Disable multimonitor support, add a different include for HMONITOR
* Fix redefinition of dirent in platform_types (Watcom provides a working dirent implementation in direct.h)
* Fix the threads example, which apparently expected Watcom to default to cdecl.

Actually getting nanosvg to compile as-is could be done just by defining the base trigonometric functions over the *f functions, which require C99 (which OpenWatcom doesn't fully support).

Compiling libpng without patches requires changing the API rule in pnglibconf, but I have no idea how to do that using CMake over top of libpng as is done in FLTK.
 
 
#2 AlbrechtS
07:35 Oct 16, 2017
Thanks for the patch.

I managed to install OpenWatcom 1.9 and I can confirm that it works with lots of warnings (as expected). After suppresion of warning #666 the build still displays many warnings, but the most annoying warnings are gone.

I don't know the best way to install and execute OpenWatcom, but what I did was basically:

- install OpenWatcom 1.9 w/o modification of system paths and environment

- use a working MinGW shell for the following steps:

- write a short script that does what the installation process suggests in file CHANGES.ENV (generated during installation)

- run this script, defining three environment variables:
PATH=/c/watcom/binnt:/c/watcom/binw:/usr/local/bin:/mingw/bin:/bin:/c/WINDOWS/sy
stem32
INCLUDE=/c/watcom/h:/c/watcom/h/nt:/c/watcom/h/nt/directx:/c/watcom/h/nt/ddk
WATCOM=/c/watcom

- Note: the syntax is MinGW (Unix) style, your paths and such may vary

- run CMake to generate Watcom WMake files and suppress warning #666:

  cmake -G"Watcom WMake" \
    -DOPTION_OPTIM:STRING="-wcd=666" \
    -DCMAKE_BUILD_TYPE=Debug

- build (using wmake)

The complete log is attached, see build.log.

With this method the resulting executables seem to work well, but they do obviously depend on some (Watcom) dlls. Hence they can't be executed directly under Windows (for instance clicking in an explorer window) unless you change the system PATH variable, which I didn't want to do.

So far my report about installation and first tests. Note that I only tested the CMake build with "wmake", no IDE.
 
     

Return to Bugs & Features | Post Text | Post File ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.