Hi, Mikko!
I try to compile project with last changes in gurux.dlms.cpp but have compile errors (Linux).
1. In file GXAsn1Integer.h #include "GXBiginteger.h" but correct file name is "GXBigInteger.h"
2. In file GXx509Certificate.h #include "Enums.h" but correct file name is "enums.h"
3. Compile error in file GXPkcs.cpp:
SOCKET was not declared in this scope.
‘closesocket’ was not declared in this scope
cannot bind non-const lvalue reference of type ‘std::vector<std::__cxx11::basic_string<char> >&’ to an rvalue of type ‘std::vector<std::__cxx11::basic_string<char> >’
Thanks!
On Linux function socket()…
On Linux function socket() returns int instead SOCKET, close() instead closecocket()
Hi Dmitry, Thank you for…
Hi Dmitry,
Thank you for pointing this out. Those are now fixed to the latest version.
BR,
Mikko
Thank you for fix. Also can…
Thank you for fix. Also can't compile for Windows (MinGW). Error in bool GXHelpers::DirectoryExists(const char* path) method.
no matching function for call to '_stat::_stat(const char*&, stat*).
Hi, There is no easy way to…
Hi,
There is no easy way to solve this because _WIN32 is defined.
I need to think if IGNORE_CERTIFICATION_UPDATE is defined that can be used to ignore this functionality.
BR,
Mikko
I think you can write like…
I think you can write like this:
#if defined(_WIN32) || defined(_WIN64)//Windows
#include <direct.h>
#include <sys/stat.h> //here _stat() for Windows
#endif
#if defined(__linux__)
#include <sys/stat.h>
#endif
bool GXHelpers::DirectoryExists(const char* path)
{
#if defined(_WIN32) || defined(_WIN64)//Windows
struct _stat sb;
if(_stat(path, &sb) == 0)
return true;
return false;
#else
struct stat sb;
if (stat(path, &sb) == 0)
{
return true;
}
return false;
#endif
}
This code compiles succsessfully.
Hi Dmitry, Windows doesn't…
Hi Dmitry,
Windows doesn't normally use sys/stat.h. This doesn't work e.g. with Visual Studio,
#include <sys/stat.h>
I believe there will be a compiler option for this for the next release.
BR,
Mikko
Hi, Get the latest version…
Hi,
Get the latest version and add DLMS_IGNORE_DIRECTORY for your make file.
That will solve this problem.
BR,
Mikko
Thanks for your fix! I'll…
Thanks for your fix! I'll try it.