LNK2038 mismatch detected for 'RuntimeLibrary'

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

LNK2038 mismatch detected for 'RuntimeLibrary'

Andrew Leach
Hi,

I'm receiving these errors when I'm trying to compile my program against QuantLib-1.10 using Boost-1.64.0 prebuilt libraries (Win32):

Severity Code Description Project File Line Suppression State
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in Garch.obj MTF_Garch d:\Users\ypx7647\Documents\Visual Studio 2017\Projects\MTF_Garch\MTF_Garch\MTF_Garch.obj 1
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in Garch.obj MTF_Garch d:\Users\ypx7647\Documents\Visual Studio 2017\Projects\MTF_Garch\MTF_Garch\msvcprtd.lib(locale0_implib.obj) 1
Error LNK1104 cannot open file 'QuantLib-vc141-mt-gd.lib' MTF_Garch d:\Users\ypx7647\Documents\Visual Studio 2017\Projects\MTF_Garch\MTF_Garch\LINK 1

I tried recreating my solution going from VS2015 to VS2017 Community. I've installed the prebuilt libraries of boost and compiled QuantLib using the Win32 boost libraries with the Runtime Library set to Multi Threaded DLL (Release not Debug) for all sub projects in QuantLib. My solution and cpp files within are configured for Runtime Library set to Multi Threaded DLL (Release not Debug) as well.

However, I'm still getting this error and I don't understand why.

Any ideas how I can fix this please as everything to me and my limited experience appears good.

Thanks in advance.
-------
Internet communications are not secure and therefore Andrew Leach does not accept legal responsibility for the contents of this message.  The information contained in this email is private, personal and confidential and may be legally privileged.  It is intended solely for the addressee.  If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. This email and any attachments have been automatically scanned for viruses prior to dispatch, but we make no warranty that they are free from computer viruses.  You are advised to check all emails and attachments using your own anti virus software before opening or executing them.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LNK2038 mismatch detected for 'RuntimeLibrary'

Luigi Ballabio
The linker tries to look for QuantLib-vc141-mt-gd.lib, which is the debug version of the library.  How are you telling your solution to link QuantLib? Are you using <ql/auto_link.hpp> or did you add the library to the options?

Luigi


On Wed, Jul 26, 2017 at 3:08 PM Andrew Leach <[hidden email]> wrote:
Hi,

I'm receiving these errors when I'm trying to compile my program against QuantLib-1.10 using Boost-1.64.0 prebuilt libraries (Win32):

Severity Code Description Project File Line Suppression State
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in Garch.obj MTF_Garch d:\Users\ypx7647\Documents\Visual Studio 2017\Projects\MTF_Garch\MTF_Garch\MTF_Garch.obj 1
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in Garch.obj MTF_Garch d:\Users\ypx7647\Documents\Visual Studio 2017\Projects\MTF_Garch\MTF_Garch\msvcprtd.lib(locale0_implib.obj) 1
Error LNK1104 cannot open file 'QuantLib-vc141-mt-gd.lib' MTF_Garch d:\Users\ypx7647\Documents\Visual Studio 2017\Projects\MTF_Garch\MTF_Garch\LINK 1

I tried recreating my solution going from VS2015 to VS2017 Community. I've installed the prebuilt libraries of boost and compiled QuantLib using the Win32 boost libraries with the Runtime Library set to Multi Threaded DLL (Release not Debug) for all sub projects in QuantLib. My solution and cpp files within are configured for Runtime Library set to Multi Threaded DLL (Release not Debug) as well.

However, I'm still getting this error and I don't understand why.

Any ideas how I can fix this please as everything to me and my limited experience appears good.

Thanks in advance.
-------
Internet communications are not secure and therefore Andrew Leach does not accept legal responsibility for the contents of this message.  The information contained in this email is private, personal and confidential and may be legally privileged.  It is intended solely for the addressee.  If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. This email and any attachments have been automatically scanned for viruses prior to dispatch, but we make no warranty that they are free from computer viruses.  You are advised to check all emails and attachments using your own anti virus software before opening or executing them.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LNK2038 mismatch detected for 'RuntimeLibrary'

Andrew Leach
Thanks for you reply.

I've got both I think.

#include <ql/auto_link.hpp>

in Garch.h (which is the class that uses QuantLib) and in the Additional Libraries of the solution I've added the directory to the QuantLib lib directory.

In the lib directory I've only got one file:

D:\ypx7647\Documents\Projects\QuantLib-1.10\lib>dir
 Volume in drive D is DATA
 Volume Serial Number is 2AA9-CF57

 Directory of D:\ypx7647\Documents\Projects\QuantLib-1.10\lib

26/07/2017  12:23    <DIR>          .
26/07/2017  12:23    <DIR>          ..
26/07/2017  12:23       403,209,802 QuantLib-vc141-mt.lib
               1 File(s)    403,209,802 bytes
               2 Dir(s)  701,432,639,488 bytes free


And there's no QuantLib file in the solution directory either.

I don't see why it is trying the debug version.

I've just read the auto_link.hpp file and noticed the entry about /D_DLL. Looking at the compilation messages I'm getting this error:

warning C4651: '/D_DLL' specified for precompiled header but not for current compile

Could this be it?

How do I disable it?

Thanks again.

-------
Internet communications are not secure and therefore Andrew Leach does not accept legal responsibility for the contents of this message.  The information contained in this email is private, personal and confidential and may be legally privileged.  It is intended solely for the addressee.  If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. This email and any attachments have been automatically scanned for viruses prior to dispatch, but we make no warranty that they are free from computer viruses.  You are advised to check all emails and attachments using your own anti virus software before opening or executing them.

On 26 July 2017 at 16:17, Luigi Ballabio <[hidden email]> wrote:
The linker tries to look for QuantLib-vc141-mt-gd.lib, which is the debug version of the library.  How are you telling your solution to link QuantLib? Are you using <ql/auto_link.hpp> or did you add the library to the options?

Luigi


On Wed, Jul 26, 2017 at 3:08 PM Andrew Leach <[hidden email]> wrote:
Hi,

I'm receiving these errors when I'm trying to compile my program against QuantLib-1.10 using Boost-1.64.0 prebuilt libraries (Win32):

Severity Code Description Project File Line Suppression State
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in Garch.obj MTF_Garch d:\Users\ypx7647\Documents\Visual Studio 2017\Projects\MTF_Garch\MTF_Garch\MTF_Garch.obj 1
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in Garch.obj MTF_Garch d:\Users\ypx7647\Documents\Visual Studio 2017\Projects\MTF_Garch\MTF_Garch\msvcprtd.lib(locale0_implib.obj) 1
Error LNK1104 cannot open file 'QuantLib-vc141-mt-gd.lib' MTF_Garch d:\Users\ypx7647\Documents\Visual Studio 2017\Projects\MTF_Garch\MTF_Garch\LINK 1

I tried recreating my solution going from VS2015 to VS2017 Community. I've installed the prebuilt libraries of boost and compiled QuantLib using the Win32 boost libraries with the Runtime Library set to Multi Threaded DLL (Release not Debug) for all sub projects in QuantLib. My solution and cpp files within are configured for Runtime Library set to Multi Threaded DLL (Release not Debug) as well.

However, I'm still getting this error and I don't understand why.

Any ideas how I can fix this please as everything to me and my limited experience appears good.

Thanks in advance.
-------
Internet communications are not secure and therefore Andrew Leach does not accept legal responsibility for the contents of this message.  The information contained in this email is private, personal and confidential and may be legally privileged.  It is intended solely for the addressee.  If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. This email and any attachments have been automatically scanned for viruses prior to dispatch, but we make no warranty that they are free from computer viruses.  You are advised to check all emails and attachments using your own anti virus software before opening or executing them.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LNK2038 mismatch detected for 'RuntimeLibrary'

Luigi Ballabio
Yes, that might be it.  You might have precompiled headers that were compiled in debug mode.  If that's the case, you should probably regenerate them (or turn them off).  I'm not familiar with how to do it, but a search should turn out instructions.

Luigi


On Wed, Jul 26, 2017 at 4:36 PM Andrew Leach <[hidden email]> wrote:
Thanks for you reply.

I've got both I think.

#include <ql/auto_link.hpp>

in Garch.h (which is the class that uses QuantLib) and in the Additional Libraries of the solution I've added the directory to the QuantLib lib directory.

In the lib directory I've only got one file:

D:\ypx7647\Documents\Projects\QuantLib-1.10\lib>dir
 Volume in drive D is DATA
 Volume Serial Number is 2AA9-CF57

 Directory of D:\ypx7647\Documents\Projects\QuantLib-1.10\lib

26/07/2017  12:23    <DIR>          .
26/07/2017  12:23    <DIR>          ..
26/07/2017  12:23       403,209,802 QuantLib-vc141-mt.lib
               1 File(s)    403,209,802 bytes
               2 Dir(s)  701,432,639,488 bytes free


And there's no QuantLib file in the solution directory either.

I don't see why it is trying the debug version.

I've just read the auto_link.hpp file and noticed the entry about /D_DLL. Looking at the compilation messages I'm getting this error:

warning C4651: '/D_DLL' specified for precompiled header but not for current compile

Could this be it?

How do I disable it?

Thanks again.

-------
Internet communications are not secure and therefore Andrew Leach does not accept legal responsibility for the contents of this message.  The information contained in this email is private, personal and confidential and may be legally privileged.  It is intended solely for the addressee.  If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. This email and any attachments have been automatically scanned for viruses prior to dispatch, but we make no warranty that they are free from computer viruses.  You are advised to check all emails and attachments using your own anti virus software before opening or executing them.

On 26 July 2017 at 16:17, Luigi Ballabio <[hidden email]> wrote:
The linker tries to look for QuantLib-vc141-mt-gd.lib, which is the debug version of the library.  How are you telling your solution to link QuantLib? Are you using <ql/auto_link.hpp> or did you add the library to the options?

Luigi


On Wed, Jul 26, 2017 at 3:08 PM Andrew Leach <[hidden email]> wrote:
Hi,

I'm receiving these errors when I'm trying to compile my program against QuantLib-1.10 using Boost-1.64.0 prebuilt libraries (Win32):

Severity Code Description Project File Line Suppression State
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in Garch.obj MTF_Garch d:\Users\ypx7647\Documents\Visual Studio 2017\Projects\MTF_Garch\MTF_Garch\MTF_Garch.obj 1
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in Garch.obj MTF_Garch d:\Users\ypx7647\Documents\Visual Studio 2017\Projects\MTF_Garch\MTF_Garch\msvcprtd.lib(locale0_implib.obj) 1
Error LNK1104 cannot open file 'QuantLib-vc141-mt-gd.lib' MTF_Garch d:\Users\ypx7647\Documents\Visual Studio 2017\Projects\MTF_Garch\MTF_Garch\LINK 1

I tried recreating my solution going from VS2015 to VS2017 Community. I've installed the prebuilt libraries of boost and compiled QuantLib using the Win32 boost libraries with the Runtime Library set to Multi Threaded DLL (Release not Debug) for all sub projects in QuantLib. My solution and cpp files within are configured for Runtime Library set to Multi Threaded DLL (Release not Debug) as well.

However, I'm still getting this error and I don't understand why.

Any ideas how I can fix this please as everything to me and my limited experience appears good.

Thanks in advance.
-------
Internet communications are not secure and therefore Andrew Leach does not accept legal responsibility for the contents of this message.  The information contained in this email is private, personal and confidential and may be legally privileged.  It is intended solely for the addressee.  If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. This email and any attachments have been automatically scanned for viruses prior to dispatch, but we make no warranty that they are free from computer viruses.  You are advised to check all emails and attachments using your own anti virus software before opening or executing them.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LNK2038 mismatch detected for 'RuntimeLibrary'

Andrew Leach
Thanks.

It seems that you were right. I've recompiled the headers and I have other errors now but none relating to QuantLib so won't bother you further.

Thanks for you for your positive help.

Andrew

-------
Internet communications are not secure and therefore Andrew Leach does not accept legal responsibility for the contents of this message.  The information contained in this email is private, personal and confidential and may be legally privileged.  It is intended solely for the addressee.  If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. This email and any attachments have been automatically scanned for viruses prior to dispatch, but we make no warranty that they are free from computer viruses.  You are advised to check all emails and attachments using your own anti virus software before opening or executing them.

On 26 July 2017 at 16:47, Luigi Ballabio <[hidden email]> wrote:
Yes, that might be it.  You might have precompiled headers that were compiled in debug mode.  If that's the case, you should probably regenerate them (or turn them off).  I'm not familiar with how to do it, but a search should turn out instructions.

Luigi


On Wed, Jul 26, 2017 at 4:36 PM Andrew Leach <[hidden email]> wrote:
Thanks for you reply.

I've got both I think.

#include <ql/auto_link.hpp>

in Garch.h (which is the class that uses QuantLib) and in the Additional Libraries of the solution I've added the directory to the QuantLib lib directory.

In the lib directory I've only got one file:

D:\ypx7647\Documents\Projects\QuantLib-1.10\lib>dir
 Volume in drive D is DATA
 Volume Serial Number is 2AA9-CF57

 Directory of D:\ypx7647\Documents\Projects\QuantLib-1.10\lib

26/07/2017  12:23    <DIR>          .
26/07/2017  12:23    <DIR>          ..
26/07/2017  12:23       403,209,802 QuantLib-vc141-mt.lib
               1 File(s)    403,209,802 bytes
               2 Dir(s)  701,432,639,488 bytes free


And there's no QuantLib file in the solution directory either.

I don't see why it is trying the debug version.

I've just read the auto_link.hpp file and noticed the entry about /D_DLL. Looking at the compilation messages I'm getting this error:

warning C4651: '/D_DLL' specified for precompiled header but not for current compile

Could this be it?

How do I disable it?

Thanks again.

-------
Internet communications are not secure and therefore Andrew Leach does not accept legal responsibility for the contents of this message.  The information contained in this email is private, personal and confidential and may be legally privileged.  It is intended solely for the addressee.  If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. This email and any attachments have been automatically scanned for viruses prior to dispatch, but we make no warranty that they are free from computer viruses.  You are advised to check all emails and attachments using your own anti virus software before opening or executing them.

On 26 July 2017 at 16:17, Luigi Ballabio <[hidden email]> wrote:
The linker tries to look for QuantLib-vc141-mt-gd.lib, which is the debug version of the library.  How are you telling your solution to link QuantLib? Are you using <ql/auto_link.hpp> or did you add the library to the options?

Luigi


On Wed, Jul 26, 2017 at 3:08 PM Andrew Leach <[hidden email]> wrote:
Hi,

I'm receiving these errors when I'm trying to compile my program against QuantLib-1.10 using Boost-1.64.0 prebuilt libraries (Win32):

Severity Code Description Project File Line Suppression State
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in Garch.obj MTF_Garch d:\Users\ypx7647\Documents\Visual Studio 2017\Projects\MTF_Garch\MTF_Garch\MTF_Garch.obj 1
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MD_DynamicRelease' in Garch.obj MTF_Garch d:\Users\ypx7647\Documents\Visual Studio 2017\Projects\MTF_Garch\MTF_Garch\msvcprtd.lib(locale0_implib.obj) 1
Error LNK1104 cannot open file 'QuantLib-vc141-mt-gd.lib' MTF_Garch d:\Users\ypx7647\Documents\Visual Studio 2017\Projects\MTF_Garch\MTF_Garch\LINK 1

I tried recreating my solution going from VS2015 to VS2017 Community. I've installed the prebuilt libraries of boost and compiled QuantLib using the Win32 boost libraries with the Runtime Library set to Multi Threaded DLL (Release not Debug) for all sub projects in QuantLib. My solution and cpp files within are configured for Runtime Library set to Multi Threaded DLL (Release not Debug) as well.

However, I'm still getting this error and I don't understand why.

Any ideas how I can fix this please as everything to me and my limited experience appears good.

Thanks in advance.
-------
Internet communications are not secure and therefore Andrew Leach does not accept legal responsibility for the contents of this message.  The information contained in this email is private, personal and confidential and may be legally privileged.  It is intended solely for the addressee.  If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. This email and any attachments have been automatically scanned for viruses prior to dispatch, but we make no warranty that they are free from computer viruses.  You are advised to check all emails and attachments using your own anti virus software before opening or executing them.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Loading...