Htmlayout / Sciter c MinGW
От: littlesam  
Дата: 07.10.14 06:22
Оценка:
Добрый день!

Кто может подсказать как использовать Htmlayout / Sciter для компиляции MinGW?

Именно MinGW нужен т.к. используются сторонние библиотеки откомпилированные именно им.

Что я делал:
1) Скачел TDM64 (вроде как самый популярный порт MinGW) c http://tdm-gcc.tdragon.net/download
2) Установил его в корень С:\
3) создал файл minimal.cpp
#include <windows.h>
#include "C:\workspace\cpp_libs\sciter-sdk\include\sciter-x.h"

int CALLBACK WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
    HWND wnd = ::CreateWindowEx(
        0,
        ::SciterClassName(),
        L"Minimal Sciter Application",
        WS_OVERLAPPEDWINDOW,
        CW_USEDEFAULT, 0,
        800, 600,
        0,0,0,0);

    ::SciterLoadFile(wnd, L"minimal.htm");
    ::ShowWindow(wnd, SW_SHOWNORMAL);

    MSG msg;
  while( ::IsWindow(wnd) && GetMessage(&msg, 0, 0, 0) )
    {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }
  return 0;
}

4) выполнил комманду g++ -o demo_htmlayout.exe minimal.cpp
5) получаю ошибки:
C:\workspace\cpp\demo_htmlayout>g++ -o demo_htmlayout.exe minimal.cpp
In file included from C:\workspace\cpp_libs\sciter-sdk\include\value.hpp:26:0,
                 from C:\workspace\cpp_libs\sciter-sdk\include\value.h:293,
                 from C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-def.h:24
,
                 from C:\workspace\cpp_libs\sciter-sdk\include\sciter-x.h:5,
                 from minimal.cpp:5:
C:\workspace\cpp_libs\sciter-sdk\include\aux-cvt.h: In constructor 'aux::itot<CT
>::itot(int, int)':
C:\workspace\cpp_libs\sciter-sdk\include\aux-cvt.h:685:7: error: 'reverse' is no
t a member of 'std'
       std::reverse(buffer,wstr);
       ^
C:\workspace\cpp_libs\sciter-sdk\include\aux-cvt.h: In constructor 'aux::ftoa::f
toa(double, const char*, int)':
C:\workspace\cpp_libs\sciter-sdk\include\aux-cvt.h:705:69: error: '_snprintf_s'
was not declared in this scope
       _snprintf_s(buffer, 64, "%.*f%s", fractional_digits, d, units );
                                                                     ^
In file included from C:\workspace\cpp_libs\sciter-sdk\include\value.h:293:0,
                 from C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-def.h:24
,
                 from C:\workspace\cpp_libs\sciter-sdk\include\sciter-x.h:5,
                 from minimal.cpp:5:
C:\workspace\cpp_libs\sciter-sdk\include\value.hpp: In member function 'sciter::
value sciter::value::call()':
C:\workspace\cpp_libs\sciter-sdk\include\value.hpp:368:37: error: 'nullptr' was
not declared in this scope
       value call() {  return call(0,nullptr);  }
                                     ^
In file included from C:\workspace\cpp_libs\sciter-sdk\include\sciter-x.h:4:0,
                 from minimal.cpp:5:
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-dom.h: At global scope:
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-types.h:222:27: error: expecte
d unqualified-id before string constant
   #define EXTERN_C extern "C"
                           ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-dom.h:171:10: note: in expansi
on of macro 'EXTERN_C'
 OBSOLETE EXTERN_C SCDOM_RESULT SCAPI SciterGetElementHtml(HELEMENT he, LPCBYTE*
 utf8bytes, BOOL outer);
          ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-types.h:222:27: error: expecte
d unqualified-id before string constant
   #define EXTERN_C extern "C"
                           ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-dom.h:191:11: note: in expansi
on of macro 'EXTERN_C'
  OBSOLETE EXTERN_C SCDOM_RESULT SCAPI SciterGetElementText(HELEMENT he, LPWSTR*
 utf16);
           ^
In file included from C:\workspace\cpp_libs\sciter-sdk\include\tiscript.hpp:6:0,

                 from C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-api.h:11
,
                 from C:\workspace\cpp_libs\sciter-sdk\include\sciter-x.h:8,
                 from minimal.cpp:5:
C:\workspace\cpp_libs\sciter-sdk\include\tiscript-streams.hpp: In constructor 't
iscript::file_istream::file_istream(const WCHAR*)':
C:\workspace\cpp_libs\sciter-sdk\include\tiscript-streams.hpp:76:40: error: '_wf
open_s' was not declared in this scope
         _wfopen_s(&_file,filename,L"rb");
                                        ^
In file included from C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-api.h:11
:0,
                 from C:\workspace\cpp_libs\sciter-sdk\include\sciter-x.h:8,
                 from minimal.cpp:5:
C:\workspace\cpp_libs\sciter-sdk\include\tiscript.hpp: At global scope:
C:\workspace\cpp_libs\sciter-sdk\include\tiscript.hpp:10:72: error: 'nullptr' wa
s not declared in this scope
   inline tiscript_native_interface* ni(tiscript_native_interface* ni = nullptr)

                                                                        ^
C:\workspace\cpp_libs\sciter-sdk\include\tiscript.hpp: In function 'tiscript_nat
ive_interface* tiscript::ni(tiscript_native_interface*)':
C:\workspace\cpp_libs\sciter-sdk\include\tiscript.hpp:12:45: error: 'nullptr' wa
s not declared in this scope
     static tiscript_native_interface* _ni = nullptr;
                                             ^
In file included from C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-api.h:11
:0,
                 from C:\workspace\cpp_libs\sciter-sdk\include\sciter-x.h:8,
                 from minimal.cpp:5:
C:\workspace\cpp_libs\sciter-sdk\include\tiscript.hpp: In constructor 'tiscript:
:args::error::error(int, const char*)':
C:\workspace\cpp_libs\sciter-sdk\include\tiscript.hpp:363:86: error: 'sprintf_s'
 was not declared in this scope
             sprintf_s(buffer, "parameter %d, expecting %s", param_n-2, expectin
g_type);

      ^
In file included from C:\workspace\cpp_libs\sciter-sdk\include\sciter-x.h:8:0,
                 from minimal.cpp:5:
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-api.h: At global scope:
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-api.h:265:48: error: 'nullptr'
 was not declared in this scope
     inline ISciterAPI* SAPI( ISciterAPI* ext = nullptr ) {
                                                ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-api.h: In function 'ISciterAPI
* SAPI(ISciterAPI*)':
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-api.h:266:34: error: 'nullptr'
 was not declared in this scope
        static ISciterAPI* _api = nullptr;
                                  ^
In file included from C:\workspace\cpp_libs\sciter-sdk\include\sciter-x.h:13:0,
                 from minimal.cpp:5:
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-dom.hpp: In member function 's
citer::string sciter::dom::element::combine_url(const string&) const':
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-dom.hpp:623:7: error: 'copy_n'
 is not a member of 'std'
       std::copy_n(relative_url.cbegin(), length, buffer);
       ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-dom.hpp:623:32: error: 'const
string' has no member named 'cbegin'
       std::copy_n(relative_url.cbegin(), length, buffer);
                                ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-dom.hpp: In member function 'h
tml::element* sciter::dom::element::find_first(const char*, ...) const':
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-dom.hpp:690:40: error: 'vsprin
tf_s' was not declared in this scope
       vsprintf( buffer, selector, args );
                                        ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-dom.hpp: In member function 'v
oid sciter::dom::element::find_all(sciter::dom::callback*, const char*, ...) con
st':
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-dom.hpp:703:40: error: 'vsprin
tf_s' was not declared in this scope
       vsprintf( buffer, selector, args );
                                        ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-dom.hpp: In member function 'h
tml::element* sciter::dom::element::find_nearest_parent(const char*, ...) const'
:
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-dom.hpp:715:40: error: 'vsprin
tf_s' was not declared in this scope
       vsprintf( buffer, selector, args );
                                        ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-dom.hpp: In member function 'b
ool sciter::dom::element::test(const char*, ...) const':
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-dom.hpp:730:40: error: 'vsprin
tf_s' was not declared in this scope
       vsprintf( buffer, selector, args );
                                        ^
In file included from C:\workspace\cpp_libs\sciter-sdk\include\sciter-x.h:14:0,
                 from minimal.cpp:5:
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-host-callback.h: In function '
bool sciter::load_resource_data(HINSTANCE, LPCWSTR, const BYTE*&, UINT&)':
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-host-callback.h:228:60: error:
 'wcsncpy_s' was not declared in this scope
     WCHAR achURL[MAX_PATH]; wcsncpy_s(achURL, uri, MAX_PATH);
                                                            ^
In file included from C:\workspace\cpp_libs\sciter-sdk\include\sciter-x.h:15:0,
                 from minimal.cpp:5:
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-debug.h: In member function 'v
oid sciter::debug_output::printf(const char*, ...)':
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-debug.h:77:49: error: 'vsprint
f_s' was not declared in this scope
         int len = vsprintf_s( buffer, fmt, args );
                                                 ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-debug.h: At global scope:
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-debug.h:229:15: error: 'functi
on' in namespace 'std' does not name a type
       typedef std::function<void(const WCHAR* fileUrl, unsigned lineNo)> breakp
oint_receiver_t;
               ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-debug.h:262:38: error: 'std::f
unction' has not been declared
       void dbg_enumBreakpoints( std::function<void(const WCHAR* fileUrl, unsign
ed lineNo)> receiver ) {
                                      ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-debug.h:262:46: error: expecte
d ',' or '...' before '<' token
       void dbg_enumBreakpoints( std::function<void(const WCHAR* fileUrl, unsign
ed lineNo)> receiver ) {
                                              ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-debug.h: In member function 'v
oid sciter::script_debugger_client::dbg_enumBreakpoints(int)':
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-debug.h:263:52: error: 'receiv
er' was not declared in this scope
           SciterDebugEnumBreakpoints(hSciterHost, &receiver, _SCITER_DEBUG_BREA
KPOINT_CB);
                                                    ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-debug.h: In static member func
tion 'static BOOL sciter::script_debugger_client::_SCITER_DEBUG_BREAKPOINT_CB(LP
CWSTR, UINT, LPVOID)':
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-debug.h:291:9: error: 'breakpo
int_receiver_t' was not declared in this scope
         breakpoint_receiver_t* bpr = static_cast<breakpoint_receiver_t*>(param)
;
         ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-debug.h:291:32: error: 'bpr' w
as not declared in this scope
         breakpoint_receiver_t* bpr = static_cast<breakpoint_receiver_t*>(param)
;
                                ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-debug.h:291:50: error: expecte
d type-specifier before 'breakpoint_receiver_t'
         breakpoint_receiver_t* bpr = static_cast<breakpoint_receiver_t*>(param)
;
                                                  ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-debug.h:291:50: error: expecte
d '>' before 'breakpoint_receiver_t'
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-debug.h:291:50: error: expecte
d '(' before 'breakpoint_receiver_t'
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-debug.h:291:72: error: expecte
d primary-expression before '>' token
         breakpoint_receiver_t* bpr = static_cast<breakpoint_receiver_t*>(param)
;
                                                                        ^
C:\workspace\cpp_libs\sciter-sdk\include\sciter-x-debug.h:291:80: error: expecte
d ')' before ';' token
         breakpoint_receiver_t* bpr = static_cast<breakpoint_receiver_t*>(param)
;

^
minimal.cpp: In function 'int WinMain(HINSTANCE, HINSTANCE, LPSTR, int)':
minimal.cpp:20:10: error: cannot convert 'LPCWSTR {aka const wchar_t*}' to 'LPCS
TR {aka const char*}' for argument '2' to 'HWND__* CreateWindowExA(DWORD, LPCSTR
, LPCSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, LPVOID)'
   0,0,0,0);
          ^


Как правильно использовать Htmlayout / Sciter с MinGW?

Спасибо!
Re: Htmlayout / Sciter c MinGW
От: c-smile Канада http://terrainformatica.com
Дата: 07.10.14 23:00
Оценка:
Здравствуйте, littlesam, Вы писали:

L>Добрый день!


L>Кто может подсказать как использовать Htmlayout / Sciter для компиляции MinGW?


L>Именно MinGW нужен т.к. используются сторонние библиотеки откомпилированные именно им.


\workspace\cpp_libs\sciter-sdk\include\value.hpp:368:37: error: 'nullptr' was
not declared in this scope


А C++11 в том MinGW есть?
Re[2]: Htmlayout / Sciter c MinGW
От: littlesam  
Дата: 10.10.14 21:44
Оценка:
Перепроверил. MinGW-64 — полная поддержка WinApi и С++11 на уровне GCC 4.8

Зашел с другой стороны, кросс-компилияция используя MinGW-64 c убунты.
Тест проводился на демке minimal.cpp
#include <windows.h>
#include "sciter-x.h"

int CALLBACK WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
    HWND wnd = ::CreateWindowEx(
        0,
        ::SciterClassName(),
        L"Minimal Sciter Application",
        WS_OVERLAPPEDWINDOW,
        CW_USEDEFAULT, 0,
        800, 600,
        0,0,0,0);

    ::SciterLoadFile(wnd, L"minimal.htm");
    ::ShowWindow(wnd, SW_SHOWNORMAL);

    MSG msg;
  while( ::IsWindow(wnd) && GetMessage(&msg, 0, 0, 0) )
    {
        TranslateMessage(&msg);
        DispatchMessage(&msg);
    }
  return 0;
}


Компилятор выдает:
i686-w64-mingw32-g++ -m32 -mwindows   -c -O2 -w -s -I../../../Downloads/_old/sciter-sdk/include -std=c++11 -MMD -MP -MF "build/Release/i686-w64-mingw32-Linux-x86/minimal.o.d" -o build/Release/i686-w64-mingw32-Linux-x86/minimal.o minimal.cpp
In file included from ../../../Downloads/_old/sciter-sdk/include/value.hpp:26:0,
                 from ../../../Downloads/_old/sciter-sdk/include/value.h:293,
                 from ../../../Downloads/_old/sciter-sdk/include/sciter-x-def.h:24,
                 from ../../../Downloads/_old/sciter-sdk/include/sciter-x.h:5,
                 from minimal.cpp:5:
../../../Downloads/_old/sciter-sdk/include/aux-cvt.h: In constructor ‘aux::itot<CT>::itot(int, int)’:
../../../Downloads/_old/sciter-sdk/include/aux-cvt.h:685:7: error: ‘reverse’ is not a member of ‘std’
       std::reverse(buffer,wstr);
       ^
In file included from ../../../Downloads/_old/sciter-sdk/include/sciter-x.h:4:0,
                 from minimal.cpp:5:
../../../Downloads/_old/sciter-sdk/include/sciter-x-dom.h: At global scope:
../../../Downloads/_old/sciter-sdk/include/sciter-x-types.h:222:27: error: expected unqualified-id before string constant
   #define EXTERN_C extern "C"
                           ^
../../../Downloads/_old/sciter-sdk/include/sciter-x-dom.h:171:10: note: in expansion of macro ‘EXTERN_C’
 OBSOLETE EXTERN_C SCDOM_RESULT SCAPI SciterGetElementHtml(HELEMENT he, LPCBYTE* utf8bytes, BOOL outer);
          ^
../../../Downloads/_old/sciter-sdk/include/sciter-x-types.h:222:27: error: expected unqualified-id before string constant
   #define EXTERN_C extern "C"
                           ^
../../../Downloads/_old/sciter-sdk/include/sciter-x-dom.h:191:11: note: in expansion of macro ‘EXTERN_C’
  OBSOLETE EXTERN_C SCDOM_RESULT SCAPI SciterGetElementText(HELEMENT he, LPWSTR* utf16);
           ^
In file included from ../../../Downloads/_old/sciter-sdk/include/sciter-x.h:5:0,
                 from minimal.cpp:5:
../../../Downloads/_old/sciter-sdk/include/sciter-x-def.h:483:57: error: ‘ID2D1RenderTarget’ has not been declared
 EXTERN_C BOOL SCAPI SciterRenderD2D(HWINDOW hWndSciter, ID2D1RenderTarget* prt);
                                                         ^
../../../Downloads/_old/sciter-sdk/include/sciter-x-def.h:495:42: error: ‘ID2D1Factory’ was not declared in this scope
 EXTERN_C BOOL SCAPI     SciterD2DFactory(ID2D1Factory ** ppf);
                                          ^
../../../Downloads/_old/sciter-sdk/include/sciter-x-def.h:495:58: error: ‘ppf’ was not declared in this scope
 EXTERN_C BOOL SCAPI     SciterD2DFactory(ID2D1Factory ** ppf);
                                                          ^
../../../Downloads/_old/sciter-sdk/include/sciter-x-def.h:507:41: error: ‘IDWriteFactory’ was not declared in this scope
 EXTERN_C BOOL SCAPI     SciterDWFactory(IDWriteFactory ** ppf);
                                         ^
../../../Downloads/_old/sciter-sdk/include/sciter-x-def.h:507:59: error: ‘ppf’ was not declared in this scope
 EXTERN_C BOOL SCAPI     SciterDWFactory(IDWriteFactory ** ppf);
                                                           ^
In file included from ../../../Downloads/_old/sciter-sdk/include/sciter-x.h:8:0,
                 from minimal.cpp:5:
../../../Downloads/_old/sciter-sdk/include/sciter-x-api.h:57:55: error: ‘ID2D1RenderTarget’ has not been declared
   BOOL    SCFN( SciterRenderD2D )(HWINDOW hWndSciter, ID2D1RenderTarget* prt);
                                                       ^
../../../Downloads/_old/sciter-sdk/include/sciter-x-api.h:58:36: error: ‘ID2D1Factory’ has not been declared
   BOOL    SCFN( SciterD2DFactory )(ID2D1Factory ** ppf);
                                    ^
../../../Downloads/_old/sciter-sdk/include/sciter-x-api.h:59:35: error: ‘IDWriteFactory’ has not been declared
   BOOL    SCFN( SciterDWFactory )(IDWriteFactory ** ppf);
                                   ^
In file included from ../../../Downloads/_old/sciter-sdk/include/sciter-x.h:8:0,
                 from minimal.cpp:5:
../../../Downloads/_old/sciter-sdk/include/sciter-x-api.h:375:62: error: ‘ID2D1RenderTarget’ has not been declared
   inline  BOOL    SCAPI SciterRenderD2D (HWINDOW hWndSciter, ID2D1RenderTarget* prt) { return SAPI()->SciterRenderD2D (hWndSciter,prt); }
                                                              ^
../../../Downloads/_old/sciter-sdk/include/sciter-x-api.h:376:43: error: ‘SciterD2DFactory’ declared as an ‘inline’ variable
   inline  BOOL    SCAPI SciterD2DFactory (ID2D1Factory ** ppf) { return SAPI()->SciterD2DFactory (ppf); }
                                           ^
../../../Downloads/_old/sciter-sdk/include/sciter-x-api.h:376:43: error: redefinition of ‘BOOL SciterD2DFactory’
In file included from ../../../Downloads/_old/sciter-sdk/include/sciter-x.h:5:0,
                 from minimal.cpp:5:
../../../Downloads/_old/sciter-sdk/include/sciter-x-def.h:495:25: error: ‘BOOL SciterD2DFactory’ previously defined here
 EXTERN_C BOOL SCAPI     SciterD2DFactory(ID2D1Factory ** ppf);
                         ^
In file included from ../../../Downloads/_old/sciter-sdk/include/sciter-x.h:8:0,
                 from minimal.cpp:5:
../../../Downloads/_old/sciter-sdk/include/sciter-x-api.h:376:43: error: ‘ID2D1Factory’ was not declared in this scope
   inline  BOOL    SCAPI SciterD2DFactory (ID2D1Factory ** ppf) { return SAPI()->SciterD2DFactory (ppf); }
                                           ^
../../../Downloads/_old/sciter-sdk/include/sciter-x-api.h:376:59: error: ‘ppf’ was not declared in this scope
   inline  BOOL    SCAPI SciterD2DFactory (ID2D1Factory ** ppf) { return SAPI()->SciterD2DFactory (ppf); }
                                                           ^
../../../Downloads/_old/sciter-sdk/include/sciter-x-api.h:377:42: error: ‘SciterDWFactory’ declared as an ‘inline’ variable
   inline  BOOL    SCAPI SciterDWFactory (IDWriteFactory ** ppf) { return SAPI()->SciterDWFactory (ppf); }
                                          ^
../../../Downloads/_old/sciter-sdk/include/sciter-x-api.h:377:42: error: redefinition of ‘BOOL SciterDWFactory’
In file included from ../../../Downloads/_old/sciter-sdk/include/sciter-x.h:5:0,
                 from minimal.cpp:5:
../../../Downloads/_old/sciter-sdk/include/sciter-x-def.h:507:25: error: ‘BOOL SciterDWFactory’ previously defined here
 EXTERN_C BOOL SCAPI     SciterDWFactory(IDWriteFactory ** ppf);
                         ^
In file included from ../../../Downloads/_old/sciter-sdk/include/sciter-x.h:8:0,
                 from minimal.cpp:5:
../../../Downloads/_old/sciter-sdk/include/sciter-x-api.h:377:42: error: ‘IDWriteFactory’ was not declared in this scope
   inline  BOOL    SCAPI SciterDWFactory (IDWriteFactory ** ppf) { return SAPI()->SciterDWFactory (ppf); }
                                          ^
../../../Downloads/_old/sciter-sdk/include/sciter-x-api.h:377:60: error: ‘ppf’ was not declared in this scope
   inline  BOOL    SCAPI SciterDWFactory (IDWriteFactory ** ppf) { return SAPI()->SciterDWFactory (ppf); }
                                                            ^
In file included from ../../../Downloads/_old/sciter-sdk/include/sciter-x.h:14:0,
                 from minimal.cpp:5:
../../../Downloads/_old/sciter-sdk/include/sciter-x-host-callback.h: In function ‘bool sciter::load_resource_data(HINSTANCE, LPCWSTR, const BYTE*&, UINT&)’:
../../../Downloads/_old/sciter-sdk/include/sciter-x-host-callback.h:228:60: error: invalid conversion from ‘LPCWSTR {aka const wchar_t*}’ to ‘size_t {aka unsigned int}’ [-fpermissive]
     WCHAR achURL[MAX_PATH]; wcsncpy_s(achURL, uri, MAX_PATH);
                                                            ^
../../../Downloads/_old/sciter-sdk/include/sciter-x-host-callback.h:228:60: error: invalid conversion from ‘int’ to ‘const wchar_t*’ [-fpermissive]
../../../Downloads/_old/sciter-sdk/include/sciter-x-host-callback.h:228:60: error: too few arguments to function ‘errno_t wcsncpy_s(wchar_t*, size_t, const wchar_t*, size_t)’
In file included from /usr/share/mingw-w64/include/string.h:176:0,
                 from /usr/share/mingw-w64/include/guiddef.h:148,
                 from /usr/share/mingw-w64/include/winnt.h:602,
                 from /usr/share/mingw-w64/include/minwindef.h:146,
                 from /usr/share/mingw-w64/include/windef.h:8,
                 from /usr/share/mingw-w64/include/windows.h:69,
                 from minimal.cpp:4:
/usr/share/mingw-w64/include/sec_api/string_s.h:53:27: note: declared here
   _CRTIMP errno_t __cdecl wcsncpy_s(wchar_t *_Dst,size_t _DstSizeInChars,const wchar_t *_Src,size_t _MaxCount);
                           ^
minimal.cpp: In function ‘int WinMain(HINSTANCE, HINSTANCE, LPSTR, int)’:
minimal.cpp:19:10: error: cannot convert ‘LPCWSTR {aka const wchar_t*}’ to ‘LPCSTR {aka const char*}’ for argument ‘2’ to ‘HWND__* CreateWindowExA(DWORD, LPCSTR, LPCSTR, DWORD, int, int, int, int, HWND, HMENU, HINSTANCE, LPVOID)’
   0,0,0,0);
          ^
In file included from /usr/share/mingw-w64/include/excpt.h:9:0,
                 from /usr/share/mingw-w64/include/windows.h:65,
                 from minimal.cpp:4:
/usr/share/mingw-w64/include/sec_api/stdio_s.h: In instantiation of ‘int sprintf_s(char (&)[__size], const char*, ...) [with unsigned int __size = 512u]’:
../../../Downloads/_old/sciter-sdk/include/tiscript.hpp:363:86:   required from here
/usr/share/mingw-w64/include/sec_api/stdio_s.h:30:3: error: ‘vsprintf_s’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
   __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1_ARGLIST(int,sprintf_s,vsprintf_s,char,_DstBuf,const char*,_Format)
   ^
In file included from /usr/share/mingw-w64/include/excpt.h:9:0,
                 from /usr/share/mingw-w64/include/windows.h:65,
                 from minimal.cpp:4:
/usr/share/mingw-w64/include/sec_api/stdio_s.h:48:3: note: ‘template<unsigned int __size> int vsprintf_s(char (&)[__size], const char*, va_list)’ declared here, later in the translation unit
   __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_2(int, vsprintf_s, char, _DstBuf, const char*, _Format, va_list, _ArgList)
   ^
make[2]: *** [build/Release/i686-w64-mingw32-Linux-x86/minimal.o] Error 1
make[2]: Leaving directory `/home/alex/Workspace/netbeans/CppApplication_1'
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/home/alex/Workspace/netbeans/CppApplication_1'
make: *** [.build-impl] Error 2


На WinApi с помощью MinGW-64 писал пока только примитивные приложения, очень заинтересовали продукты TerraInformatica, от возможности использовать их с MinGW-64 зависит, собственно говоря, заниматься дальше C/C++ или уйти целиком обратно в .NET

Подскажите хотя бы в какую сторону копать чтоб разобраться с проблемой, C++11 MinGW-64 вроде как поддерижвает (https://ru.wikipedia.org/w/index.php?title=MinGW&amp;veaction=edit&amp;vesection=4). Линковать .lib файлы позволяет. В исходниках Sciter есть папочка bin.gtk что говорит о том что с GCC его уже скрещивали или пытались. MinGW-64 — это "порт" GCC 4.8, что подсказывает что с использованием Sciter/HTMLayout с MinGW-64 я упускаю что-то очевидное и истина находится где-то рядом...
Re[3]: Htmlayout / Sciter c MinGW
От: c-smile Канада http://terrainformatica.com
Дата: 11.10.14 03:27
Оценка:
Здравствуйте, littlesam, Вы писали:

L>На WinApi с помощью MinGW-64 писал пока только примитивные приложения, очень заинтересовали продукты TerraInformatica, от возможности использовать их с MinGW-64 зависит, собственно говоря, заниматься дальше C/C++ или уйти целиком обратно в .NET


L>Подскажите хотя бы в какую сторону копать чтоб разобраться с проблемой, C++11 MinGW-64 вроде как поддерижвает (https://ru.wikipedia.org/w/index.php?title=MinGW&amp;veaction=edit&amp;vesection=4). Линковать .lib файлы позволяет. В исходниках Sciter есть папочка bin.gtk что говорит о том что с GCC его уже скрещивали или пытались. MinGW-64 — это "порт" GCC 4.8, что подсказывает что с использованием Sciter/HTMLayout с MinGW-64 я упускаю что-то очевидное и истина находится где-то рядом...


GCC сейчас поддерживается только на Linux. Для GCC на Windows нужно причесывать headers. Сама DLL должна работать как есть и с GCC.
Сделаю, не обещаю что быстро правда. Или сам попроси кого-нибудь кто в теме.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.