_beginthread build problems

S

shell6

I get a few errors building a prog with _beginthread. I have done the
proper compile options and included libcmt.lib in linking, but I still
get these errors:

libcimtd.lib(streamb.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBDH@Z)
libcimtd.lib(iostrini.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBDH@Z)
libcimtd.lib(ifstream.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBDH@Z)
libcimtd.lib(ofstream.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBDH@Z)
libcimtd.lib(filebuf1.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBDH@Z)
 
P

Phlip

I get a few errors building a prog with _beginthread.

Prep such a question with Google Groups before posting it. Google will tell
you the best newsgroup (and might risk answering the question before you
can even post!).

This newsgroup is only qualified to discuss the raw C++ language, not all
its platform-specific libraries.
 
D

Dario Senic

I get a few errors building a prog with _beginthread. I have done the
proper compile options and included libcmt.lib in linking, but I still
get these errors:

libcimtd.lib(streamb.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBDH@Z)
libcimtd.lib(iostrini.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBDH@Z)
libcimtd.lib(ifstream.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBDH@Z)
libcimtd.lib(ofstream.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBDH@Z)
libcimtd.lib(filebuf1.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBDH@Z)

I had the very same problem yesterday. Be sure that the function you're
passing to _beginthread is static. Also you have to link your program
with /MT option.
 
M

MaRKoV

I had the same problem , the solution is by adding #include <Afx.h> in
all header files.
it is responsible for management the ordrer of linking the different
librairies.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top