FLTK logo

STR #2975

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 | Roadmap 1.3 | SVN ⇄ GIT ]

STR #2975

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:3 - Moderate, e.g. unable to compile the software
Scope:2 - Specific to an operating system
Subsystem:Core Library
Summary:fltk-1.3 svn, cross compile on cygwin for mingw: compiler error in factory.cxx
Version:1.3.2
Created By:a.rburgers.quicknet
Assigned To:AlbrechtS
Fix Version:1.3.3
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

No files


Trouble Report Comments:


Name/Time/Date Text  
 
#1 a.rburgers.quicknet
03:15 Sep 06, 2013
I am cross-compiling for mingw with i686-pc-mingw32-{gcc,c++} on cygwin.
In the past this cross-compilation was achieved with gcc -mno-cygwin,
but this approach has been obsoleted.

When compiling factory.cxx I get this error.

factory.cxx:46:1: error: ‘int _stricmp’ redeclared as different kind of symbol
In file included from ../FL/fl_utf8.h:34:0,
                 from ../FL/Fl.H:30,
                 from factory.cxx:27:
/usr/i686-pc-mingw32/sys-root/mingw/include/string.h:81:37: error: previous declaration of ‘int _stricmp(const char*, const char*)’
factory.cxx:46:1: error: expected primary-expression before ‘const’
factory.cxx:46:1: error: expected ‘)’ before ‘const’

The following work around makes it compile:

Index: fl_utf8.h
===================================================================
--- fl_utf8.h   (revision 9969)
+++ fl_utf8.h   (working copy)
@@ -40,7 +40,7 @@
 #  include <locale.h>
 #  include <ctype.h>
 #  define xchar wchar_t
-#  if !defined(FL_DLL) && !defined(__CYGWIN__)
+#  if !defined(FL_DLL) && !defined(__CYGWIN__) && 0
 #    undef strdup
 #    define strdup _strdup
 #    undef putenv
 
 
#2 AlbrechtS
14:01 Sep 28, 2014
Fixed in Subversion repository.

Thanks for the report.

The cause of the error has been fixed meanwhile, please confirm that it works for you now with current svn r 10344.

Besides that: I'd like to document how cross-compiling with Cygwin for MinGW should be done. Can you tell us what you are doing exactly? Configure options, installed Cygwin packages? TIA.
 
     

Return to Bugs & Features ]

 
 

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'.