octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MinGW build error 'setenv' was not declared in this scope'


From: Daniel J Sebald
Subject: Re: MinGW build error 'setenv' was not declared in this scope'
Date: Mon, 17 Sep 2012 21:19:02 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 09/17/2012 07:41 PM, Michael Goffioul wrote:
On Mon, Sep 17, 2012 at 8:21 PM, Daniel J Sebald <address@hidden
<mailto:address@hidden>> wrote:

    On 09/17/2012 05:27 PM, Michael Goffioul wrote:

        On Mon, Sep 17, 2012 at 6:14 PM, Philip Nienhuis
        <address@hidden <mailto:address@hidden>
        <mailto:address@hidden
        <mailto:address@hidden>>> wrote:

             (MinGW, gcc 4.5.2)

             ../../octave/libgui/src/__octave-gui.cc: In function 'int
             octave_start_gui(int, char**)':
             ../../octave/libgui/src/__octave-gui.cc:85:29: error:
        'setenv' was not
             declared in this scope
             make[3]: *** [src/src_libgui_src_la-octave-__gui.lo] Error 1
             make[3]: Leaving directory
        `/home/Philip/octdev/oct-3.7/__libgui'
             make[2]: *** [all] Error 2
             make[2]: Leaving directory
        `/home/Philip/octdev/oct-3.7/__libgui'
             make[1]: *** [all-recursive] Error 1
             make[1]: Leaving directory `/home/Philip/octdev/oct-3.7'
             make: *** [all] Error 2

             FWIW, some googling turned up that MinGW (nor MSVC) doesn't
        have
        "setenv".
             It seems "putenv" is advised.

             Suggestions on how to get past this error?


        I suppose the GUI code should use octave_env::putenv() instead.


    Does that work on your system?  If so, submit a patch to the tracker
    and I'll try it here on a linux system.


I won't be able to test that soon. But given that octave_putenv is based
on gnulib's putenv, I expect it to work. Anyway, setenv in octave is
working fine.

In the attached patch I replaced setenv with octave_putenv since "lo-utils.h" is already include in the list of header files. (octave_env::putenv() is a simple call to octave_putenv. John, if we should be using OOP over library call, let us know.) Please give that a try under MinGW.

Dan

Attachment: octave-replace_setenv_with_octave_putenv-2012sep17.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]