Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error LNK2001: unresolved external symbol 2

Status
Not open for further replies.

cadbilbao

Programmer
Apr 9, 2001
233
ES
Good morning,

Any experience with these errors?

libcimtd.lib(iostrini.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int,int,char const *,int)" (??2@YAPAXIHPBDH@Z)
libcimtd.lib(cerrinit.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int,int,char const *,int)" (??2@YAPAXIHPBDH@Z)
libcimtd.lib(streamb.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int,int,char const *,int)" (??2@YAPAXIHPBDH@Z)
Debug/xxx.dll : fatal error LNK1120: 1 unresolved externals

(I'm attempting to build a DLL)

Thank you very much.
 
In a 'Debug' build the 'new' operator should #defined to an overloaded version of 'new'. (See 'afx.h')

At the top of each '.cpp' file there should be the following lines :-

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

1. Check these lines exist.
2. Can you build a 'Release' version OK ?
3. Have you been trying to overload the 'new' operator? (we tried, but gave up eventually)
Spencer Window (not a joke name)
 
also you can try to #include"stdafx.h" in the first line, instead of so many defines. But there are link errors, not compiller errors. This one can be also an error of using Borlands products on VC++, but not always. John Fill
1c.bmp


ivfmd@mail.md
 
One question:

+ Where is the right 'stdafx.h' file?

Firstly, there is no one in the 'include' folder and, if you search over your PC, there are different files.

I copied one of them into my 'include' folder, but I get compillation errors.

 
Is good all the projects to be based in an #include"stdafx.h". If you don't use MFC or wizard generated programs, make an empty stdafx.h and include it. It is a good way of compatibility. John Fill
1c.bmp


ivfmd@mail.md
 
I have a question in TAPI, I saw your name from the search I have done in Yahoo for TAPI. Please save my job with resolving the following.

My question is

1. When I try to create a modem to modem connection in VC++ using Tapi functions like lineInitialize, lineGetDevCaps, lineAnswer(), etc, it's giving me an error as follows

Linking...
error LNK2001: unresolved external symbol _lineGetDevCaps@20
error LNK2001: unresolved external symbol _lineInitialize@20
error LNK2001: unresolved external symbol _lineShutdown@4
error LNK2001: unresolved external symbol _lineAnswer@12
error LNK2001: unresolved external symbol _lineDeallocateCall@4
error LNK2001: unresolved external symbol _lineConfigDialog@12
error LNK2001: unresolved external symbol _lineTranslateDialog@20
error LNK2001: unresolved external symbol _lineMakeCall@20
error LNK2001: unresolved external symbol _lineTranslateAddress@28
error LNK2001: unresolved external symbol _lineDrop@12
error LNK2001: unresolved external symbol _lineOpen@36
error LNK2001: unresolved external symbol _lineClose@4
error LNK2001: unresolved external symbol _lineGetID@24

I have included the tapi.h and all required headers. I found the declaration of all these functions in tapi.h, but couldn't find the implementation for these functions. I think it's a problem in linking.

Can you please help me in getting this link error clear.

Please reply at the earliest.
 
yous hould use tapi.lib also. Add it to project->settings->link->Aditional obj/lib files John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top