470,848 Members | 1,321 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,848 developers. It's quick & easy.

_beginthread build problems

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)

Feb 23 '06 #1
3 4115
sh****@gmail.com wrote:
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.

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!
Feb 23 '06 #2
sh****@gmail.com wrote:
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.
Feb 24 '06 #3

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.

Mar 1 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by cody | last post: by
10 posts views Thread by Douglas Buchanan | last post: by
2 posts views Thread by Felix | last post: by
6 posts views Thread by dude | last post: by
2 posts views Thread by Altman | last post: by
5 posts views Thread by JHoletzeck | last post: by
12 posts views Thread by David Murmann | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.