Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not compile in Visual Studio Cross env for RPI #18

Open
lve0200 opened this issue Nov 16, 2021 · 1 comment
Open

does not compile in Visual Studio Cross env for RPI #18

lve0200 opened this issue Nov 16, 2021 · 1 comment

Comments

@lve0200
Copy link

lve0200 commented Nov 16, 2021

Hi,
I wanted to compile it in VS2019, but it doesn't. I works fine, when directly compiled on RPI 3B. VS creates an endless Error list for the system include stl_function.h complaining about "auto"

Schweregrad Code Beschreibung Projekt Datei Zeile Unterdrückungszustand Fehler (aktiv) E0040 Es wurde ein Bezeichner erwartet. DCF77 C:\Users\hk\AppData\Local\Microsoft\Linux\HeaderCache\1.0\-460273873\usr\include\c++\10\bits\stl_function.h 537 Fehler (aktiv) E1598 "auto" ist an dieser Stelle nicht zulässig. DCF77 C:\Users\hk\AppData\Local\Microsoft\Linux\HeaderCache\1.0\-460273873\usr\include\c++\10\bits\stl_function.h 537 Fehler (aktiv) E0065 Es wurde ein ";" erwartet. DCF77 C:\Users\hk\AppData\Local\Microsoft\Linux\HeaderCache\1.0\-460273873\usr\include\c++\10\bits\stl_function.h 538 Fehler (aktiv) E0840 In einer Deklaration einer primären Vorlage ist keine Vorlagenargumentliste zulässig. DCF77 C:\Users\hk\AppData\Local\Microsoft\Linux\HeaderCache\1.0\-460273873\usr\include\c++\10\bits\stl_function.h 556
` private:
template <typename _Tp, typename _Up>
static constexpr decltype(auto)
_S_cmp(_Tp&& __t, _Up&& __u, false_type)
{ return std::forward<_Tp>(__t) > std::forward<_Up>(__u); }

  template <typename _Tp, typename _Up>
static constexpr bool
_S_cmp(_Tp&& __t, _Up&& __u, true_type) noexcept
{
  return greater<const volatile void*>{}(
      static_cast<const volatile void*>(std::forward<_Tp>(__t)),
      static_cast<const volatile void*>(std::forward<_Up>(__u)));
}

  // True if there is no viable operator> member function.
  template<typename _Tp, typename _Up, typename = void>
struct __not_overloaded2 : true_type { };

  // False if we can call T.operator>(U)
  template<typename _Tp, typename _Up>
struct __not_overloaded2<_Tp, _Up, __void_t<
  decltype(std::declval<_Tp>().operator>(std::declval<_Up>()))>>`

It may have something to do w/ the following:
https://stackoverflow.com/questions/40368535/unable-to-get-type-of-function-returning-constexpr-auto
but this beyond my CPP knowledge. Could you make your code compatible?
BR
hk

@hzeller
Copy link
Owner

hzeller commented Nov 16, 2021

All the errors you show above are in the system headers not txtempus so you have to look through your installation first.

I don't quite understand why you want to go through the pain of using Windows with very poor support for a Unix environment to compile code for the Pi when it is just straightforward and simple to directly do it on the Pi.
Even if you want to remote compile on Windows, I suggest to use llvm or gcc instead of msvc which has a lot of issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants