IF(BBTK_USE_WXWIDGETS AND WIN32)
ADD_EXECUTABLE(bbi WIN32 ${SOURCES})
- SET_TARGET_PROPERTIES(bbi PROPERTIES LINK_FLAGS /subsystem:console )
+ IF(MINGW)
+ SET_TARGET_PROPERTIES(bbi PROPERTIES LINK_FLAGS -mconsole )
+ ELSE(MINGW)
+ SET_TARGET_PROPERTIES(bbi PROPERTIES LINK_FLAGS /subsystem:console )
+ ENDIF(MINGW)
ELSE(BBTK_USE_WXWIDGETS AND WIN32)
ADD_EXECUTABLE(bbi MACOSX_BUNDLE ${SOURCES})
ENDIF(BBTK_USE_WXWIDGETS AND WIN32)
//Borrame
//FILE *ff; ff = fopen ("/tmp/wt.log","a+"); fprintf(ff,"EED main C\n"); fclose(ff);
- 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);
}
+
#else
//==========================================================================
// OTHER ( Linux... )
IF(BBTK_USE_WXWIDGETS)
SET(BBTK_LINK_LIBRARIES
${BBTK_LINK_LIBRARIES}
- ${WXWIDGETS_LIBRARIES}
+ ${WXWIDGETS_LIBRARIES}
)
ENDIF(BBTK_USE_WXWIDGETS)
#-----------------------------------------------------------------------------
ENDIF(UNIX)
#-----------------------------------------------------------------------------
+# mingw
+IF(MINGW)
+ SET(BBTK_LINK_LIBRARIES
+ ${BBTK_LINK_LIBRARIES}
+ dl)
+ENDIF(MINGW)
+
+
#-----------------------------------------------------------------------------
MESSAGE(STATUS "")
MESSAGE(STATUS "=======================================")
#if defined(_WIN32)
- // IF NOT DEF THEN INTERNAL COMPILER ERROR WITH BOOST 1.37 ON VISUAL C++
- #define BOOST_SP_NO_SP_CONVERTIBLE
+ #ifdef _MSC_VER
+ // IF NOT DEF THEN INTERNAL COMPILER ERROR WITH BOOST 1.37 ON VISUAL C++
+ #define BOOST_SP_NO_SP_CONVERTIBLE
+ #endif
#endif
#if defined(_WIN32)
#include "bbtkUtilities.h"
#include "bbtkMessageManager.h"
+//EED 2018-07-16
+#if defined(_WIN32)
+ #include <shlwapi.h>
+#endif
+
#if defined(MACOSX) // assume this is OSX
# include <sys/param.h>
# include <mach-o/dyld.h> // _NSGetExecutablePath : must add -framework CoreFoundation to link line
#endif /* LINUX */
#ifdef WIN32
- long result = GetModuleFileName(NULL, pname, pathsize);
+//2018-07-06 mingw64
+ wchar_t pname2[512];
+ mbstowcs(pname2,pname,strlen(pname)+1);
+ long result = GetModuleFileName(NULL, pname2, pathsize);
+// long result = GetModuleFileName(NULL, pname, pathsize);
if (result > 0)
{
/* fix up the dir slashes... */