Jump to content
Sign in to follow this  
Romeo

Error Link ? C++

Recommended Posts

A'kum & salam sejahtera,

Aku nak tanya sikit, kenapa bila aku compile, x der error tapi bila execute, ada error link macam kat bawah ni? sad.gif Pening dah kepala aku dah ni..sesapa yang boleh tolong tu mintak tolong sikit... TQ

--------------------Configuration: example5 - Win32 Debug--------------------

Linking...

example5.obj : error LNK2001: unresolved external symbol "public: void __thiscall GLUI::hide(void)" (?hide@GLUI@@QAEXXZ)

example5.obj : error LNK2001: unresolved external symbol "public: void __thiscall GLUI::show(void)" (?show@GLUI@@QAEXXZ)

example5.obj : error LNK2001: unresolved external symbol "public: void __thiscall GLUI::disable(void)" (?disable@GLUI@@QAEXXZ)

example5.obj : error LNK2001: unresolved external symbol "public: void __thiscall GLUI_Master_Object::get_viewport_area(int *,int *,int *,int *)" (?get_viewport_area@GLUI_Master_Object@@QAEXPAH000@Z)

example5.obj : error LNK2001: unresolved external symbol "class GLUI_Master_Object GLUI_Master" (?GLUI_Master@@3VGLUI_Master_Object@@A)

example5.obj : error LNK2001: unresolved external symbol "public: void __thiscall GLUI_Master_Object::set_glutIdleFunc(void (__cdecl*)(void))" (?set_glutIdleFunc@GLUI_Master_Object@@QAEXP6AXXZ@Z)

example5.obj : error LNK2001: unresolved external symbol "public: class GLUI_Translation * __thiscall GLUI::add_translation(char *,int,float *,int,void (__cdecl*)(int))" (?add_translation@GLUI@@QAEPAVGLUI_Translation@@PADHPAMHP6AXH@Z@Z)

example5.obj : error LNK2001: unresolved external symbol "public: void __thiscall GLUI::add_column(int)" (?add_column@GLUI@@QAEXH@Z)

example5.obj : error LNK2001: unresolved external symbol "public: void __thiscall GLUI_Rotation::set_spin(float)" (?set_spin@GLUI_Rotation@@QAEXM@Z)

example5.obj : error LNK2001: unresolved external symbol "public: class GLUI_Rotation * __thiscall GLUI::add_rotation(char *,float *,int,void (__cdecl*)(int))" (?add_rotation@GLUI@@QAEPAVGLUI_Rotation@@PADPAMHP6AXH@Z@Z)

example5.obj : error LNK2001: unresolved external symbol "public: void __thiscall GLUI::set_main_gfx_window(int)" (?set_main_gfx_window@GLUI@@QAEXH@Z)

example5.obj : error LNK2001: unresolved external symbol "public: class GLUI_Button * __thiscall GLUI::add_button(char *,int,void (__cdecl*)(int))" (?add_button@GLUI@@QAEPAVGLUI_Button@@PADHP6AXH@Z@Z)

example5.obj : error LNK2001: unresolved external symbol "public: int __thiscall GLUI_Listbox::add_item(int,char *)" (?add_item@GLUI_Listbox@@QAEHHPAD@Z)

example5.obj : error LNK2001: unresolved external symbol "public: class GLUI_Listbox * __thiscall GLUI::add_listbox(char *,int *,int,void (__cdecl*)(int))" (?add_listbox@GLUI@@QAEPAVGLUI_Listbox@@PADPAHHP6AXH@Z@Z)

example5.obj : error LNK2001: unresolved external symbol "public: class GLUI_StaticText * __thiscall GLUI::add_statictext(char *)" (?add_statictext@GLUI@@QAEPAVGLUI_StaticText@@PAD@Z)

example5.obj : error LNK2001: unresolved external symbol "public: class GLUI_Panel * __thiscall GLUI::add_panel_to_panel(class GLUI_Panel *,char *,int)" (?add_panel_to_panel@GLUI@@QAEPAVGLUI_Panel@@PAV2@PADH@Z)

example5.obj : error LNK2001: unresolved external symbol "public: void __thiscall GLUI_Spinner::set_float_limits(float,float,int)" (?set_float_limits@GLUI_Spinner@@QAEXMMH@Z)

example5.obj : error LNK2001: unresolved external symbol "public: void __thiscall GLUI_Control::set_alignment(int)" (?set_alignment@GLUI_Control@@QAEXH@Z)

example5.obj : error LNK2001: unresolved external symbol "public: void __thiscall GLUI_Spinner::set_int_limits(int,int,int)" (?set_int_limits@GLUI_Spinner@@QAEXHHH@Z)

example5.obj : error LNK2001: unresolved external symbol "public: class GLUI_Spinner * __thiscall GLUI::add_spinner_to_panel(class GLUI_Panel *,char *,int,void *,int,void (__cdecl*)(int))" (?add_spinner_to_panel@GLUI@@QAEPAVGLUI_Spinner@@PAVGLUI_Pan

el@@PADHPAXHP6AXH@Z@Z)

example5.obj : error LNK2001: unresolved external symbol "public: class GLUI_Checkbox * __thiscall GLUI::add_checkbox_to_panel(class GLUI_Panel *,char *,int *,int,void (__cdecl*)(int))" (?add_checkbox_to_panel@GLUI@@QAEPAVGLUI_Checkbox@@PAVGLUI_Pane

l@@PADPAHHP6AXH@Z@Z)

example5.obj : error LNK2001: unresolved external symbol "public: class GLUI_Rollout * __thiscall GLUI::add_rollout(char *,int)" (?add_rollout@GLUI@@QAEPAVGLUI_Rollout@@PADH@Z)

example5.obj : error LNK2001: unresolved external symbol "public: class GLUI * __thiscall GLUI_Master_Object::create_glui_subwindow(int,long)" (?create_glui_subwindow@GLUI_Master_Object@@QAEPAVGLUI@@HJ@Z)

example5.obj : error LNK2001: unresolved external symbol "public: void __thiscall GLUI_Master_Object::set_glutMouseFunc(void (__cdecl*)(int,int,int,int))" (?set_glutMouseFunc@GLUI_Master_Object@@QAEXP6AXHHHH@Z@Z)

example5.obj : error LNK2001: unresolved external symbol "public: void __thiscall GLUI_Master_Object::set_glutSpecialFunc(void (__cdecl*)(int,int,int))" (?set_glutSpecialFunc@GLUI_Master_Object@@QAEXP6AXHHH@Z@Z)

example5.obj : error LNK2001: unresolved external symbol "public: void __thiscall GLUI_Master_Object::set_glutKeyboardFunc(void (__cdecl*)(unsigned char,int,int))" (?set_glutKeyboardFunc@GLUI_Master_Object@@QAEXP6AXEHH@Z@Z)

example5.obj : error LNK2001: unresolved external symbol "public: void __thiscall GLUI_Master_Object::set_glutReshapeFunc(void (__cdecl*)(int,int))" (?set_glutReshapeFunc@GLUI_Master_Object@@QAEXP6AXHH@Z@Z)

Debug/example5.exe : fatal error LNK1120: 27 unresolved externals

Error executing link.exe.

example5.exe - 28 error(s), 0 warning(s)

Share this post


Link to post
Share on other sites

ni library GLUI utk UI OpenGL kan? kalau awak pakai VC++ mungkin terlupa nak letakkan library glui.lib (atau glui32.lib, mana satu tah, lupa) dlm senarai library2 yg digunakan... cuba carik kat Project Properties, tab mana satu saya dah lupa... smile.gif

Share this post


Link to post
Share on other sites

Pastikan 'glu32.lib' telah si setkan...

Sekiranya anda menggunakan MS Visual C++, Folow this:

Click Project > Settings...

Pegi ke Tab Link dan masukan nama library glu32.lib pada Object/library modules: textx box...

dan click OK... cuba compile skali lagi...

Share this post


Link to post
Share on other sites

aku pun cam siRomeo ni gak,

naik ponin kapla den

bila guna microsoft visual c++,

ntah cam ne tiba2 jer dia bgtau yang perisian tu illegal

aku bengang ni..

yg ada mood nak buat jadi hilang .... ph34r.gifdry.gif

Share this post


Link to post
Share on other sites

aku sendri pun tak tau,

samaada masalah kom atau perisian MS visual c++ yg aku install

yg ponin nye, walaupun aturcara aku tu takdak error ,

slps run terus kluar 'advertisement illegal'...

Share this post


Link to post
Share on other sites

mm... tak penah pulak aku jumpa error message camtuh...

Mungkin kau install software 'MS Visual C++' dan bukannya 'MS Visual Studio' (guess jer).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...