Thoughts From My Life

Computers - Page 2

Apr
15
Written by Neil Galloway
 

My Xbox 360 decided to not work the other day. Basically, 9 out of every 10 times I turn the power on, the Xbox 360 opening splash screen loads up and then doesn't go any further. I wouldn't say it freezes because the swirly animation of the circle in the symbol is still moving. It just never proceeds to the dashboard menu.

Then 1 out of every 10 times I boot it up, it will flash the lower right quarter circle, or one red ring of death, on the power button. It then takes me to a black screen that says Error E68 and to contact Microsoft.

Here is a video of the bootup screen I see. This is exactly what happens too. The animation swirls in with the sound and then it just sits there with the animation still moving. It is like it hangs or freezes on the splash screen.

Diagnosis

It turned out to be my hard drive. When I disconnected the 20GB hard drive (the grey device attached to the end of the Xbox 360 where the CD drive tray is), it will boot up no problems.

Unfortunately, the hard drive carries my profiles, my save games, and other downloaded content.

If you are seeing other error codes or behaviour, check out this Xbox 360 Error Code Forum for lots of useful information.

Solution

For the short term, I have purchased a 512MB flash memory card for the Xbox 360 on eBay. You can pick up a Hong Kong special for around US$30 or less. This is a lot cheaper than the $100 60GB hard drive which is the cheapest one in stores right now. If you are still on warranty, then you don't need to do this. Just read on below about warranty replacement.

I found a variety of solutions on YouTube and other forums, but none of them worked for me. You can always try them though.

I then proceeded to the Xbox support site that is run by Microsoft. There are some handy features there if you create an account. I was able to register my console and found out that the warranty is actually still good for 6 months.

I didn't like the repair section of their site as it was geared towards just sending in the entire Xbox and I was sure it was the hard drive so I decided to call.

You can use the phone number 1-800-4MY-XBOX. You will enter an automated assistance system that is a little bit annoying if you have already figured out your problem. Just say "AGENT" at any time and you will be directed to a real, live person. I never had a wait time over 2 minutes either.

You have to provide your Xbox 360 serial number and some personal information before you start. They ran me through their own series of tests to make sure it was the hard drive. One I hadn't done yet was to put my hard drive onto a friend's Xbox 360 and see if it exhibits the same behaviour. That is exactly what happened.

They will then give you a reference # for you case and I was told to mail it back to the service center for my country. Once they received it, they would send me a new one within 2-3 weeks. I had to pay the one way freight (US$10 that included a tracking number) and that was that.

The Microsoft service agent did not tell me to include any documentation, but I wrote a bunch of info onto a piece of paper and put it in the package. This was my name, the serial # of my Xbox 360, the problem, the reference number to my repair ticket that they quoted me on the phone, my return address, email, and phone numbers.

The address I mailed it to was:

Service Center
Dock 20
844 Don Mills Road
Toronto, Ontario, Canada
M3C 1V7

I did some investigating and I don't believe this is an actual Microsoft facility, but really another company taking care of the service end for them in Canada.

Conclusion

I have sent it away this week, so this dilemma has not ended yet. I was told I would lose all my save games and would have to recover my profile using the Xbox 360 Dashboard when I get it running again. In the mean time, I'm hoping my 512MB memory card arrives. I think I might use it for all my save games and profiles from now on as the memory cards have a more reliable life span than a hard drive in my opinion (no moving parts).

Post a Comment ... (4 Comments)

Sep
12
Written by Neil Galloway

I finally figured out a really annoying problem today. I try to connect my laptop to a television so I can watch video, play Guitar Hero, or do whatever and it always displays in black and white.

I was using a short little s-video to composite adapter that came with my MSI video card a few years ago. The picture would be decent, but it was entirely in black and white.

After talkin to some helpful personnel at Memory Express, they told me that a lot of these packaged adapters for video cards use some proprietary standards and don't work perfectly when used with other video cards. I purchased a standard S-Video to Composite adapter for $10 and now it works fine.

So if you s-video is black and white on a monitor or television, check the s-video to composite adapter first.

I also tried using my audio RCA's and a video RCA's and both work the same.

Post a Comment ... (0 Comments)

Sep
09
Written by Neil Galloway

I streamed video to to my PSP for the first time the other day.

If you haven't heard of it, the program is called PimpStreamer and can be downloaded from the PimpWare site.

Basically, you have a server running on a computer somewhere that has access to media files. Any media files that your computer can play. Your PSP can then connect to the server and request a file. The PimpStreamer server will then re-encode the file so that it will play properly on the PSP and send it across the network.

Installation

It was very simple on my Windows XP computer. Connect your PSP and put it into USB mode and then install the files. It does the rest.

My Windows Vista experience wasn't as smooth and I have not got it working yet to tell you the truth. The installer ends with an error part way through saying some program is missing that is needed. I will let you know when I have gotten further on it.

How Well Does It Work

PimpStreamer doesn't work all that great for me. The vidoe looks like good quality but it jumps quite a bit and stutters. I have read some tips on how to fix it, but will have to sit down and play with it for a bit. My computer with the server is close to 6 years old and is running around 90% for the PimpStreamer process, so that could very well be the problem itself.

Either way, check it out. It is a nifty little program that could save you the hassle of having to encode and upload to your PSP anytime you want to watch something.

Post a Comment ... (0 Comments)

Aug
25
Written by Neil Galloway
 

For those of you who read first article on the A* Algorithm and used the demo applet, I have a new version out.

I am just reiterating most of what was in the first article. This algorithm is improved in some ways. In particular, it now searches from both the start and the end point until it finds the best path. This greatly improves the performance on unique wall setups.

I created my first version of an A* Pathfinding Demo. It is an applet further down this page, so you will need Java installed. Basically, you can draw a map by setting a start point, end point, and drawings walls. Then press Start to watch the algorithm think its way through.

Keep in mind, you are still allowed to have multiple starting or end points, but it will only lose the highest grid number of each when the algorithm starts. It costs 10 units to move left, right, up, or down and it costs 14 to move on the diagonal.

If you pause AStar, any map changes at that time will also do nothing to change how the algorithm will finish.

Here are a few instructions:

  • To set a wall, click on a square once. It will turn red.
  • To set a start point, click on a square twice. It will turn to a wall on the first click, but the next sets it to a blue start point.
  • To set an end point, click on a square three times. Just like above, it will turn to a purple end point.
  • To clear a grid square to just be walkable, click on it until it turns white again.
  • Just click Start when you are ready to go. It will work its way through, color coding each block to show its status and if it belongs to the open or closed lists in the algorithm. You can pause at any time. At the end, it will trace in pink, the path it wants to take.

  • You can adjust the speed as to how fast it runs by inputting a new number when AStar is stopped.

To understand what it is doing, refer to the tutorial A* Pathfinding For Beginners and my original article called A* Pathfinding Algorithm.

AStar Demo Applet - Version 2

Post a Comment ... (0 Comments)

Aug
20
Written by Neil Galloway

This is the most realistic computer animation of a human that I have seen yet. Usually, you can tell that they are not real, but the animation is impressive nonetheless.

This is a whole new ball game. Check out this computer generated human animation video.

Post a Comment ... (0 Comments)

Jun
12
Written by Neil Galloway

I recently had the error "iTunes has detected an iPod in recovery mode - Use iTunes to restore" whenever I would try to synch my iPod. It was driving me nuts. And even when I would restore it, I would get the same error continually. The message wouldn't go away.

After reading some different articles, including this iPod Recovery Mode on from Apple, I found a solution.

I had a USB card reader for my SD card that was causing some errors. I pulled out the card reader and rebooted my laptop. Afterwards, everything was fine. I still had to recover my iPod, but it synched everything back on and worked just like befoer.

Post a Comment ... (3 Comments)

Jun
06
Written by Neil Galloway

A friend of mine the other day had their hard drive approaching death. It was grinding away and had a number of errors occurring. It was time to replace it.

After picking up a hard drive that was almost double the size, he gave it to me as I offered to install it.

There are two main things you need to do when upgrading or replacing your hard drive:

  • Installing the drive.
  • Copy over your data.

Installing the drive is the easy part. Just open up the case, find a spot that is available and the data and power cables can reach the drive from there. Plug everything in, turn on the computer and make sure it can detect the drive.

Duplicating Data From Hard Drive to Hard Drive

I had done this a few times before with Norton Ghost, but I couldn't find a trial copy that would let me do it. It was time to look for something else.

I ended up downloading the basic version of HDClone. A free piece of software that does the trick.

Basically, you just download it and unzip it. There is an executable in the folder that when you run it, lets you create a floppy boot disk with the right programs on it.

I created my boot disk, put it in the PC I wanted to dupe the drive on and started it up. It brings you into the duplication program and after that it is just simple. Pick your source drive, your target drive, select the default options, and let it run.

When you are done, it will have duplicated the drive image onto your new drive.

When I started up the computer again, everything was like it was before. Unfortunately, the drive size was the same, even though the new drive had a much larger capacity. I then went in and created a new partition for the remainder of the drive and gave it a drive letter.

Post a Comment ... (0 Comments)

May
01
Written by Neil Galloway
 

I have been writing demo applications using OpenGL recently in C++. I documented how to set up the environment and create a project in my article OpenGL and Visual Studio Express 2008. I started out by writing the application as a Win32 application. This was a problem though.

When you are doing it in a Win32 project instead of a Win32 Console project it makes it very hard to do simple debugging using print statements. If you are like me, I like to scatter prinf or cout statements through different parts of my code so I can trace the progress and examine variables during development. It makes it very easy.

If you use these statements in a Win32 project however, this output does not get printed out to the console or anywhere for that matter. It is just eaten and no errors are incurred.

My Solution to Logging On Win32 Projects

The correct solution, which I didn't do, is to create a logging interface. Either create a separate dialog window that you can write your statements to or have it write to a file. This way, you might be able to cover off your logging system at the same time (if your application needs it).

What I actually did was another story. I switched my project to a Win32 console application. This gives you just the regular main method for your application and dumbs it down a bit. You also don't need to include the windows.h header file. The catch is that you must use the OpenGL Utility Toolkit ... glut to create your windows for drawing your OpenGL demos in. I wrote about it in my OpenGL and Visual Studio Express 2008 tutorial.

Post a Comment ... (4 Comments)

Apr
09
Written by Neil Galloway

While writing my OpenGL and Visual Studio Express 2008 article, I had a number of times where I wanted to include source code or error logs from the compiler. These are large sections of code that I want to display exactly as they printed out.

The problem with HTML, is that browsers will not render consecutive spaces, line breaks, and other information unless it is written as an HTML tag. So it doesn't look the same as you typed it in. It won't keep the text formatting in HTML.

I found a solution to the problem however...the pre tag. Just encapsulate your text with this and it will display exactly how you want it. Multiple spaces, new lines, and whatever else. The pre tag will preserve text formatting for you!

One problem I found is the the pre tag would not word wrap or line wrap by default. This can be fixed in your CSS style sheet for the page.

This link is where I found the solution: Forcing Long Text Lines To Wrap.

This is the code I added to my CSS file to make it work:

pre {
white-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */
white-space: -pre-wrap; /* Opera 4 - 6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) http://www.w3.org/TR/css3-text/#white-space */
word-wrap: break-word; /* IE 5.5+ */
}

Try it out for yourself to see how well it works.

Post a Comment ... (2 Comments)

Apr
08
Written by Neil Galloway

I recently set up Visual C++ 2008 Express Edition and OpenGL on my Windows XP and Windows Vista computers. I had a few issues, but it is working now. I have a step by step tutorial below and also outlined some of the issues I had.

This is also a guide on just setting up your development environment on Windows for OpenGL programming. If you are like me, I am starting out doing game programming and want to add OpenGL graphics.

The OpenGL tutorials I am using are from NeHe's Website and here is a Visual C++ 2008 and OpenGL Guide I used.

Getting OpenGL to Work With Visual C++ 2008

Follow each step, unless you have already done one of these steps.

1. Install Visual C++ 2008 Express Edition

This is a free C++ IDE from Microsoft that is an excellent tool to start with, if you are interested in programming on a Windows environment.

You can find Visual C++ 2008 on the Visual Studio Express download page on Microsoft's site. It only works on Windows XP and up. If you have an older version of windows you might want to find Visual C++ 2005 and then use this Visual C++ 2005 and OpenGL tutorial.

2. Install Windows SDK for Windows Server 2008 and .NET Framework 3.5

This is the equivalent to the Windows� Server 2003 SP1 Platform SDK that Visual C++ 2005 users installed. It contains the main OpenGL libraries. You can download the Windows SDK for Windows Server 2008 and .NET Framework from the Microsoft website.

The installation will take a little while.

Dell Canada Inc

3. Install the GLUT Libraries

These are additional libraries that come in handy down the road. Some code samples you find may use them, so I find it best to just have them around right off the bat.

GLUT itself is a bit old, but there is another one called freeglut that is a little more actively maintained. I install both of them. Download freeglut from the freeglut SourceForge page. I download the original GLUT from Nate Robins' site.

For both downloads, unzip them and do the following:

  1. Copy all the .h files into the C:\Program Files\Microsoft SDKs\Windows\v6.1\Include\GL folder. This should be glut.h, freeglut.h, freeglut_ext.h, and freeglut_std.h.
  2. Copy all the .lib files into the C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib folder. This should be freeglut.lib and glut32.lib.
  3. Copy all the .dll files into the C:\Windows\system32 folder. This should be freeglut.dll and glut32.dll.

4. Create Your First Project

Create a project in Visual C++ with whatever name you like and set the template as Win32 Project. Click OK.

Click Next on the following screen and you will be taken to Application Settings. Check on Empty Project and then click OK. Your new project has been created.

Declare the dependencies for your project.

  1. Click on Project -> [project name] Properties.
  2. Expand Configuration Properties.
  3. In the Configuration dropdown, select All Configurations.
  4. Select Linker -> Input.
  5. In the Additional Dependencies field, enter in GlU32.Lib OpenGL32.Lib freeglut.lib glut32.lib. Then click OK.

5. Create Your First Source File

I recommend a .cpp file. I recommned downloading the source code from NeHe's Lesson 2 and copying into the file you just created.

Press F7 to compile it and F5 to run it.

It should be working at this point. If not, post a comment and I will try and help out.

Problems Setting Up OpenGL and Visual C++ 2008 Express Edition

Character Set Error

When I try to compile the project, I get the following error:

------ Build started: Project: Test, Configuration: Debug Win32 ------
Compiling...
main.cpp
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(87) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [29]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(92) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [34]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(99) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [31]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(105) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [24]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(109) : error C2664: 'UnregisterClassW' : cannot convert parameter 1 from 'const char [7]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(111) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [28]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(147) : error C2440: '=' : cannot convert from 'const char [7]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(151) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [37]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(169) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [94]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(176) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [24]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(209) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [7]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(212) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [23]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(241) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [34]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(248) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [35]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(255) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [27]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(262) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [37]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(269) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [41]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(281) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [23]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(358) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [42]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Build log was saved at "file://c:\Documents and Settings\Neil Galloway\My Documents\Visual Studio 2008\Projects\Test\Test\Debug\BuildLog.htm"
Test - 19 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

This can be fixed by doing the following:

  1. Project -> [projectname] Properties
  2. In the Configuration dropdown, pick All Configurations.
  3. Expand Configuration Properties.
  4. Select General.
  5. Change the Character Set to be Use Multi-Byte Character Set.

The errors should go away the next time you compile.

Can't Include glaux.h

The first time I compiled, I received the following error:

------ Build started: Project: Test, Configuration: Debug Win32 ------
Compiling...
main.cpp
c:\documents and settings\neil galloway\my documents\visual studio 2008\projects\test\test\main.cpp(12) : fatal error C1083: Cannot open include file: 'gl\glaux.h': No such file or directory
Build log was saved at "file://c:\Documents and Settings\Neil Galloway\My Documents\Visual Studio 2008\Projects\Test\Test\Debug\BuildLog.htm" Test - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

This is because the glaux.h has not been added to the include folder. You can do this if you want, but the glaux.h library is old and out dated based on most user comments on the internet. A lot of the examples, especially from NeHe, do not even use the code inside it anymore. I can usually just comment out or remove the

#include 
from the code and it will be fine.

Set Up Dependencies For The Project

When the dependencies are not there, I received the following error trying to compile:

------ Build started: Project: OpenGLTest, Configuration: Debug Win32 ------
Compiling...
WinMain.cpp
Compiling manifest to resources...
Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
Copyright (C) Microsoft Corporation.  All rights reserved.
Linking...
WinMain.obj : error LNK2019: unresolved external symbol _gluPerspective@32 referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glLoadIdentity@0 referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glMatrixMode@4 referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glViewport@16 referenced in function "void __cdecl ReSizeGLScene(int,int)" (?ReSizeGLScene@@YAXHH@Z)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glHint@8 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glDepthFunc@4 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glEnable@4 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glClearDepth@8 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glClearColor@16 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glShadeModel@4 referenced in function "int __cdecl InitGL(void)" (?InitGL@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glEnd@0 referenced in function "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glVertex3f@12 referenced in function "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glBegin@4 referenced in function "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glTranslatef@12 referenced in function "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__glClear@4 referenced in function "int __cdecl DrawGLScene(void)" (?DrawGLScene@@YAHXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__wglDeleteContext@4 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__wglMakeCurrent@8 referenced in function "void __cdecl KillGLWindow(void)" (?KillGLWindow@@YAXXZ)
WinMain.obj : error LNK2019: unresolved external symbol __imp__wglCreateContext@4 referenced in function "int __cdecl CreateGLWindow(char *,int,int,int,bool)" (?CreateGLWindow@@YAHPADHHH_N@Z)
MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup C:\devkitPro\projects\OpenGLTest\Debug\OpenGLTest.exe : fatal error LNK1120: 19 unresolved externals Build log was saved at "file://c:\devkitPro\projects\OpenGLTest\Debug\BuildLog.htm" OpenGLTest - 20 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

To set up OpenGL dependencies for a project, refer to the declaring the dependencies section in Create You First Project section above.

That should fix the problem, try recompiling now.

Change the Application Type

I have also experienced the following error when I compile:

------ Build started: Project: OpenGLTest, Configuration: Debug Win32 ------
Linking...
MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
C:\devkitPro\projects\OpenGLTest\Debug\OpenGLTest.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\devkitPro\projects\OpenGLTest\Debug\BuildLog.htm"
OpenGLTest - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

This was caused by not picking the right application type when I created the project. In this example, I chose Win32 Console Application at the startup. To change it, I did the following:

  1. Click on Project -> [project name] Properties.
  2. Expand Configuration Properties.
  3. In the Configuration dropdown, select All Configurations.
  4. Select Linker -> System.
  5. Change the Subsystem field to be Windows (in the case it was Console or try the opposite if it already is Windows). Click OK.

Post a Comment ... (117 Comments)

Page 2