mainLINGOT Is Not a Guitar-Only Tuner - Support: sr #110650, Compilation error: TRUE is not...

 
 

sr #110650: Compilation error: TRUE is not defined?

Submitter:  Doron Behar <doronbehar>
Submitted:  Fri 13 May 2022 08:53:49 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 13 May 2022 08:53:49 AM UTC, original submission:  

Hello,

Trying to upgrade from 1.0.1 to 1.1.0 here on NixOS, I get the following compilation error:


src/lingot-io-ui-settings.c: In function 'lingot_io_ui_settings_init':
src/lingot-io-ui-settings.c:38:36: error: 'TRUE' undeclared (first use in this function)
   38 |     ui_settings.spectrum_visible = TRUE;
      |                                    ^~~~


Is there a missing `#include` that is not reported? I managed to fix compilation with the following patch:


diff --git i/src/lingot-defs.h w/src/lingot-defs.h
index 53db350..6a66273 100644
--- i/src/lingot-defs.h
+++ w/src/lingot-defs.h
@@ -25,6 +25,9 @@
 #ifndef LINGOT_DEFS_H
 #define LINGOT_DEFS_H

+#define TRUE 1
+#define FALSE 0
+
 #ifdef __cplusplus
 extern "C" {
 #endif


But with it I get the compilation warnings:


src/lingot-defs.h:28: warning: "TRUE" redefined
   28 | #define TRUE 1


And it's redefined according to the compiler at:


/...-glib-2.72.1-dev/include/glib-2.0/glib/gmacros.h:880: note: this is the location of the previous definition
880 | #define TRUE    (!FALSE)


Any ideas?

Doron Behar <doronbehar>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by doronbehar (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code