Sign in to follow this  
psjie

linking problem

Recommended Posts

Linking... test33.obj : error LNK2001: unresolved external symbol _gluPerspective@32 test33.obj : error LNK2001: unresolved external symbol __imp__glLoadIdentity@0 test33.obj : error LNK2001: unresolved external symbol __imp__glMatrixMode@4 test33.obj : error LNK2001: unresolved external symbol __imp__glViewport@16 test33.obj : error LNK2001: unresolved external symbol __imp__glHint@8 test33.obj : error LNK2001: unresolved external symbol __imp__glDepthFunc@4 test33.obj : error LNK2001: unresolved external symbol __imp__glEnable@4 test33.obj : error LNK2001: unresolved external symbol __imp__glClearDepth@8 test33.obj : error LNK2001: unresolved external symbol __imp__glClearColor@16 test33.obj : error LNK2001: unresolved external symbol __imp__glShadeModel@4 test33.obj : error LNK2001: unresolved external symbol __imp__glEnd@0 test33.obj : error LNK2001: unresolved external symbol __imp__glVertex3f@12 test33.obj : error LNK2001: unresolved external symbol __imp__glBegin@4 test33.obj : error LNK2001: unresolved external symbol __imp__glTranslatef@12 test33.obj : error LNK2001: unresolved external symbol __imp__glClear@4 test33.obj : error LNK2001: unresolved external symbol __imp__wglDeleteContext@4 test33.obj : error LNK2001: unresolved external symbol __imp__wglMakeCurrent@8 test33.obj : error LNK2001: unresolved external symbol __imp__wglCreateContext@4 LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/test33.exe : fatal error LNK1120: 19 unresolved externals Error executing link.exe. Hi, I got this error while i'm copying the code and run in my new programme. What happen? thanks.

Share this post


Link to post
Share on other sites
add
#pragma comment(lib,"OpenGL32.lib")
#pragma comment(lib,"GLu32.lib")
#pragma comment(lib,"GLaux.lib")
to a source file

#pragma comment(lib,...) links your program to the lib

Share this post


Link to post
Share on other sites
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main


Hi,

how to solve this problem?

After i add

#pragma comment(lib,"OpenGL32.lib")
#pragma comment(lib,"GLu32.lib")
#pragma comment(lib,"GLaux.lib")

still got this error.

please help me. I'm helpless....

thanks!

Share this post


Link to post
Share on other sites
You made a new Win32 application instead of a Console application. Find where you declare the WinMain function (It'll be something like int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLine, int nCmdShow)), and change it to int main().
Either that, or recreate the workspace as a console application. I think theres a way to change it without recreating the workspace (something about subsystem:console in one of the project settings?) but I can't remember what it is. Anyone know?

Share this post


Link to post
Share on other sites
test300.obj : error LNK2001: unresolved external symbol __imp__timeGetTime@0
test300.obj : error LNK2001: unresolved external symbol __imp__PlaySoundA@12


Hi,


how to solve this two??

above 1st is get a timer, 2nd is get the sound.


p/s: why the nehe code can be linked, but after i make my own project and copied the code, cannot be succeed?


thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this