Click here to Skip to main content
15,919,245 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalglobal and static object Pin
George_George7-Apr-08 23:40
George_George7-Apr-08 23:40 
GeneralRe: global and static object [modified] Pin
Matthew Faithfull8-Apr-08 0:23
Matthew Faithfull8-Apr-08 0:23 
GeneralRe: global and static object Pin
George_George8-Apr-08 4:21
George_George8-Apr-08 4:21 
GeneralRe: global and static object Pin
Matthew Faithfull8-Apr-08 4:39
Matthew Faithfull8-Apr-08 4:39 
GeneralRe: global and static object Pin
George_George8-Apr-08 22:10
George_George8-Apr-08 22:10 
GeneralRe: global and static object Pin
Matthew Faithfull9-Apr-08 3:07
Matthew Faithfull9-Apr-08 3:07 
GeneralRe: global and static object Pin
George_George9-Apr-08 3:43
George_George9-Apr-08 3:43 
GeneralRe: global and static object Pin
Matthew Faithfull9-Apr-08 3:59
Matthew Faithfull9-Apr-08 3:59 
I'm not sure exactly what you're asking. If you have an ATL DLL which doesn't link, even implicitly, to the CRT but contains statics and non const globals then 1 of 2 things must be true.

1 ATL must provide a static initialization mechanism independent of the CRT. (As far as I know this is not true)

or

2 Your statics won't get initialized.

I would guess that in fact if you add statics and non const globals to an ATL DLL then it does become implicitly dependent on the CRT, even if there's no explicit linkage.
You could experiment with the /nodefaultlib option of the linker and specify exactly which libs you will and won't link to to see what effect that has. You can code breakpoints directly into any static initialization code you think may be being called before your debugger normally get involved using DebugBreak(); or even __asm{ int 3 }; a useful if naughty trick Wink | ;)
Watch out for implicitly linked Dlls that get loaded dynamically but right at startup and for Libs your project 'inherits' out of thin air. The $NOINHERIT linker options can be invaluable.
Obviously I wouldn't recommend doing any of this with any project you can't afford to break as break it you most ccertainly will if you banish the CRT. Smile | :)

Nothing is exactly what it seems but everything with seems can be unpicked.

GeneralRe: global and static object Pin
George_George9-Apr-08 15:19
George_George9-Apr-08 15:19 
GeneralRe: global and static object Pin
Matthew Faithfull10-Apr-08 6:21
Matthew Faithfull10-Apr-08 6:21 
GeneralRe: global and static object Pin
George_George10-Apr-08 15:40
George_George10-Apr-08 15:40 
AnswerRe: global and static object Pin
Matthew Faithfull10-Apr-08 23:52
Matthew Faithfull10-Apr-08 23:52 
GeneralRe: global and static object Pin
George_George11-Apr-08 22:40
George_George11-Apr-08 22:40 
GeneralPassing Continous Values between dialogs Pin
Chandrasekharan P7-Apr-08 23:26
Chandrasekharan P7-Apr-08 23:26 
GeneralRe: Passing Continous Values between dialogs Pin
Iain Clarke, Warrior Programmer7-Apr-08 23:29
Iain Clarke, Warrior Programmer7-Apr-08 23:29 
GeneralRe: Passing Continous Values between dialogs Pin
Hamid_RT8-Apr-08 22:00
Hamid_RT8-Apr-08 22:00 
GeneralProblem of resizing control. Pin
Le@rner7-Apr-08 21:37
Le@rner7-Apr-08 21:37 
GeneralRe: Problem of resizing control. Pin
Iain Clarke, Warrior Programmer7-Apr-08 23:01
Iain Clarke, Warrior Programmer7-Apr-08 23:01 
GeneralRe: Problem of resizing control. Pin
Hamid_RT8-Apr-08 21:58
Hamid_RT8-Apr-08 21:58 
QuestionMFC Architecture....!!!!??? Pin
nisha000007-Apr-08 20:26
nisha000007-Apr-08 20:26 
AnswerRe: MFC Architecture....!!!!??? Pin
Cedric Moonen7-Apr-08 21:10
Cedric Moonen7-Apr-08 21:10 
AnswerRe: MFC Architecture....!!!!??? Pin
Abhijeet Pathak7-Apr-08 21:23
Abhijeet Pathak7-Apr-08 21:23 
AnswerRe: MFC Architecture....!!!!??? Pin
Sarath C8-Apr-08 0:13
Sarath C8-Apr-08 0:13 
AnswerRe: MFC Architecture....!!!!??? Pin
Mark Salsbery8-Apr-08 6:38
Mark Salsbery8-Apr-08 6:38 
AnswerRe: MFC Architecture....!!!!??? Pin
Hamid_RT8-Apr-08 21:57
Hamid_RT8-Apr-08 21:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.