473,396 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

_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 4280
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: cody | last post by:
We have a huge project, the solutuion spans 50 projects growing. Everytime I want to start the project I have to wait nearly over 1 minute for the compiler to complete building. This is...
10
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
2
by: Felix | last post by:
Out of no where I'm starting to get these problems and my Deployment projects won't build anymore. Does anyone have any idea what's causing this? I've tried copying these files from another...
9
by: liangbowen | last post by:
As i konw, the only way to to terminate a thread started by _beginthread() is to user _endthread() (or return) inside the thread. now i started a thread(TodoThread), and created a listenning...
6
by: dude | last post by:
I am trying to test out _beginthread() but I keep getting an error that: _beginthread : undeclared identifier I am using Visuall C++ with DotNET Studio and am on windows XP. Here is the...
2
by: Altman | last post by:
I have a class called cScale, I have made an array of scale objects and I need to run a method of these objects as a new thread. This is my line of code and I can't get it to run. I am still a...
5
by: JHoletzeck | last post by:
Is it possible to set the stack size for the thread created by BackgroundWorker like in the API call _beginthread? If not is the stack size a default or the one I set for the whole application?...
12
by: David Murmann | last post by:
hi all! i just built revision 41809 under winxp using a rather uncommon setup (at least i think so). since i have no visual studio here, i only used freely available tools: cygwin to get the...
1
by: akoolb | last post by:
_beginthread( function, 0, (void*)(int)num); That's what I'm using, what I need to know is how can I send more than one parameter with it, I've spent a while searching and can't find the answer. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.