Problem fixed, well, need further more tests. Currently compiling can be
done.

Add a line in *gnucash-core-app.hpp as below.*

*diff --git a/gnucash/gnucash-core-app.hpp b/gnucash/gnucash-core-app.hpp*
*index b9ba65dec9..a793327c0e 100644*
*--- a/gnucash/gnucash-core-app.hpp*
*+++ b/gnucash/gnucash-core-app.hpp*
*@@ -26,6 +26,7 @@*

* #ifdef __MINGW32__*
* #undef _GLIBCXX_USE_C99_MATH_TR1 // Avoid cmath missing function decl.*
*+#undef _GLIBCXX_USE_C99_MATH_FUNCS*
* #endif*
* #include <boost/optional.hpp>*
* #include <boost/program_options.hpp>*


Does this line have further impact?

Cheers.
Hai Liang W.


On Thu, Aug 15, 2024 at 2:50 PM Hai Liang Wang <hailiang.hl.w...@gmail.com>
wrote:

> So far, I know more about the problem, but haven't find a solution yet.
>
> `cmath:2106:11: error: 'copysign' has not been declared in '::'`, this
> link explain the error cause -
>
> https://stackoverflow.com/questions/1216878/cmath-functions-generating-compiler-error
>
> And in, `gnucash\stable\src\gnucash-git\gnucash\gnucash-core-app.hpp`, it
> has
>
> *#ifdef __MINGW32__*
> *#undef _GLIBCXX_USE_C99_MATH_TR1 // Avoid cmath missing function decl.*
> *#endif*
>
> What happens in my machine, is that cmath's functions are missing, like
> *copysign.*
>
> So, how to get rid of it?
> Need help, thanks.
>
> Cheers.
> Hai Liang W.
>
>
> On Thu, Aug 15, 2024 at 11:32 AM Hai Liang Wang <
> hailiang.hl.w...@gmail.com> wrote:
>
>> hi, folks
>>
>> Run script `TARGET=gnucash-stable jhbuild -f jhbuildrc build` to build
>> windows installer, come to an error -
>>
>> *gnucash.dir/gnucash-core-app.cpp.obj -c
>> C:/gcdev64/gnucash/stable/src/gnucash-git/gnucash/gnucash-core-app.cpp*
>> *In file included from
>> C:/gcdev64/msys2/mingw32/include/boost/core/cmath.hpp:19,*
>> *                 from
>> C:/gcdev64/msys2/mingw32/include/boost/lexical_cast/detail/converter_numeric.hpp:26,*
>> *                 from
>> C:/gcdev64/msys2/mingw32/include/boost/lexical_cast/try_lexical_convert.hpp:31,*
>> *                 from
>> C:/gcdev64/msys2/mingw32/include/boost/lexical_cast.hpp:33,*
>> *                 from
>> C:/gcdev64/msys2/mingw32/include/boost/program_options/value_semantic.hpp:14,*
>> *                 from
>> C:/gcdev64/msys2/mingw32/include/boost/program_options/options_description.hpp:13,*
>> *                 from
>> C:/gcdev64/msys2/mingw32/include/boost/program_options.hpp:15,*
>> *                 from
>> C:/gcdev64/gnucash/stable/src/gnucash-git/gnucash/gnucash-core-app.hpp:31,*
>> *                 from
>> C:/gcdev64/gnucash/stable/src/gnucash-git/gnucash/gnucash-core-app.cpp:32:*
>> *C:/gcdev64/msys2/mingw32/include/c++/14.2.0/cmath:2106:11: error:
>> 'copysign' has not been declared in '::'*
>> * 2106 |   using ::copysign;*
>> *      |           ^~~~~~~~*
>> *[124/131] Building CXX object
>> gnucash/CMakeFiles/gnucash.dir/gnucash.cpp.obj*
>> *FAILED: gnucash/CMakeFiles/gnucash.dir/gnucash.cpp.obj *
>>
>> How to fix it?
>> Any suggestion is apprecaited.
>>
>> Other version info:
>>
>> *# g++ --version*
>> g++.exe (Rev1, Built by MSYS2 project) 14.2.0
>> Copyright (C) 2024 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.  There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>> PURPOSE.
>>
>> *# pacman -Q|grep c++*
>> mingw-w64-i686-libc++ 18.1.8-1
>>
>> *# pacman -Q|grep boost*
>> mingw-w64-i686-boost 1.85.0-4
>>
>>
>> Attached the full log.
>>
>> Cheers.
>> Hai Liang W.
>>
>
_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to