IF(BBTK_USE_WXWIDGETS AND WIN32)
ADD_EXECUTABLE(bbStudio WIN32 ${SOURCES})
- SET_TARGET_PROPERTIES(bbStudio PROPERTIES LINK_FLAGS /subsystem:console )
+
+ IF(MINGW)
+ SET_TARGET_PROPERTIES(bbStudio PROPERTIES LINK_FLAGS -mconsole )
+ ELSE(MINGW)
+ SET_TARGET_PROPERTIES(bbStudio PROPERTIES LINK_FLAGS /subsystem:console )
+ ENDIF(MINGW)
+
+
ELSE(BBTK_USE_WXWIDGETS AND WIN32)
ADD_EXECUTABLE(bbStudio MACOSX_BUNDLE ${SOURCES} )
ENDIF(BBTK_USE_WXWIDGETS AND WIN32)
// you need to use the linker option "/subsystem:console" and the following code:
int main(int argc, char* argv[])
{
- return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL);
+ // EED 2018-07-16
+ char buffer[1500];
+ wcstombs(buffer , ::GetCommandLine() , 1500 );
+ return WinMain(::GetModuleHandle(NULL), NULL, buffer , SW_SHOWNORMAL);
+// return WinMain(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), SW_SHOWNORMAL);
}
#endif // defined(_WIN32)
SET(BBTK_BBFY "${BBTK_BIN_PATH}/bbfy")
SET(BBTK_BBPCONFIGURATOR "${BBTK_BIN_PATH}/bbpConfigurator")
SET(BBTK_BBDOC "${BBTK_BIN_PATH}/bbdoc")
-
ELSE(WIN32)
# SET (EXECUTABLE_OUTPUT_REL_PATH bin)
# SET (LIBRARY_OUTPUT_REL_PATH bin)
COMMAND echo ${BBFY_CXX_OUT}
COMMAND echo set "Path=${crea_DIR}/bin/\;"${DLL_PATH}
COMMAND echo ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q
- COMMAND echo ${BBFY_CXX_OUT}
+## COMMAND echo ${BBFY_CXX_OUT}
COMMAND set "Path=${crea_DIR}/bin/\;"${DLL_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q
## COMMAND set Path=${DLL_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q
DEPENDS ${xmlfile}
ELSE(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
SET(BBTK_BIN_PATH $(SolutionDir)/$(OutDir))
ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 6")
+ IF(MINGW)
+ message ( ${EXECUTABLE_OUTPUT_PATH} )
+ SET(BBTK_BIN_PATH ${EXECUTABLE_OUTPUT_PATH} )
+ ENDIF(MINGW)
ENDIF(MSVC10)
SET(BBTK_BBS2CPP ${BBTK_BIN_PATH}/bbs2cpp.exe)
SET(BBTK_BBC ${BBTK_BIN_PATH}/bbc.exe)
// display message
#if defined(WIN32) && !defined(UNDER_CE) && !defined(_XMLPARSER_NO_MESSAGEBOX_)
- MessageBoxA(NULL,message,"XML Parsing error",MB_OK|MB_ICONERROR|MB_TOPMOST);
+// MessageBoxA(NULL,message,"XML Parsing error",MB_OK|MB_ICONERROR|MB_TOPMOST);
+ printf("%s",message);
#else
printf("%s",message);
#endif
#ifdef _USE_XMLPARSER_DLL
#ifdef _DLL_EXPORTS_
- #define DLLENTRY __declspec(dllexport)
+ #define DLLENTRY __declspec(dllexport)
#else
- #define DLLENTRY __declspec(dllimport)
+ #define DLLENTRY __declspec(dllimport)
#endif /* _DLL_EXPORTS_ */
#else
#define DLLENTRY
// ==> I try a '#if'
//
#if defined(WIN32)
+ #ifndef _MSC_VER
+ #define XML_NO_WIDE_CHAR
+ #endif
#else
- #define XML_NO_WIDE_CHAR
+ #define XML_NO_WIDE_CHAR
#endif /* WIN32 */
#ifdef XML_NO_WIDE_CHAR
#ifdef _XMLWINDOWS
#include <tchar.h>
#else
-#define DLLENTRY
+
+
+ #if defined(WIN32)
+ #ifdef _MSC_VER
+ #define DLLENTRY
+ #endif
+ #else
+ #define DLLENTRY
+ #endif /* WIN32 */
+
+
+
#ifndef XML_NO_WIDE_CHAR
#include <wchar.h> // to have 'wcsrtombs' for ANSI version
// to have 'mbsrtowcs' for UNICODE version