Build Problem (LINK ERROR) for CodeJock 12.0.0
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: General Discussion
Forum Description: Topics Related to Visual C++ MFC Development in General
URL: http://forum.codejock.com/forum_posts.asp?TID=14270
Printed Date: 30 January 2025 at 6:35pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Build Problem (LINK ERROR) for CodeJock 12.0.0
Posted By: cryptomail
Subject: Build Problem (LINK ERROR) for CodeJock 12.0.0
Date Posted: 11 May 2009 at 6:39pm
Hi all. Thanks for having me. I recently acquired the CodeJock library and was having some problems initially building for a target: Static Lib but with DYNAMIC MFC DLL
Here are the steps that I went through to encouter the problem: 1) Launch the build wizard, and select things such that a) you build a static library of CodeJock b) you attempt to employ MFC as a DLL 2) Build the libraries 3) Note that they are in place in \Program Files\Codejock Software\MFC\Xtreme ToolkitPro v12.0.0\lib\vc80 (ToolkitPro1200vc80DSD.lib, ToolkitPro1200vc80DS.lib) 4) YAY! :) That's a good if not great sign!
Then during integration with my project, I added in stdafx.h #include <XTToolkitPro.h> // Codejock Software Components
However, during the build I noticed that the DEFAULT for my configuration was to employ the DLL version of CodeJock!!! That's not what I picked when I started the build wizard! :(
This is what I had to do:
Before #include <XTToolkitPro.h> // Codejock Software Components I added
#define _XTPLIB_NOAUTOLINK #define _XTP_STATICLINK so we have:
#define _XTPLIB_NOAUTOLINK #define _XTP_STATICLINK #include <XTToolkitPro.h> // Codejock Software Components
Then, in the project I did an explicit link with ToolkitPro1200vc80DSD.lib.
Then it compiled and linked just fine!!
I think it may prove beneficial to not force us (developers) to employ _XTPLIB_NOAUTOLINK and enforce EXPLICIT linking as the default behavior. I dunno, it's a library, as developers, we better damn well know what the heck we're linking to, and what versions of it, and what it all means, when we do link to things...so perhaps _XTPLIB_NOAUTOLINK should be on by default and the pragma for autolinking should be taken out, or something :)
That's just my opinion based on my 'Get CodeJock, and get up and go experience'. I hope I didn't do anything wrong, and my experience is not due to user error.
I tried searching the forums and kinda came up empty, so I'm sorry if this is a dupe, which it probably is.
I welcome any and all feedback, and I appreciate the library, it's neat and there are tons of goodies!!!! Thanks CodeJock!
|
Replies:
Posted By: Oleg
Date Posted: 12 May 2009 at 2:19am
Hi,
What problem with Autolinking ? You will get notification that library was linked + you don't need set it up for all Release/Debug/Unicode configurations you have. and it will be easy update to new version.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: cryptomail
Date Posted: 12 May 2009 at 10:07am
oleg wrote:
Hi,
What problem with Autolinking ? You will get notification that library was linked + you don't need set it up for all Release/Debug/Unicode configurations you have. and it will be easy update to new version. |
Hey Oleg, well my real problem (and experience) was originating with #define _XTP_STATICLINK not being defined automatically, after it was chosen via the wizard setup. In terms of a get up and go experience, I had to dig to find out that it needed to be defined, in order for things to work properly.
I understand there are benefits with respect to autolinking via a pragma, I just haven't used that technique too much because it's very subtle and implicit. However, I agree that if you know that autolinking is going on, and you know what target you're going after, it shouldn't be a problem. I think it was more of a stylistic comment more than anything.
Thanks for your hard work, and thanks for CodeJock. It Rocks!
|
|