I try to build wpkg (0.9.4 with patch for MSYS/MinGW support) with MinGW64 and g++ 4.8.3, but :
[ 59%]Building CXX object libdebpackages/CMakeFiles/debpackages.dir/wpkg_control_fields.cpp.objs:/devel/bootstrap-windev/sysroot/toolchain/var/tmp/src/wpkg_0.9.4/libdebpackages/wpkg_control_fields.cpp: In member function 'virtual void wpkg_control::control_file::field_description_t::verify_value() const':s:/devel/bootstrap-windev/sysroot/toolchain/var/tmp/src/wpkg_0.9.4/libdebpackages/wpkg_control_fields.cpp:884:25: error: call of overloaded 'arg(size_t&)' is ambiguous.arg(len)^
Regards,
Mathieu
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
#ifdefined(MO_WINDOWS)&&defined(_WIN64)/** \brief Replace an argument with the size_t value. * * This function replaces an argument in the format string with the * numeric value of the specified parameter. * * \param[in] v The value to replace the corresponding argument in the format string. * * \return The log reference. */log&log::arg(constsize_tv){std::ostringstreamss;ss<<v;f_args.push_back(ss.str());return*this;}#endif
That should work.
Maybe it will change with a different version of g++ although I use 4.8.1 right now under Ubuntu and I don't have the problem, so I could imagine that it is related to compiling under MinGW and maybe somewhat emulating the behavior of cl.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi guys.
I have created some patches to fix few issues with compilation on MinGW 32 and 64 bit platform.
I tried to create a pull request but did not get it to success.
And thus attached here.
I think there is no need to specify either MO_MINGW32 or MO_MINGW64.
It would make things more complicated with no additional profit.
I believe one define is enough and if you really need to test against 64-bit, then you may check if _WIN64 is defined.
With regards,
Yevgeny
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I try to build wpkg (0.9.4 with patch for MSYS/MinGW support) with MinGW64 and g++ 4.8.3, but :
Regards,
Mathieu
In order to fix I cast to (int) because it's just for logging; then it's safe.
Maybe we can fix that problem by changing the preprocessor test of the wpkg_output object:
In the header file:
And then in the cpp file:
That should work.
Maybe it will change with a different version of g++ although I use 4.8.1 right now under Ubuntu and I don't have the problem, so I could imagine that it is related to compiling under MinGW and maybe somewhat emulating the behavior of cl.
Thank you, see https://sourceforge.net/p/unigw/master/merge-requests/
Hello,
Something looks wrong with my patch?
Regards
Hi Mathieu,
I'm more that something wrong with my free time...
Also, I think we need to have an MO_MINGW64 instead of using the internal value within the code. And not define MO_MINGW32 when MO_MING64 is defined.
Thank you.
Alexis
Hi guys.
I have created some patches to fix few issues with compilation on MinGW 32 and 64 bit platform.
I tried to create a pull request but did not get it to success.
And thus attached here.
Alexis,
I think there is no need to specify either MO_MINGW32 or MO_MINGW64.
It would make things more complicated with no additional profit.
I believe one define is enough and if you really need to test against 64-bit, then you may check if _WIN64 is defined.
With regards,
Yevgeny
Hi,
I use your patches (1, 3 and 5), then it works great with w64 and "MinGW Makefile" generator.
Thank you very much.
Mathieu,
You are welcome.
It would be great if wpkg developers took part in wpkg development too :)
And we would love to, as well, but the problem is, we are not getting paid to work on this anymore.
Last edit: Alexis Wilke 2015-03-10