You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
has someone succesfully ported the library to windows?
I had to switch from linux to windows so i tried to use the binary form from the myolinux_1.1.0_x86_64.tar file.
I downloaded and extracted into my project folder, renamed the folder to "myolinux" and included it into my project with cmake as follows:
and the compiler finds the files but then i get houndreds of errors from "bleapi.h" as:
\myolinux\bleapi.h(20): error C2079: '__packed__' uses undefined struct 'myolinux::bled112::__attribute__'
\myolinux\bleapi.h(20): error C2146: syntax error: missing ';' before identifier 'Header'
\myolinux\bleapi.h(20): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
\myolinux\bleapi.h(21): error C2275: 'uint8_t': illegal use of this type as an expression
de\myolinux\bleapi.h(21): note: see declaration of 'uint8_t'
\myolinux\bleapi.h(21): error C2146: syntax error: missing ')' before identifier 'length1'
\myolinux\bleapi.h(21): error C2059: syntax error: 'constant'
\myolinux\bleapi.h(22): error C2143: syntax error: missing ';' before ':'
\myolinux\bleapi.h(22): error C2059: syntax error: ':'
\myolinux\bleapi.h(22): error C2059: syntax error: 'constant'
\myolinux\bleapi.h(23): error C2143: syntax error: missing ';' before ':'
\myolinux\bleapi.h(23): error C2059: syntax error: ':'
\myolinux\bleapi.h(23): error C2059: syntax error: 'constant'
\myolinux\bleapi.h(29): error C2270: 'length': modifiers not allowed on nonmember functions
\myolinux\bleapi.h(30): error C2065: 'length1': undeclared identifier
\myolinux\bleapi.h(35): error C2061: syntax error: identifier 'getHeader'
\myolinux\bleapi.h(36): error C2143: syntax error: missing ';' before '{'
\myolinux\bleapi.h(36): error C2447: '{': missing function header (old-style formal list?)
\myolinux\bleapi.h(57): error C2146: syntax error: missing ';' before identifier 'SystemReset'
\myolinux\bleapi.h(57): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
\myolinux\bleapi.h(58): error C2065: 'cls': undeclared identifier
\myolinux\bleapi.h(58): error C2065: 'cmd': undeclared identifier
\myolinux\bleapi.h(58): error C2059: syntax error: ';'
\myolinux\bleapi.h(62): error C2146: syntax error: missing ';' before identifier 'SystemResetResponse'
\myolinux\bleapi.h(62): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
\myolinux\bleapi.h(63): error C2065: 'cls': undeclared identifier
\myolinux\bleapi.h(63): error C2065: 'cmd': undeclared identifier
\myolinux\bleapi.h(63): error C2059: syntax error: ';'
\myolinux\bleapi.h(64): error C2059: syntax error: '}'
\myolinux\bleapi.h(64): error C2143: syntax error: missing ';' before '}'
\myolinux\bleapi.h(66): error C2146: syntax error: missing ';' before identifier 'SystemHello'
\myolinux\bleapi.h(66): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
\myolinux\bleapi.h(67): error C2065: 'cls': undeclared identifier
\myolinux\bleapi.h(67): error C2065: 'cmd': undeclared identifier
\myolinux\bleapi.h(67): error C2059: syntax error: ';'
\myolinux\bleapi.h(68): error C2059: syntax error: '}'
\myolinux\bleapi.h(68): error C2143: syntax error: missing ';' before '}'
\myolinux\bleapi.h(70): error C2146: syntax error: missing ';' before identifier 'SystemHelloResponse'
\myolinux\bleapi.h(70): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
\myolinux\bleapi.h(71): error C2065: 'cls': undeclared identifier
\myolinux\bleapi.h(71): error C2065: 'cmd': undeclared identifier
\myolinux\bleapi.h(71): error C2059: syntax error: ';'
\myolinux\bleapi.h(72): error C2059: syntax error: '}'
\myolinux\bleapi.h(72): error C2143: syntax error: missing ';' before '}'
\myolinux\bleapi.h(74): error C2146: syntax error: missing ';' before identifier 'SystemAddressGet'
\myolinux\bleapi.h(74): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
\myolinux\bleapi.h(75): error C2065: 'cls': undeclared identifier
\myolinux\bleapi.h(75): error C2065: 'cmd': undeclared identifier
\myolinux\bleapi.h(75): error C2059: syntax error: ';'
\myolinux\bleapi.h(76): error C2059: syntax error: '}'
\myolinux\bleapi.h(76): error C2143: syntax error: missing ';' before '}'
\myolinux\bleapi.h(78): error C2146: syntax error: missing ';' before identifier 'SystemAddressGetResponse'
\myolinux\bleapi.h(78): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
\myolinux\bleapi.h(79): error C2065: 'cls': undeclared identifier
\myolinux\bleapi.h(79): error C2065: 'cmd': undeclared identifier
\myolinux\bleapi.h(79): error C2059: syntax error: ';'
\myolinux\bleapi.h(81): error C2059: syntax error: '}'
\myolinux\bleapi.h(81): error C2143: syntax error: missing ';' before '}'
\myolinux\bleapi.h(83): error C2146: syntax error: missing ';' before identifier 'SystemRegWrite'
\myolinux\bleapi.h(83): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
\myolinux\bleapi.h(84): error C2065: 'cls': undeclared identifier
\myolinux\bleapi.h(84): error C2065: 'cmd': undeclared identifier
\myolinux\bleapi.h(84): error C2059: syntax error: ';'
\myolinux\bleapi.h(87): error C2059: syntax error: '}'
\myolinux\bleapi.h(87): error C2143: syntax error: missing ';' before '}'
\myolinux\bleapi.h(89): error C2146: syntax error: missing ';' before identifier 'SystemRegWriteResponse'
\myolinux\bleapi.h(89): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
\myolinux\bleapi.h(90): error C2065: 'cls': undeclared identifier
\myolinux\bleapi.h(90): error C2065: 'cmd': undeclared identifier
\myolinux\bleapi.h(90): error C2059: syntax error: ';'
\myolinux\bleapi.h(92): error C2059: syntax error: '}'
\myolinux\bleapi.h(92): error C2143: syntax error: missing ';' before '}'
\myolinux\bleapi.h(94): error C2146: syntax error: missing ';' before identifier 'SystemRegRead'
\myolinux\bleapi.h(94): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
\myolinux\bleapi.h(95): error C2065: 'cls': undeclared identifier
\myolinux\bleapi.h(95): error C2065: 'cmd': undeclared identifier
\myolinux\bleapi.h(95): error C2059: syntax error: ';'
\myolinux\bleapi.h(97): error C2059: syntax error: '}'
\myolinux\bleapi.h(97): error C2143: syntax error: missing ';' before '}'
\myolinux\bleapi.h(99): error C2146: syntax error: missing ';' before identifier 'SystemRegReadResponse'
\myolinux\bleapi.h(99): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
\myolinux\bleapi.h(100): error C2065: 'cls': undeclared identifier
\myolinux\bleapi.h(100): error C2065: 'cmd': undeclared identifier
\myolinux\bleapi.h(100): error C2059: syntax error: ';'
\myolinux\bleapi.h(103): error C2059: syntax error: '}'
\myolinux\bleapi.h(103): error C2143: syntax error: missing ';' before '}'
\myolinux\bleapi.h(105): error C2146: syntax error: missing ';' before identifier 'SystemGetCounters'
\myolinux\bleapi.h(105): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
\myolinux\bleapi.h(106): error C2065: 'cls': undeclared identifier
\myolinux\bleapi.h(106): error C2065: 'cmd': undeclared identifier
\myolinux\bleapi.h(106): error C2059: syntax error: ';'
\myolinux\bleapi.h(107): error C2059: syntax error: '}'
\myolinux\bleapi.h(107): error C2143: syntax error: missing ';' before '}'
and many more...
I don't know if it's not possible to import the binary form as i did or if i need to build from source on windows or what the problem is exactly - so any help is highly appreciated.
The text was updated successfully, but these errors were encountered:
I think the problem is that I used __attribute__((__packed__)) which is not supported on the MSVC compiler. It should be easy to fix by replacing PACKED in the bleapi.h with #pragma pack(push, 1) at the top and #pragma pack(pop) at the bottom of each struct definition (that is currently marked as PACKED).
Once you fix that there might also be some issues in the serial.cpp file as it uses Unix specific libraries to communicate over the serial port. You can re-implement this class using the Windows library. The rest of the code should compile without any problems though, because it doesn't have any external dependencies.
It would be easier if you used the GCC compiler (using Cygwin), in that case I expect the modifications would not be needed.
Hi,
has someone succesfully ported the library to windows?
I had to switch from linux to windows so i tried to use the binary form from the myolinux_1.1.0_x86_64.tar file.
I downloaded and extracted into my project folder, renamed the folder to "myolinux" and included it into my project with cmake as follows:
without cmake throwing errors, so I can do:
and the compiler finds the files but then i get houndreds of errors from "bleapi.h" as:
and many more...
I don't know if it's not possible to import the binary form as i did or if i need to build from source on windows or what the problem is exactly - so any help is highly appreciated.
The text was updated successfully, but these errors were encountered: