Hi John,
I reproduced your problem and fixed it. The problem was the ADCore/ADApp/commonDriverMakefile was correctly setting this flag:
USR_LDFLAGS_WIN32 += /NODEFAULTLIB:LIBCMT.lib
but only for 32-bit debug builds on Windows, not for 64-bit builds.
The patch below fixes the problem. It only assumes that the architecture that you are building (e.g. windows-x64-debug) contains the string "debug" in it. So it will work with windows-x64-dynamic-debug or win32-x86-debug-static, etc. There may be a more robust way to check whether it is a debug build or not.
**************************************************
corvette:areaDetector/ADCore/ADApp>git diff
diff --git a/ADApp/commonDriverMakefile b/ADApp/commonDriverMakefile
index 41edaf0..27bee4c 100644
--- a/ADApp/commonDriverMakefile
+++ b/ADApp/commonDriverMakefile
@@ -36,8 +36,11 @@ else
endif
PROD_LIBS_WIN32 += tiff jpeg
endif
-ifeq (win32-x86-debug, $(findstring win32-x86-debug, $(T_A)))
+
+ifeq ($(OS_CLASS), WIN32)
+ ifeq (debug, $(findstring debug, $(T_A)))
USR_LDFLAGS_WIN32 += /NODEFAULTLIB:LIBCMT.lib
+ endif
endif
ifeq ($(STATIC_BUILD), NO)
diff --git a/ADApp/commonLibraryMakefile b/ADApp/commonLibraryMakefile
index 73dcadc..3a0154f 100644
--- a/ADApp/commonLibraryMakefile
+++ b/ADApp/commonLibraryMakefile
@@ -32,8 +32,10 @@ else
LIB_LIBS_WIN32 += tiff jpeg
endif
-ifeq (win32-x86-debug, $(findstring win32-x86-debug, $(T_A)))
+ifeq ($(OS_CLASS), WIN32)
+ ifeq (debug, $(findstring debug, $(T_A)))
USR_LDFLAGS_WIN32 += /NODEFAULTLIB:LIBCMT.lib
+ endif
endif
ifeq ($(STATIC_BUILD), NO)
**************************************************
Please let me know if this fixes the problem for you as well, and I will either make a new release or put a link to the patch in the release notes.
Mark
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of John Hammonds
Sent: Friday, October 17, 2014 3:34 PM
To: [email protected]
Subject: Trouble building debug version of areaDetector 2.x (from git)
I am trying to build a debug version of areaDetector 2. I have tried
this both building with EPICS_HOST_ARCH=windows-x64 and a cross compile
for windows-x64-debug and also directly building with
EPICS_HOST_ARCH=windows-x64-debug. The output for the make is in the
included file. I am use base 3.14.12.4 with synApps_5_7 (w/ asyn-4-23,
autosave-5-4 ). I am using visual studio 2013, Windows 7-64.
It looks like it is trying to include debug and non debug versions of
libcmt. Any idea what is wrong here?
Thanks,
John