Several strange things are happening with devcpp. The area to the left of the code typing area is gray, not black like it normally is, also when I select code, it selects in black, not blue.
[IMG src="http://img169.imageshack.us/img169/3876/devscreenshotgq5.jpg" ]
(Code in screen shot is not what is causing it to act up, it is just for selecting)
When I tried to compile code with the use XP theme box checked under the compiler options the project compiled, but the window was not shown (I haven't tried it before until then, so I don't know if it was directly related to the other problems). When I copied the code to another project it ran fine.
Devcpp also does not recognize installed packages. I will download and install packages, but devcpp will not recognize the files from them. I can open the various package header files in the editor and they are normal, but devcpp claims it cannot find them when I include them i the project.
Is there any way to solve these problems without a reinstall?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am not sure why your gutter has no line numbers - presumably it has been set to grey-on-grey.
All the other colours can be set in the same dialog. From memory I think there are a number of predefined schemes, one of which is the default.
With respect to using packages, I suggest that you need to post the build log showing these problems. Be aware that header files are not libraries. Including the header alone is insufficient - you have to explicitly link the library as well. You also have to tell the compiler where to find headers, and equally tell the linker where to find libraries. This is done in the Project->Project options->Directories dialog.
Many Devpaks come with project templates (File->New->Project) that set up the compiler and linker options appropriately.
With respect to the "use XP theme box" I'll have to take a look at that. The simple answer is don't check it!
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As Clifford stated, for your package difficulties, a test case with your full Basic 3 is always
the way to go. Top level descriptions do provide context, but real data that can show exactly
what you are doing and seeing helps a LOT more.
Note that many packages come with project templates that are installed with them, such that
when you create a New:Project, there is an option on one of the tabs for, say, a GLUT
project.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I forgot to add this in the WM_CREATE case of the WindowProcedure
INITCOMMONCONTROLSEX iccx;
iccx.dwSize=sizeof(INITCOMMONCONTROLSEX);
InitCommonControlsEx(&iccx);
Shawn
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That method works for using xp theme. I fixed the colors, but one weird thing; when you click in the gutter, or when the compiler detects an error an highlights it with the check mark in the gutter (I'm assuming this is an error line) no matter how much i change its settings, it remains a black select. Also for downloading packages, I have recently downloaded and installed a NeHe OpenGL Template. When I go to create new project, it doesn't appear under any of the tabs.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-09-25
You are dealing with multiple problems in one thread which is a recipe for confusion. I'm confused already.
As has already been said; some but not all DevPaks provide templates. As I said earlier, posting your log will enable us to tell us exactly how to solve your problem. I have already given it to you in general terms - you need to link the relevant libraries. If you cannot provide the necessary information when asked what are you doing here!?
With regard to the selection colour, have you modified the correct colour setting? It is not teh same colour setting as for the gutter. That is so obvious I shouldn't need to say it, but your description of the problem is vague and ambiguous.
>> "...recently downloaded and installed a NeHe OpenGL Template..."
...tells us nothing without a link! We could Google, but we shouldn't have to. If it does not produce a new project type in the File->New->Project dialog, then it is not a DevCpp template (or you have not installed it).
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here, I will list all of the current problems I have now:
I have modified the color settings for the error line, but it still appears all black.
I have downloaded and installed (with the check for updates/packages on the tools menu) a NeHe OpenGL Template. When I create a new project, it is not a template option.
Another example that is similar to the above is that Devcpp complains of missing files for glaux (which I have downloaded an installed in the same way).
code:
/
* This Code Was Created By Jeff Molofee 2000
* A HUGE Thanks To Fredric Echols For Cleaning Up
* And Optimizing This Code, Making It More Flexible!
* If You've Found This Code Useful, Please Let Me Know.
* Visit My Site At nehe.gamedev.net /
include <windows.h> // Header File For Windows
include <gl\gl.h> // Header File For The OpenGL32 Library
include <gl\glu.h> // Header File For The GLu32 Library
include <gl\glaux.h> // Header File For The Glaux Library
HDC hDC=NULL; // Private GDI Device Context
HGLRC hRC=NULL; // Permanent Rendering Context
HWND hWnd=NULL; // Holds Our Window Handle
HINSTANCE hInstance; // Holds The Instance Of The Application
bool keys[256]; // Array Used For The Keyboard Routine
bool active=TRUE; // Window Active Flag Set To TRUE By Default
bool fullscreen=TRUE; // Fullscreen Flag Set To Fullscreen Mode By Default
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); // Declaration For WndProc
GLvoid ReSizeGLScene(GLsizei width, GLsizei height) // Resize And Initialize The GL Window
{
if (height==0) // Prevent A Divide By Zero By
{
height=1; // Making Height Equal One
}
glViewport(0,0,width,height); // Reset The Current Viewport
glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
glLoadIdentity(); // Reset The Projection Matrix
// Calculate The Aspect Ratio Of The Window
gluPerspective(45.0f,(GLfloat)width/(GLfloat)height,0.1f,100.0f);
glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix
glLoadIdentity(); // Reset The Modelview Matrix
}
int InitGL(GLvoid) // All Setup For OpenGL Goes Here
{
glShadeModel(GL_SMOOTH); // Enable Smooth Shading
glClearColor(0.0f, 0.0f, 0.0f, 0.5f); // Black Background
glClearDepth(1.0f); // Depth Buffer Setup
glEnable(GL_DEPTH_TEST); // Enables Depth Testing
glDepthFunc(GL_LEQUAL); // The Type Of Depth Testing To Do
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really Nice Perspective Calculations
return TRUE; // Initialization Went OK
}
int DrawGLScene(GLvoid) // Here's Where We Do All The Drawing
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer
glLoadIdentity(); // Reset The Current Modelview Matrix
return TRUE; // Everything Went OK
}
GLvoid KillGLWindow(GLvoid) // Properly Kill The Window
{
if (fullscreen) // Are We In Fullscreen Mode?
{
ChangeDisplaySettings(NULL,0); // If So Switch Back To The Desktop
ShowCursor(TRUE); // Show Mouse Pointer
}
if(hRC)// Do We Have A Rendering Context?{if(!wglMakeCurrent(NULL,NULL))// Are We Able To Release The DC And RC Contexts?{MessageBox(NULL,"ReleaseOfDCAndRCFailed.","SHUTDOWNERROR",MB_OK|MB_ICONINFORMATION);}if(!wglDeleteContext(hRC))// Are We Able To Delete The RC?{MessageBox(NULL,"ReleaseRenderingContextFailed.","SHUTDOWNERROR",MB_OK|MB_ICONINFORMATION);}hRC=NULL;// Set RC To NULL}if(hDC&&!ReleaseDC(hWnd,hDC))// Are We Able To Release The DC{MessageBox(NULL,"ReleaseDeviceContextFailed.","SHUTDOWNERROR",MB_OK|MB_ICONINFORMATION);hDC=NULL;// Set DC To NULL}if(hWnd&&!DestroyWindow(hWnd))// Are We Able To Destroy The Window?{MessageBox(NULL,"CouldNotReleasehWnd.","SHUTDOWNERROR",MB_OK|MB_ICONINFORMATION);hWnd=NULL;// Set hWnd To NULL}if(!UnregisterClass("OpenGL",hInstance))// Are We Able To Unregister Class{MessageBox(NULL,"CouldNotUnregisterClass.","SHUTDOWNERROR",MB_OK|MB_ICONINFORMATION);hInstance=NULL;// Set hInstance To NULL}
}
/ This Code Creates Our OpenGL Window. Parameters Are: *
* title - Title To Appear At The Top Of The Window *
* width - Width Of The GL Window Or Fullscreen Mode *
* height - Height Of The GL Window Or Fullscreen Mode *
* bits - Number Of Bits To Use For Color (8/16/24/32) *
* fullscreenflag - Use Fullscreen Mode (TRUE) Or Windowed Mode (FALSE) /
BOOL CreateGLWindow(char* title, int width, int height, int bits, bool fullscreenflag)
{
GLuint PixelFormat; // Holds The Results After Searching For A Match
WNDCLASS wc; // Windows Class Structure
DWORD dwExStyle; // Window Extended Style
DWORD dwStyle; // Window Style
RECT WindowRect; // Grabs Rectangle Upper Left / Lower Right Values
WindowRect.left=(long)0; // Set Left Value To 0
WindowRect.right=(long)width; // Set Right Value To Requested Width
WindowRect.top=(long)0; // Set Top Value To 0
WindowRect.bottom=(long)height; // Set Bottom Value To Requested Height
fullscreen=fullscreenflag;// Set The Global Fullscreen FlaghInstance=GetModuleHandle(NULL);// Grab An Instance For Our Windowwc.style=CS_HREDRAW|CS_VREDRAW|CS_OWNDC;// Redraw On Size, And Own DC For Window.wc.lpfnWndProc=(WNDPROC)WndProc;// WndProc Handles Messageswc.cbClsExtra=0;// No Extra Window Datawc.cbWndExtra=0;// No Extra Window Datawc.hInstance=hInstance;// Set The Instancewc.hIcon=LoadIcon(NULL,IDI_WINLOGO);// Load The Default Iconwc.hCursor=LoadCursor(NULL,IDC_ARROW);// Load The Arrow Pointerwc.hbrBackground=NULL;// No Background Required For GLwc.lpszMenuName=NULL;// We Don't Want A Menuwc.lpszClassName="OpenGL";// Set The Class Nameif(!RegisterClass(&wc))// Attempt To Register The Window Class{MessageBox(NULL,"FailedToRegisterTheWindowClass.","ERROR",MB_OK|MB_ICONEXCLAMATION);returnFALSE;// Return FALSE}if(fullscreen)// Attempt Fullscreen Mode?{DEVMODEdmScreenSettings;// Device Modememset(&dmScreenSettings,0,sizeof(dmScreenSettings));// Makes Sure Memory's CleareddmScreenSettings.dmSize=sizeof(dmScreenSettings);// Size Of The Devmode StructuredmScreenSettings.dmPelsWidth=width;// Selected Screen WidthdmScreenSettings.dmPelsHeight=height;// Selected Screen HeightdmScreenSettings.dmBitsPerPel=bits;// Selected Bits Per PixeldmScreenSettings.dmFields=DM_BITSPERPEL|DM_PELSWIDTH|DM_PELSHEIGHT;// Try To Set Selected Mode And Get Results. NOTE: CDS_FULLSCREEN Gets Rid Of Start Bar.if(ChangeDisplaySettings(&dmScreenSettings,CDS_FULLSCREEN)!=DISP_CHANGE_SUCCESSFUL){// If The Mode Fails, Offer Two Options. Quit Or Use Windowed Mode.if(MessageBox(NULL,"TheRequestedFullscreenModeIsNotSupportedBy\nYourVideoCard.UseWindowedModeInstead?","NeHeGL",MB_YESNO|MB_ICONEXCLAMATION)==IDYES){fullscreen=FALSE;// Windowed Mode Selected. Fullscreen = FALSE}else{// Pop Up A Message Box Letting User Know The Program Is Closing.MessageBox(NULL,"ProgramWillNowClose.","ERROR",MB_OK|MB_ICONSTOP);returnFALSE;// Return FALSE}}}if(fullscreen)// Are We Still In Fullscreen Mode?{dwExStyle=WS_EX_APPWINDOW;// Window Extended StyledwStyle=WS_POPUP;// Windows StyleShowCursor(FALSE);// Hide Mouse Pointer}else{dwExStyle=WS_EX_APPWINDOW|WS_EX_WINDOWEDGE;// Window Extended StyledwStyle=WS_OVERLAPPEDWINDOW;// Windows Style}AdjustWindowRectEx(&WindowRect,dwStyle,FALSE,dwExStyle);// Adjust Window To True Requested Size// Create The Windowif(!(hWnd=CreateWindowEx(dwExStyle,// Extended Style For The Window"OpenGL",// Class Nametitle,// Window TitledwStyle|// Defined Window StyleWS_CLIPSIBLINGS|// Required Window StyleWS_CLIPCHILDREN,// Required Window Style0,0,// Window PositionWindowRect.right-WindowRect.left,// Calculate Window WidthWindowRect.bottom-WindowRect.top,// Calculate Window HeightNULL,// No Parent WindowNULL,// No MenuhInstance,// InstanceNULL)))// Dont Pass Anything To WM_CREATE{KillGLWindow();// Reset The DisplayMessageBox(NULL,"WindowCreationError.","ERROR",MB_OK|MB_ICONEXCLAMATION);returnFALSE;// Return FALSE}staticPIXELFORMATDESCRIPTORpfd=// pfd Tells Windows How We Want Things To Be{sizeof(PIXELFORMATDESCRIPTOR),// Size Of This Pixel Format Descriptor1,// Version NumberPFD_DRAW_TO_WINDOW|// Format Must Support WindowPFD_SUPPORT_OPENGL|// Format Must Support OpenGLPFD_DOUBLEBUFFER,// Must Support Double BufferingPFD_TYPE_RGBA,// Request An RGBA Formatbits,// Select Our Color Depth0,0,0,0,0,0,// Color Bits Ignored0,// No Alpha Buffer0,// Shift Bit Ignored0,// No Accumulation Buffer0,0,0,0,// Accumulation Bits Ignored16,// 16Bit Z-Buffer (Depth Buffer) 0,// No Stencil Buffer0,// No Auxiliary BufferPFD_MAIN_PLANE,// Main Drawing Layer0,// Reserved0,0,0// Layer Masks Ignored};if(!(hDC=GetDC(hWnd)))// Did We Get A Device Context?{KillGLWindow();// Reset The DisplayMessageBox(NULL,"Can'tCreateAGLDeviceContext.","ERROR",MB_OK|MB_ICONEXCLAMATION);returnFALSE;// Return FALSE}if(!(PixelFormat=ChoosePixelFormat(hDC,&pfd)))// Did Windows Find A Matching Pixel Format?{KillGLWindow();// Reset The DisplayMessageBox(NULL,"Can'tFindASuitablePixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION);returnFALSE;// Return FALSE}if(!SetPixelFormat(hDC,PixelFormat,&pfd))// Are We Able To Set The Pixel Format?{KillGLWindow();// Reset The DisplayMessageBox(NULL,"Can'tSetThePixelFormat.","ERROR",MB_OK|MB_ICONEXCLAMATION);returnFALSE;// Return FALSE}if(!(hRC=wglCreateContext(hDC)))// Are We Able To Get A Rendering Context?{KillGLWindow();// Reset The DisplayMessageBox(NULL,"Can'tCreateAGLRenderingContext.","ERROR",MB_OK|MB_ICONEXCLAMATION);returnFALSE;// Return FALSE}if(!wglMakeCurrent(hDC,hRC))// Try To Activate The Rendering Context{KillGLWindow();// Reset The DisplayMessageBox(NULL,"Can'tActivateTheGLRenderingContext.","ERROR",MB_OK|MB_ICONEXCLAMATION);returnFALSE;// Return FALSE}ShowWindow(hWnd,SW_SHOW);// Show The WindowSetForegroundWindow(hWnd);// Slightly Higher PrioritySetFocus(hWnd);// Sets Keyboard Focus To The WindowReSizeGLScene(width,height);// Set Up Our Perspective GL Screenif(!InitGL())// Initialize Our Newly Created GL Window{KillGLWindow();// Reset The DisplayMessageBox(NULL,"InitializationFailed.","ERROR",MB_OK|MB_ICONEXCLAMATION);returnFALSE;// Return FALSE}returnTRUE;// Success
}
LRESULT CALLBACK WndProc( HWND hWnd, // Handle For This Window
UINT uMsg, // Message For This Window
WPARAM wParam, // Additional Message Information
LPARAM lParam) // Additional Message Information
{
switch (uMsg) // Check For Windows Messages
{
case WM_ACTIVATE: // Watch For Window Activate Message
{
if (!HIWORD(wParam)) // Check Minimization State
{
active=TRUE; // Program Is Active
}
else
{
active=FALSE; // Program Is No Longer Active
}
int WINAPI WinMain( HINSTANCE hInstance, // Instance
HINSTANCE hPrevInstance, // Previous Instance
LPSTR lpCmdLine, // Command Line Parameters
int nCmdShow) // Window Show State
{
MSG msg; // Windows Message Structure
BOOL done=FALSE; // Bool Variable To Exit Loop
//AskTheUserWhichScreenModeTheyPreferif(MessageBox(NULL,"WouldYouLikeToRunInFullscreenMode?","StartFullScreen?",MB_YESNO|MB_ICONQUESTION)==IDNO){fullscreen=FALSE;//WindowedMode}//CreateOurOpenGLWindowif(!CreateGLWindow("NeHe's OpenGL Framework",640,480,16,fullscreen)){ return 0; // Quit If Window Was Not Created}while(!done) // Loop That Runs While done=FALSE{ if (PeekMessage(&msg,NULL,0,0,PM_REMOVE)) // Is There A Message Waiting? { if (msg.message==WM_QUIT) // Have We Received A Quit Message? { done=TRUE; // If So done=TRUE } else // If Not, Deal With Window Messages { TranslateMessage(&msg); // Translate The Message DispatchMessage(&msg); // Dispatch The Message } } else // If There Are No Messages { // Draw The Scene. Watch For ESC Key And Quit Messages From DrawGLScene() if (active) // Program Active? { if (keys[VK_ESCAPE]) // Was ESC Pressed? { done=TRUE; // ESC Signalled A Quit } else // Not Time To Quit, Update Screen { DrawGLScene(); // Draw The Scene SwapBuffers(hDC); // Swap Buffers (Double Buffering) } } if (keys[VK_F1]) // Is F1 Being Pressed? { keys[VK_F1]=FALSE; // If So Make Key FALSE KillGLWindow(); // Kill Our Current Window fullscreen=!fullscreen; // Toggle Fullscreen / Windowed Mode // Recreate Our OpenGL Window if (!CreateGLWindow("NeHe'sOpenGLFramework",640,480,16,fullscreen)){return0;//QuitIfWindowWasNotCreated}}}}//ShutdownKillGLWindow();//KillTheWindowreturn(msg.wParam);//ExitTheProgram
}
Compile Log:
Compiler: Default compiler
Building Makefile: "C:\mycppstuff\GLfiles\1Basic\Makefile.win"
Executing make...
make.exe -f "C:\mycppstuff\GLfiles\1Basic\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Documents and Settings/Carl Kolbo/My Documents/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Documents and Settings/Carl Kolbo/My Documents/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Documents and Settings/Carl Kolbo/My Documents/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Documents and Settings/Carl Kolbo/My Documents/Dev-Cpp/include/c++/3.4.2" -I"C:/Documents and Settings/Carl Kolbo/My Documents/Dev-Cpp/include"
main.cpp:12:60: gl\glaux.h: No such file or directory
make.exe: *** [main.o] Error 1
Execution terminated
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You installed Dev in "My Documents"? That is a VERY VERY BAD idea! Horrendous actually.
As is mentioned in the "Please Read" thread, spaces cause a lot of problems. Didn't
you read that?
Do a clean uninstall of Dev - see the Please Read thread for directions - NOTE CAREFULLY
the directions for keeping track of an reporting EXACTLY what you did. Then install
Dev where it wants to go.
In general, unless you know a program really well, it is a VERY bad idea to override
where it wants to go. It knows better than you do where it needs to go.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's extremely weird, I installed devcpp to the default directory if I go to C:/Dev-Cpp I find it, but also, if I go to the My Documents folder I find the same thing, very strange. I am going to reinstall, I think that's the only way to fix this particular problem. Thanks for the help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Did you relocate your My Documents folder at some point? I've only messed around with that in Vista but I think you could do it in XP too. That might make it appear to be in two places even though you installed in one. At least that's how it works in Vista.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I reinstalled successfully (to the default directories) and now every thingworks fine, I redownloaded the packages I want, and there are no problems, thanks again for the help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Giving away all of my tricks, let me encourage you to get in the habit of
looking at your Compile Log - even for cases where everything is working just
fine.
Knowing what things look like when they are right, and when they are wrong
can really pay off - and I am living proof that its not that hard. ;)
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-09-26
Note that you were asked twice to post the log (as well as it being requested in the "Read first" thread). The problem was identified in the first response following the posting of it (in a couple of hours). Which is exactly why you were asked.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
WinXP
4.9.9.2
Several strange things are happening with devcpp. The area to the left of the code typing area is gray, not black like it normally is, also when I select code, it selects in black, not blue.
[IMG src="http://img169.imageshack.us/img169/3876/devscreenshotgq5.jpg" ]
(Code in screen shot is not what is causing it to act up, it is just for selecting)
When I tried to compile code with the use XP theme box checked under the compiler options the project compiled, but the window was not shown (I haven't tried it before until then, so I don't know if it was directly related to the other problems). When I copied the code to another project it ran fine.
Devcpp also does not recognize installed packages. I will download and install packages, but devcpp will not recognize the files from them. I can open the various package header files in the editor and they are normal, but devcpp claims it cannot find them when I include them i the project.
Is there any way to solve these problems without a reinstall?
What is weird is that you are the second person to complain about the gutter being grey rather than black, when grey is in fact the default. Either way the solution is simple: http://sourceforge.net/forum/forum.php?thread_id=1824743&forum_id=48211
I am not sure why your gutter has no line numbers - presumably it has been set to grey-on-grey.
All the other colours can be set in the same dialog. From memory I think there are a number of predefined schemes, one of which is the default.
With respect to using packages, I suggest that you need to post the build log showing these problems. Be aware that header files are not libraries. Including the header alone is insufficient - you have to explicitly link the library as well. You also have to tell the compiler where to find headers, and equally tell the linker where to find libraries. This is done in the Project->Project options->Directories dialog.
Many Devpaks come with project templates (File->New->Project) that set up the compiler and linker options appropriately.
With respect to the "use XP theme box" I'll have to take a look at that. The simple answer is don't check it!
Clifford
As Clifford stated, for your package difficulties, a test case with your full Basic 3 is always
the way to go. Top level descriptions do provide context, but real data that can show exactly
what you are doing and seeing helps a LOT more.
Note that many packages come with project templates that are installed with them, such that
when you create a New:Project, there is an option on one of the tabs for, say, a GLUT
project.
Wayne
I've had problems when using XP themes,i.e. buttons not being visible,edit box problems,ect.,and what I do is add:
define _WIN32_IE 0x0500
include <commctrl.h>
with my other includes and add -lcomctl32 to linker options.
I don't know why,but it works for me.
Shawn
I forgot to add this in the WM_CREATE case of the WindowProcedure
INITCOMMONCONTROLSEX iccx;
iccx.dwSize=sizeof(INITCOMMONCONTROLSEX);
InitCommonControlsEx(&iccx);
Shawn
That method works for using xp theme. I fixed the colors, but one weird thing; when you click in the gutter, or when the compiler detects an error an highlights it with the check mark in the gutter (I'm assuming this is an error line) no matter how much i change its settings, it remains a black select. Also for downloading packages, I have recently downloaded and installed a NeHe OpenGL Template. When I go to create new project, it doesn't appear under any of the tabs.
You are dealing with multiple problems in one thread which is a recipe for confusion. I'm confused already.
As has already been said; some but not all DevPaks provide templates. As I said earlier, posting your log will enable us to tell us exactly how to solve your problem. I have already given it to you in general terms - you need to link the relevant libraries. If you cannot provide the necessary information when asked what are you doing here!?
With regard to the selection colour, have you modified the correct colour setting? It is not teh same colour setting as for the gutter. That is so obvious I shouldn't need to say it, but your description of the problem is vague and ambiguous.
>> "...recently downloaded and installed a NeHe OpenGL Template..."
...tells us nothing without a link! We could Google, but we shouldn't have to. If it does not produce a new project type in the File->New->Project dialog, then it is not a DevCpp template (or you have not installed it).
Clifford
Here, I will list all of the current problems I have now:
I have modified the color settings for the error line, but it still appears all black.
I have downloaded and installed (with the check for updates/packages on the tools menu) a NeHe OpenGL Template. When I create a new project, it is not a template option.
Another example that is similar to the above is that Devcpp complains of missing files for glaux (which I have downloaded an installed in the same way).
code:
/
* This Code Was Created By Jeff Molofee 2000
* A HUGE Thanks To Fredric Echols For Cleaning Up
* And Optimizing This Code, Making It More Flexible!
* If You've Found This Code Useful, Please Let Me Know.
* Visit My Site At nehe.gamedev.net
/
include <windows.h> // Header File For Windows
include <gl\gl.h> // Header File For The OpenGL32 Library
include <gl\glu.h> // Header File For The GLu32 Library
include <gl\glaux.h> // Header File For The Glaux Library
HDC hDC=NULL; // Private GDI Device Context
HGLRC hRC=NULL; // Permanent Rendering Context
HWND hWnd=NULL; // Holds Our Window Handle
HINSTANCE hInstance; // Holds The Instance Of The Application
bool keys[256]; // Array Used For The Keyboard Routine
bool active=TRUE; // Window Active Flag Set To TRUE By Default
bool fullscreen=TRUE; // Fullscreen Flag Set To Fullscreen Mode By Default
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); // Declaration For WndProc
GLvoid ReSizeGLScene(GLsizei width, GLsizei height) // Resize And Initialize The GL Window
{
if (height==0) // Prevent A Divide By Zero By
{
height=1; // Making Height Equal One
}
}
int InitGL(GLvoid) // All Setup For OpenGL Goes Here
{
glShadeModel(GL_SMOOTH); // Enable Smooth Shading
glClearColor(0.0f, 0.0f, 0.0f, 0.5f); // Black Background
glClearDepth(1.0f); // Depth Buffer Setup
glEnable(GL_DEPTH_TEST); // Enables Depth Testing
glDepthFunc(GL_LEQUAL); // The Type Of Depth Testing To Do
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really Nice Perspective Calculations
return TRUE; // Initialization Went OK
}
int DrawGLScene(GLvoid) // Here's Where We Do All The Drawing
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen And Depth Buffer
glLoadIdentity(); // Reset The Current Modelview Matrix
return TRUE; // Everything Went OK
}
GLvoid KillGLWindow(GLvoid) // Properly Kill The Window
{
if (fullscreen) // Are We In Fullscreen Mode?
{
ChangeDisplaySettings(NULL,0); // If So Switch Back To The Desktop
ShowCursor(TRUE); // Show Mouse Pointer
}
}
/ This Code Creates Our OpenGL Window. Parameters Are: *
* title - Title To Appear At The Top Of The Window *
* width - Width Of The GL Window Or Fullscreen Mode *
* height - Height Of The GL Window Or Fullscreen Mode *
* bits - Number Of Bits To Use For Color (8/16/24/32) *
* fullscreenflag - Use Fullscreen Mode (TRUE) Or Windowed Mode (FALSE) /
BOOL CreateGLWindow(char* title, int width, int height, int bits, bool fullscreenflag)
{
GLuint PixelFormat; // Holds The Results After Searching For A Match
WNDCLASS wc; // Windows Class Structure
DWORD dwExStyle; // Window Extended Style
DWORD dwStyle; // Window Style
RECT WindowRect; // Grabs Rectangle Upper Left / Lower Right Values
WindowRect.left=(long)0; // Set Left Value To 0
WindowRect.right=(long)width; // Set Right Value To Requested Width
WindowRect.top=(long)0; // Set Top Value To 0
WindowRect.bottom=(long)height; // Set Bottom Value To Requested Height
}
LRESULT CALLBACK WndProc( HWND hWnd, // Handle For This Window
UINT uMsg, // Message For This Window
WPARAM wParam, // Additional Message Information
LPARAM lParam) // Additional Message Information
{
switch (uMsg) // Check For Windows Messages
{
case WM_ACTIVATE: // Watch For Window Activate Message
{
if (!HIWORD(wParam)) // Check Minimization State
{
active=TRUE; // Program Is Active
}
else
{
active=FALSE; // Program Is No Longer Active
}
}
int WINAPI WinMain( HINSTANCE hInstance, // Instance
HINSTANCE hPrevInstance, // Previous Instance
LPSTR lpCmdLine, // Command Line Parameters
int nCmdShow) // Window Show State
{
MSG msg; // Windows Message Structure
BOOL done=FALSE; // Bool Variable To Exit Loop
}
Compile Log:
Compiler: Default compiler
Building Makefile: "C:\mycppstuff\GLfiles\1Basic\Makefile.win"
Executing make...
make.exe -f "C:\mycppstuff\GLfiles\1Basic\Makefile.win" all
g++.exe -c main.cpp -o main.o -I"C:/Documents and Settings/Carl Kolbo/My Documents/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Documents and Settings/Carl Kolbo/My Documents/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Documents and Settings/Carl Kolbo/My Documents/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Documents and Settings/Carl Kolbo/My Documents/Dev-Cpp/include/c++/3.4.2" -I"C:/Documents and Settings/Carl Kolbo/My Documents/Dev-Cpp/include"
main.cpp:12:60: gl\glaux.h: No such file or directory
make.exe: *** [main.o] Error 1
Execution terminated
You installed Dev in "My Documents"? That is a VERY VERY BAD idea! Horrendous actually.
As is mentioned in the "Please Read" thread, spaces cause a lot of problems. Didn't
you read that?
Do a clean uninstall of Dev - see the Please Read thread for directions - NOTE CAREFULLY
the directions for keeping track of an reporting EXACTLY what you did. Then install
Dev where it wants to go.
In general, unless you know a program really well, it is a VERY bad idea to override
where it wants to go. It knows better than you do where it needs to go.
Wayne
That's extremely weird, I installed devcpp to the default directory if I go to C:/Dev-Cpp I find it, but also, if I go to the My Documents folder I find the same thing, very strange. I am going to reinstall, I think that's the only way to fix this particular problem. Thanks for the help.
Did you relocate your My Documents folder at some point? I've only messed around with that in Vista but I think you could do it in XP too. That might make it appear to be in two places even though you installed in one. At least that's how it works in Vista.
Please make sure to get a clean uninstall.
Please
Wayne
I reinstalled successfully (to the default directories) and now every thingworks fine, I redownloaded the packages I want, and there are no problems, thanks again for the help.
Super! Glad to hear it.
Giving away all of my tricks, let me encourage you to get in the habit of
looking at your Compile Log - even for cases where everything is working just
fine.
Knowing what things look like when they are right, and when they are wrong
can really pay off - and I am living proof that its not that hard. ;)
Wayne
Note that you were asked twice to post the log (as well as it being requested in the "Read first" thread). The problem was identified in the first response following the posting of it (in a couple of hours). Which is exactly why you were asked.