Pelles C forum

C language => Beginner questions => Topic started by: d3dx on February 27, 2017, 11:44:35 AM

Title: GLUT Texture Example Error
Post by: d3dx on February 27, 2017, 11:44:35 AM
I need some help.

My example works in Visual Studio but won't compile in Pelles C. :'( :-[ :-\

I know I'm a noob. There is a file LoadTGA.c in the book of Wright "OpenGL", it works well!

But I wonder why my example doesn't compile?
I read that it's because of MS glaux.lib - it is better not to use glut and glaux...  :'( :-[ :-\

But maybe there's a way to get my example to compile???

Errors in Buildings:
Building main.obj.
Building main.exe.
POLINK: error: Unresolved external symbol '__imp__wsprintfA'.
POLINK: error: Unresolved external symbol '__imp__GetFocus@0'.
POLINK: error: Unresolved external symbol '__imp__MessageBoxA@16'.
POLINK: error: Unresolved external symbol '__imp__CreateCompatibleDC@4'.
POLINK: error: Unresolved external symbol '__imp__CreateDIBSection@24'.
POLINK: error: Unresolved external symbol '__imp__SelectObject@8'.
POLINK: error: Unresolved external symbol '__imp__SetDIBits@28'.
POLINK: error: Unresolved external symbol '__imp__GdiFlush@0'.
POLINK: error: Unresolved external symbol '__imp__DeleteDC@4'.
POLINK: error: Unresolved external symbol '__imp__DeleteObject@4'.
POLINK: error: Unresolved external symbol '__imp__GetClientRect@8'.
POLINK: error: Unresolved external symbol '__imp__GetMessageA@16'.
POLINK: error: Unresolved external symbol '__imp__TranslateMessage@4'.
POLINK: error: Unresolved external symbol '__imp__DispatchMessageA@4'.
POLINK: error: Unresolved external symbol '__imp__PeekMessageA@20'.
POLINK: error: Unresolved external symbol '__imp__GetSystemMetrics@4'.
POLINK: error: Unresolved external symbol '__imp__LoadIconA@8'.
POLINK: error: Unresolved external symbol '__imp__LoadCursorA@8'.
POLINK: error: Unresolved external symbol '__imp__GetStockObject@4'.
POLINK: error: Unresolved external symbol '__imp__RegisterClassW@4'.
POLINK: error: Unresolved external symbol '__imp__RegisterClassA@4'.
POLINK: error: Unresolved external symbol '__imp__AdjustWindowRect@12'.
POLINK: error: Unresolved external symbol '__imp__CreateWindowExW@48'.
POLINK: error: Unresolved external symbol '__imp__CreateWindowExA@48'.
POLINK: error: Unresolved external symbol '__imp__GetWindowRect@8'.
POLINK: error: Unresolved external symbol '__imp__GetDC@4'.
POLINK: error: Unresolved external symbol '__imp__ShowWindow@8'.
POLINK: error: Unresolved external symbol '__imp__SetPaletteEntries@16'.
POLINK: error: Unresolved external symbol '__imp__GetPaletteEntries@16'.
POLINK: error: Unresolved external symbol '__imp__SwapBuffers@4'.
POLINK: error: Unresolved external symbol '__imp__GetCursorPos@4'.
POLINK: error: Unresolved external symbol '__imp__SelectPalette@12'.
POLINK: error: Unresolved external symbol '__imp__RealizePalette@4'.
POLINK: error: Unresolved external symbol '__imp__BeginPaint@8'.
POLINK: error: Unresolved external symbol '__imp__EndPaint@8'.
POLINK: error: Unresolved external symbol '__imp__SetCapture@4'.
POLINK: error: Unresolved external symbol '__imp__ReleaseCapture@0'.
POLINK: error: Unresolved external symbol '__imp__GetKeyState@4'.
POLINK: error: Unresolved external symbol '__imp__DestroyWindow@4'.
POLINK: error: Unresolved external symbol '__imp__PostQuitMessage@4'.
POLINK: error: Unresolved external symbol '__imp__DefWindowProcA@16'.
POLINK: error: Unresolved external symbol '__imp__SetSystemPaletteUse@8'.
POLINK: error: Unresolved external symbol '__imp__GetSysColor@4'.
POLINK: error: Unresolved external symbol '__imp__SetSysColors@12'.
POLINK: error: Unresolved external symbol '__imp__PostMessageA@16'.
POLINK: error: Unresolved external symbol '__imp__CreatePalette@4'.
POLINK: error: Unresolved external symbol '__imp__SetPixelFormat@12'.
POLINK: error: Unresolved external symbol '__imp__ChoosePixelFormat@8'.
POLINK: error: Unresolved external symbol '__imp__DescribePixelFormat@16'.
POLINK: error: Unresolved external symbol '__imp__UnrealizeObject@4'.
POLINK: error: Unresolved external symbol '__imp__InvalidateRect@12'.
POLINK: error: Unresolved external symbol '__imp__GetPixelFormat@4'.
POLINK: error: Unresolved external symbol '__imp__ReleaseDC@8'.
POLINK: fatal error: 53 unresolved external(s).
*** Error code: 1 ***
Done.
Title: Re: GLUT Texture Example Error
Post by: TimoVJL on February 27, 2017, 12:11:34 PM
some libraries are missing from project: user32.lib gdi32.lib
Open from menu Project -> Project options... -> Linker and add those to Library and object files:
Title: Re: GLUT Texture Example Error
Post by: d3dx on February 27, 2017, 02:41:10 PM
TimoVJL, thank you very much! :D You really helped me a lot!

I believed that everything should happen in Pelles C  :) This is a great victory for me, I'm very happy!
Example works! :D

TimoVJL, thank you very much again! :)