bugGNU Gengetopt - Bugs: bug #41589, bug in compiling source...

 
 

bug #41589: bug in compiling source gengetopt-2.22

Submitted by:  Cesare Corrado <ccorrado>
Submitted on:  Fri 14 Feb 2014 05:13:05 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sat 01 Mar 2014 12:25:27 PM UTC, comment #6:

I consider this closed, since the problem is not present in the current sources.

Lorenzo Bettini <bettini>
Project Administrator
Fri 14 Feb 2014 10:18:29 PM UTC, comment #5:

Then you have an old version :)

http://git.savannah.gnu.org/cgit/gengetopt.git/tree/src/fileutils.cpp

the latest version is 2.22.6

That should be the source of your problem, please let me know, so that I can close this issue

Lorenzo Bettini <bettini>
Project Administrator
Fri 14 Feb 2014 08:44:44 PM UTC, comment #4:

in the one I have there are:

<stdio.h>
<stdlib.h>

nothing dealing with strings. I added string.h

Cesare Corrado <ccorrado>
Fri 14 Feb 2014 08:31:20 PM UTC, comment #3:

Sorry Corrado, I meant this one:

#include <cstring>

that's included in fileutils.cpp and this should include strlen, shouldn't it?

Lorenzo Bettini <bettini>
Project Administrator
Fri 14 Feb 2014 07:55:04 PM UTC, comment #2:

environment: ubuntu 12.04 64 bit
kernel: 3.2.0-58-generic
compiler: GNU 4.6.3

cstdlib should be the c++ version of stdlib.h, not of string and apparently there is not strlen:
http://www.cplusplus.com/reference/cstdlib/

in any case, adding the header of string its work

Cesare Corrado <ccorrado>
Fri 14 Feb 2014 05:44:08 PM UTC, comment #1:

mh... that's strange: fileutils.cpp includes

#include <cstdlib>

which is the C++ version of string.h...

can you please tell me about your compilation environment?

Lorenzo Bettini <bettini>
Project Administrator
Fri 14 Feb 2014 05:13:05 PM UTC, original submission:

in file src/fileutils.cpp it should add the following header:

#include <string.h>

otherwise does not recognize strlen function

Cesare Corrado <ccorrado>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bettini (Posted a comment)
  • -unavailable- added by ccorrado (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 01 Mar 2014 12:25:27 PM UTCbettiniStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1