Hi, I am linking my code with VC7 and I have the following message:
error LNK2019: unresolved external symbol _atexit referenced in function _$E1
It happen when I have created a static instance and my class have a destructor.
If I create a instance of my class dinamically, this message don’t appear, but I get a blue screen when I will use my class (it appear NULL).
Somebody can help me ?
Thanks in advance,
Heldai
xxxxx@scuasecurity.com.br
Are you using C++ for a kernel mode driver? Did you define your own new/destroy functions tobe sure you are using the proper memory calls?
For one thing … there is no AtExit function available in th e kernel for a driver, so methinks thou art not using the proper libraries for C++ in the kernel … such as DriverWorks or the other support libraries that provide C++ support.
–
Gary G. Little
Have Computer, Will Travel …
909-698-3191
909-551-2105
“Heldai” wrote in message news:xxxxx@ntdev…
Hi, I am linking my code with VC7 and I have the following message:
error LNK2019: unresolved external symbol _atexit referenced in function _$E1
It happen when I have created a static instance and my class have a destructor.
If I create a instance of my class dinamically, this message don’t appear, but I get a blue screen when I will use my class (it appear NULL).
Somebody can help me ?
Thanks in advance,
Heldai
xxxxx@scuasecurity.com.br
Heldai,
There is still no Microsoft supplied C++ runtime support in the kernel.
Your static class requires this support, thus the undefined call to
atexit. Your static constructor is also not being called, by the way, so
your class may not be initialized correctly.
You can download my freeware kernel c++ runtime package from my website,
and there are equivalent packages available elsewhere.
Before the c++ luddites jump in here, c structs also have a constructor
and at least theoretically a destructor, it is just that the compiler
does not provide a programmable hook for controlling the behavior of c
struct ctor/dtor methods. If you prefer to have less control over your
data structure initialization/cleanup operations then by all means,
please continue to use the obsolete c dialect of the c++ compiler 
===========================
Mark Roddy
Consultant, Microsoft DDK MVP
Hollis Technology Solutions
xxxxx@hollistech.com
www.hollistech.com
603-321-1032
-----Original Message-----
From: “Heldai”
To: “NT Developers Interest List”
Date: Fri, 25 Oct 2002 12:48:33 -0300
Subject: [ntdev] VC7 device driver compile
> Hi, I am linking my code with VC7 and I have the following message:
>
> error LNK2019: unresolved external symbol _atexit referenced in
> function _$E1
>
> It happen when I have created a static instance and my class have a
> destructor.
>
> If I create a instance of my class dinamically, this message don’t
> appear, but I get a blue screen when I will use my class (it appear
> NULL).
>
> Somebody can help me ?
>
>
>
> Thanks in advance,
>
>
>
> Heldai
>
> xxxxx@scuasecurity.com.br
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@hollistech.com
> To unsubscribe send a blank email to %%email.unsub%%
>
Thanks Mark and Gary,
I will do more tests here, but I will now use my class dinamically allocated
becase I need finish my project.
Thanks in advance,
Heldai
----- Original Message -----
From: “Mark Roddy”
To: “NT Developers Interest List”
Sent: Monday, October 28, 2002 10:27 AM
Subject: [ntdev] Re: VC7 device driver compile
> Heldai,
>
> There is still no Microsoft supplied C++ runtime support in the kernel.
> Your static class requires this support, thus the undefined call to
> atexit. Your static constructor is also not being called, by the way, so
> your class may not be initialized correctly.
>
> You can download my freeware kernel c++ runtime package from my website,
> and there are equivalent packages available elsewhere.
>
> Before the c++ luddites jump in here, c structs also have a constructor
> and at least theoretically a destructor, it is just that the compiler
> does not provide a programmable hook for controlling the behavior of c
> struct ctor/dtor methods. If you prefer to have less control over your
> data structure initialization/cleanup operations then by all means,
> please continue to use the obsolete c dialect of the c++ compiler 
>
>
> ===========================
> Mark Roddy
> Consultant, Microsoft DDK MVP
> Hollis Technology Solutions
> xxxxx@hollistech.com
> www.hollistech.com
> 603-321-1032
>
>
> -----Original Message-----
> From: “Heldai”
> To: “NT Developers Interest List”
> Date: Fri, 25 Oct 2002 12:48:33 -0300
> Subject: [ntdev] VC7 device driver compile
>
> > Hi, I am linking my code with VC7 and I have the following message:
> >
> > error LNK2019: unresolved external symbol _atexit referenced in
> > function _$E1
> >
> > It happen when I have created a static instance and my class have a
> > destructor.
> >
> > If I create a instance of my class dinamically, this message don’t
> > appear, but I get a blue screen when I will use my class (it appear
> > NULL).
> >
> > Somebody can help me ?
> >
> >
> >
> > Thanks in advance,
> >
> >
> >
> > Heldai
> >
> > xxxxx@scuasecurity.com.br
> >
> >
> >
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@hollistech.com
> > To unsubscribe send a blank email to %%email.unsub%%
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@scuasecurity.com.br
> To unsubscribe send a blank email to %%email.unsub%%