473,799 Members | 3,270 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

_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(st reamb.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBD H@Z)
libcimtd.lib(io strini.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBD H@Z)
libcimtd.lib(if stream.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBD H@Z)
libcimtd.lib(of stream.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBD H@Z)
libcimtd.lib(fi lebuf1.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBD H@Z)

Feb 23 '06 #1
3 4309
sh****@gmail.co m 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.co m 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(st reamb.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBD H@Z)
libcimtd.lib(io strini.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBD H@Z)
libcimtd.lib(if stream.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBD H@Z)
libcimtd.lib(of stream.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBD H@Z)
libcimtd.lib(fi lebuf1.obj) : error LNK2001: unresolved external symbol
"void * __cdecl operator new(unsigned int,int,char const *,int)"
(??2@YAPAXIHPBD H@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
2362
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 unaccaptable. I thought about loading only the project I need into visual studio and not the whole solution. The problem is that the compiler tells me it cannot find the referenced dlls (project references) although they are all lying in their bin and obj...
10
2355
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 similar name to the table. Rather than making a long Select Case that could become obsolete if lookup tables are added and the source table of the ListBox is edited I came up with this code.) This code works but of course it gives me build...
2
5217
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 VS.NET 2003 machine, but it doesn't look like it's working. The only latest change I've made to my machine was the Windows Update as of Feb. 8th, 2005. I notcied it included the .NET 1.1 SP1 and I don't know if this might have any relation? ERROR...
9
13064
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 socket inside the thread. I want to destroy the socket and kill the thread at anytime if there is no client connect to it. How?
6
1899
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 full program: *******************************************************************
2
2903
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 little of a newbie to C++. Scales is an array of scale objects and weighup is my method. Scales.thread = _beginthread( Scales.WeighUp, 0, NULL);
5
2230
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? (What I need is a worker thread with a rather large stack in a Windows Forms app complied with /clr:pure) Cheers Jürgen
12
1726
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 source, the microsoft compiler/linker and NAnt (nant.sf.net) as the build tool to interpret the .vcproj-files (which may be the uncommon part). as far as i understand this setup is not supported in any way, but i noticed two problems, that could...
1
4346
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. I think it has something to do with argument lists from what I can find, but I'm really not sure what to do. As in declaring, setting values, passing, and reading them. Thanks for reading.
0
9688
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9544
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10490
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10259
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10238
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7570
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.