Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Automatic linking
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Automatic linking

 Post Reply Post Reply
Author
Message
Frode View Drop Down
Groupie
Groupie


Joined: 22 April 2004
Location: Norway
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Frode Quote  Post ReplyReply Direct Link To This Post Topic: Automatic linking
    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

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: 23 April 2004 at 1:36pm
Hope you have "#include <XTToolkitPro.h>" in the stdafx.h?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Frode View Drop Down
Groupie
Groupie


Joined: 22 April 2004
Location: Norway
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Frode Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Frode View Drop Down
Groupie
Groupie


Joined: 22 April 2004
Location: Norway
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Frode Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
vladsch View Drop Down
Newbie
Newbie


Joined: 04 February 2004
Location: Canada
Status: Offline
Points: 30
Post Options Post Options   Thanks (0) Thanks(0)   Quote vladsch Quote  Post ReplyReply Direct Link To This Post 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,
Back to Top
Frode View Drop Down
Groupie
Groupie


Joined: 22 April 2004
Location: Norway
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote Frode Quote  Post ReplyReply Direct Link To This Post Posted: 23 May 2004 at 2:14pm
I think using precomiled header file (stdafx.h) solves this problem.
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2009 at 6:00am
It seems to be linked with managed code (CLR).
Sergio
Back to Top
Sergio View Drop Down
Senior Member
Senior Member
Avatar

Joined: 18 September 2006
Status: Offline
Points: 216
Post Options Post Options   Thanks (0) Thanks(0)   Quote Sergio Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2009 at 8:22am
Continued here :

   https://forum.codejock.com/forum_posts.asp?TID=6512
Sergio
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.125 seconds.