Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > General Discussion
  New Posts New Posts RSS Feed - Build Problem (LINK ERROR) for CodeJock 12.0.0
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Build Problem (LINK ERROR) for CodeJock 12.0.0

 Post Reply Post Reply
Author
Message
cryptomail View Drop Down
Newbie
Newbie
Avatar

Joined: 11 May 2009
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote cryptomail Quote  Post ReplyReply Direct Link To This Post Topic: Build Problem (LINK ERROR) for CodeJock 12.0.0
    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!





Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
cryptomail View Drop Down
Newbie
Newbie
Avatar

Joined: 11 May 2009
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote cryptomail Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2009 at 10:07am
Originally posted by oleg 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!
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.