Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug build error after Release build #1

Open
nolden opened this issue Sep 13, 2011 · 0 comments
Open

Debug build error after Release build #1

nolden opened this issue Sep 13, 2011 · 0 comments
Assignees

Comments

@nolden
Copy link
Member

nolden commented Sep 13, 2011

This was reported by a MITK user, see http://bugs.mitk.org/show_bug.cgi?id=9382

Steps to reproduce:

  1. Compile release superbuild
  2. Compile debug superbuild

You will get a lot of compiler errors like:
-> Error 4 error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value
'0' doesn't match value '2' in ctkCallback.obj
J:\MITK_MSVC2010_X64\MITK_GIT\5>2>Log4Qt.lib(logger.obj)

The problem is that visual studio tries to link a debug version of ctkcore with
a release version of log4qt.

In the cmake config ( J:/MITK_MSVC2010_X64/MITK_GIT/CTK-build/CTK-build ) one
can find the following entry:

LOG4Qt_LIBRARIES =
J:/MITK_MSVC2010_X64/MITK_GIT/CTK-build/Log4Qt-build/bin/Release/Log4Qt.lib

Note the "Release" directory in the pathname!

I think it is because of Log4QtConfig.camke.in. There, "FIND_LIBRARY" is used
as follows:

FIND_LIBRARY(Log4Qt_LIBRARIES Log4Qt
PATHS
"@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/"
"@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/Release"
"@CMAKE_RUNTIME_OUTPUT_DIRECTORY@/Debug"
NO_DEFAULT_PATH
)

I guess that after the library is found in .../Release the path is returned and
used. Thus, if a release version was already build, an error occours if one
tries to compile a debug version.

Workaround until a fix is available:
Manually change "LOG4Qt_LIBRARIES" in the cmake config and manually compile the
hierarchy upwards.

@ghost ghost assigned jcfr Sep 13, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants