../segmentation
)
-IF(WIN32)
- SET(EXE_ICON vvIcon.rc)
-ENDIF(WIN32)
-
LINK_DIRECTORIES(${QT_LIBRARY_DIR})
#=========================================================
#Add each tool's dependencies
ADD_LIBRARY(vvLib ${vv_SRCS} ${vv_UI_CXX})
TARGET_LINK_LIBRARIES(vvLib ${vvExternalLibs})
-ADD_EXECUTABLE(vv vv.cxx ${EXE_ICON})
+IF(WIN32)
+ ADD_EXECUTABLE(vv WIN32 vv.cxx vvIcon.rc)
+ELSE(WIN32)
+ ADD_EXECUTABLE(vv vv.cxx)
+ENDIF(WIN32)
+
TARGET_LINK_LIBRARIES(vv vvLib)
#include <sys/types.h>
#include <sys/stat.h>
-#include <errno.h>
+#include <errno.h>
void load_image_first_error()
{
}
//------------------------------------------------------------------------------
+#ifdef _WIN32
+int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE prevInstance, LPSTR lpCmdLine, int nShowCmd)
+{
+ int argc = __argc;
+ char **argv = __argv;
+#else
int main( int argc, char** argv )
{
+#endif
+
CLITK_INIT;
QApplication app( argc, argv );
if(itksys::SystemTools::FileExists(log_dir.c_str()) &&
!itksys::SystemTools::FileIsDirectory(log_dir.c_str())) {
- itkGenericExceptionMacro(<< "Error creating log directory, file exists and is not a directory.");
+ std::cerr << "Error creating log directory, file exists and is not a directory." << std::endl;
+ exit(1);
} else if(!itksys::SystemTools::MakeDirectory(log_dir.c_str())) {
- itkGenericExceptionMacro(<< "Error creating log directory.");
+ std::cerr << "Error creating log directory." << std::endl;
+ exit(1);
}
std::string log_file = log_dir + "/" + create_timed_string() + ".log";