Welcome! » Log In » Create A New Profile

error LNK2001: unresolved external symbol

Posted by gustavo 
i am using microsoft visual c++ 6.0, any ideas why i get this error?
how can i solve this?

Generating Code...
C:\Documents and Settings\Administrador\Mis documentos\CoolPlayer\source\2.14\Main\CPI_PlaylistWindow.c(645) : warning C4761: integral size mismatch in argument; conversion supplied
Compiling...
main.c
Linking...
CLV_ListView.obj : error LNK2001: unresolved external symbol _STR_AllocSetString
CPI_Stream_Internet.obj : error LNK2001: unresolved external symbol _STR_AllocSetString
CPI_Playlist.obj : error LNK2001: unresolved external symbol _STR_AllocSetString
CPI_PlaylistItem.obj : error LNK2001: unresolved external symbol _STR_AllocSetString
CPSK_Skin.obj : error LNK2001: unresolved external symbol _STR_AllocSetString
CPI_Player.obj : error LNK2001: unresolved external symbol _STR_AllocSetString
CPI_Player_CoDec_WinAmpPlugin.obj : error LNK2001: unresolved external symbol _STR_AllocSetString
CPI_Player_Engine.obj : error LNK2001: unresolved external symbol _STR_AllocSetString
CPI_Player_FileAssoc.obj : error LNK2001: unresolved external symbol _STR_AllocSetString
CPI_Player_Engine.obj : error LNK2001: unresolved external symbol _CPI_Player_Output_Initialise_File
CPI_PlaylistItem.obj : error LNK2001: unresolved external symbol _crc_lookup
CPI_Interface.obj : error LNK2001: unresolved external symbol _IP_Create_Indicator
CPI_PlaylistWindow.obj : error LNK2001: unresolved external symbol _CPIC_SetIndicatorValue
main.obj : error LNK2001: unresolved external symbol _CPIC_FreeIndicators
Debug/coolplayer.exe : fatal error LNK1120: 6 unresolved externals
Error executing link.exe.

coolplayer.exe - 15 error(s), 1 warning(s)
Re: error LNK2001: unresolved external symbol
hey:

i am a student in jordan university , i am studying computer engineering i face this error in "data structure" corse in this code:
#include<iostream>
using namespace std;

enum errorcode{success,dublicate};

//******************************************************
template <class t>
struct node
{
t data;
node<t> *left;
node<t> *right;
node()
{
left=right=0;
}
node(t data,node<t> *l=0,node<t> *r=0)
{
node::data=data;
left=l;
right=r;
}
};
//******************************************************

template <class t>
class tree
{
protected:
node<t> * root;
void rec_preorder(node<t> *r);
void rec_postorder(node<t> *r);
void rec_inorder(node<t> *r);
int rec_size(node<t> *r);
int rec_height(node<t> *r);
void rec_inorder(void (*visit)(t &el),node<t>* r);

public:
tree();
bool is_empty();
void preorder();
void inorder();
void postorder();
int size();
int height();
void function();
void inorder(void (*visit)(t &el));
//~tree();
//tree(tree<t>&o);
//void operator=(tree<t>&o);


};

//******************************************************

template <class t>
class bst:public tree<t>
{
private:
errorcode rec_add(t el,node<t>*& r);
bool rec_search(t el,node<t>* r);
public:
errorcode add(t el);
bool search(t el);
};

//******************************************************

template <class t>
tree<t>::tree()
{
root=0;
}

//******************************************************

template <class t>
bool tree<t>::is_empty()
{
return root;
}

//******************************************************

template <class t>
void tree<t>::preorder()
{
rec_preorder(root);
}

//******************************************************

template <class t>
void tree<t>::rec_preorder(node<t> *r)
{
if(r!=0)
{
cout<<r->data<<" ";
rec_preorder(r->left);
rec_preorder(r->right);
}
}

//******************************************************

template <class t>
void tree<t>::postorder()
{
rec_postorder(root);
}

//******************************************************
template <class t>
void tree<t>::rec_postorder(node<t> *r)
{
if(r!=0)
{
rec_postorder(r->left);
rec_postorder(r->right);
cout<<r->data<<" ";
}
}

//******************************************************

template <class t>
void tree<t>::inorder()
{
rec_inorder(root);
}

//******************************************************

template <class t>
void tree<t>::rec_inorder(node<t> *r)
{
if(r!=0)
{
rec_inorder(r->left);
cout<<r->data<<" ";
rec_inorder(r->right);
}
}

//******************************************************

template <class t>
int tree<t>::size()
{
return rec_size(root);
}

//******************************************************

template <class t>
int tree<t>::rec_size(node<t> *r)
{
if(r==0)
return -1;
return rec_size(r->left)+rec_size(r->right)+1;
}

//******************************************************

template <class t>
int tree<t>::height()
{
return rec_height(root);
}

//******************************************************

template <class t>
int rec_height(node<t> *r)
{
if(r==0)
return 0;
int h1=rec_height(r->left);
int h2=rec_height(r->right);
if(h1>h2)
return h1+1;
else
return h2+1;
};

//******************************************************

template <class t>
errorcode bst<t>::add(t el)
{
return rec_add(el,root);
}

//******************************************************

template <class t>
errorcode bst<t>::rec_add(t el,node<t>*& r)
{
if(r==0)
{
r=new node<t>(el);
return success;
}
else
if(r->data==el)
return dublicate;
else
if(el>r->data)
return rec_add(el,r->right);
else
if(el<r->data)
return rec_add(el,r->left);
return success;
}

//******************************************************

template <class t>
bool bst<t>::search(t el)
{
return rec_search(el,root);
}

//******************************************************

template <class t>
bool bst<t>::rec_search(t el,node<t> *r)
{
if(r!=0)
{
if(el==r->data)
return true;
else
if(el>r->data)
return rec_search(el,r->right);
else
return rec_search(el,r->right);
}
return false;
}

//******************************************************

template <class t>
void tree<t>::inorder(void (*visit)(t &el))
{
rec_inorder(visit,root);
}

//******************************************************

template <class t>
void rec_inorder(void (*visit)(t &el),node<t> *r)
{
rec_inorder(visit,r->left);
visit(r->data);
rec_inorder(visit,r->right);
}

//******************************************************
template <class t>
void add(t &el)
{
el++;
}








template <class t>
void tree<t>::function()
{
root=new node<int>(1);
root->left=new node<int>(2);
root->left->left=new node<int>(3);
root->left->right=new node<int>(4);
root->right=new node<int>(5);
root->right->right=new node<int>(6);
root->right->left=new node<int>(7);
}



void main()
{

tree <int> t0;
t0.function();
cout<<"preorder:\n";
t0.preorder();
cout<<"\ninorder:\n";
t0.inorder();
cout<<"\npostorder:\n";
t0.postorder();
cout<<'\n'<<t0.size()<<'\n';
cout<<t0.height()<<'\n';

bst<int> bst0;
bst0.add(4);
bst0.add(6);
bst0.add(2);
bst0.add(7);
bst0.add(1);
bst0.add(3);
bst0.add(5);
bst0.postorder();
cout<<'\n';
bst0.inorder();
cout<<'\n';
bst0.inorder(add);
cout<<'\n';
}






how can i solve this error?

--------------------Configuration: susuuTree - Win32 Debug--------------------
Linking...
susuuTree.obj : error LNK2001: unresolved external symbol "protected: void __thiscall tree<int>::rec_inorder(void (__cdecl*)(int &),struct node<int> *)" (?rec_inorder@?$tree@H@@IAEXP6AXAAH@ZPAU?$node@H@@@Z)
susuuTree.obj : error LNK2001: unresolved external symbol "protected: int __thiscall tree<int>::rec_height(struct node<int> *)" (?rec_height@?$tree@H@@IAEHPAU?$node@H@@@Z)
Debug/susuuTree.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

susuuTree.exe - 3 error(s), 0 warning(s)


Re: error LNK2001: unresolved external symbol

hope to recieve the reply.
thanks alot.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
 ********  **     **  **     **   ******   **     ** 
 **        ***   ***  **     **  **    **  ***   *** 
 **        **** ****  **     **  **        **** **** 
 ******    ** *** **  **     **  **        ** *** ** 
 **        **     **   **   **   **        **     ** 
 **        **     **    ** **    **    **  **     ** 
 ********  **     **     ***      ******   **     ** 
Message: