Print Page | Close Window

Automatic linking

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=651
Printed Date: 22 June 2025 at 12:41pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Automatic linking
Posted By: Frode
Subject: Automatic linking
Date Posted: 22 April 2004 at 4:28pm

Hello.

When compiling my projects (both Win32 Static Library projects and MFC Application projects) every file is automatically linked with the XTP Toolkit library when compiled. Is this necessary - the compilation time is extremely high when using the XTP Toolkit.

PS: I have to use the XTP Toolkit static library - and not the DLL! 

RedirNumRes.cpp
Automatically linking with XTP8700LibStaticd.lib
scriptopencreate.cpp
Automatically linking with XTP8700LibStaticd.lib
ScriptPackageDlg.cpp
Automatically linking with XTP8700LibStaticd.lib
ScriptPackageInfo.cpp
Automatically linking with XTP8700LibStaticd.lib

Best regards,
Frode Gorseth




Replies:
Posted By: Oleg
Date Posted: 23 April 2004 at 1:36pm
Hope you have "#include <XTToolkitPro.h>" in the stdafx.h?

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Frode
Date Posted: 24 April 2004 at 11:41am

Hello.

The following are included in StdAfx.h:
#define _XTP_STATICLINK
#pragma pack(push, 8)
#include <XTToolkitPro.h>
#pragma pack(pop)

Project Settings:
"Use MFC in a Static Library"

rc2 file:
#include <XTToolkitPro.rc>

BR,
Frode.



Posted By: Frode
Date Posted: 19 May 2004 at 6:52am

Is there any other ways to avoid each file to be automatically linked with the Codejock libary - what about using dynamic linking (linking to the Codejock DLL instead of the LIB)?

We are using 1 Byte struct member alignment in our project setting - while the Codejock libraries are using 8 Bytes struct member alignment. For this reason we are using "pragma" as seen above.



Posted By: vladsch
Date Posted: 19 May 2004 at 9:07pm

I also found the slow down of compilation a pain. Over 100 files and only a dozen or so needed XTP. I removed XTToolkitPro.h from the StdAfx.h and added it to all files that actually need it.

This sped up compilation for the project as a whole even though it slowed down the compilation files that use XTP.



-------------
Vladimir,


Posted By: Frode
Date Posted: 23 May 2004 at 2:14pm
I think using precomiled header file (stdafx.h) solves this problem.


Posted By: Sergio
Date Posted: 15 May 2009 at 5:08am
Hello,

We have currently the same problem.

All the files use "Create Precompiled Headers" and our StdAfx.h file uses '#pragma once'.

Please help.
Regards,



-------------
Sergio


Posted By: Sergio
Date Posted: 15 May 2009 at 6:00am
It seems to be linked with managed code (CLR).

-------------
Sergio


Posted By: Sergio
Date Posted: 15 May 2009 at 8:22am
Continued here :

   https://forum.codejock.com/forum_posts.asp?TID=6512

-------------
Sergio



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net