Advertisement

Getting started

Started by March 11, 2005 11:50 AM
8 comments, last by Drew_Benton 19 years, 8 months ago
I am a highly educated programmer (Assembly, C++, Basic, etc.) but I have never done any sort of visual programming before. My professor (I am a super senior computer engineering student at FSU) gave me the task of building a 3D physical model of something he is working on. While I am sure I will be coming back to this site for help along the way, I need some help, well, getting started. I attempted to build lesson 1 in Microsoft Visual C++ 6.0 but it gives me 16 linking errors. I assume the code is bug free.. what am I missing? Thanx for taking the time to help a n00b like me.
I have EXACTLY the same problem. Please help.
E-mail:bielsio4@poczta.onet.pl
Advertisement
You will need to link in the correct libraries:
opengl32.libglu32.lib
That should do it for lesson 1. This can also be done with this hack:
#pragma comment( lib, "opengl32.lib" )#pragma comment( lib, "glu32.lib" )
I used to always suggest using the pragma comment version, but as of recent I learned how bad it is to do that. You see, when you mix libraries, using hte pragma comment means will not work 100% of the time, so you must add the libraries in the project settings. Since you are just doing lesson 1, it's fine to do that though.

If that does not sovle your problems, you will need to paste the error messages so we know what the problem is. This was just a shot in the dark response, since you didn't tell us what the errors were.

- Drew
it's probobly something simple, like forgeting to link the OpenGL32.lib, GLu32.lib files into the project
Still two errors left... .
Quote: Original post by Anonymous Poster
Still two errors left... .


How about you post them so we can help you? Surly being a "highly educated programmer" you know of all the possibilities there are for things to go wrong [wink]
Advertisement
ummm I'm not the one who said only two errors left. However here are the two errors:
IBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Lesson1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

[Edited by - Insane_Wanderer on March 11, 2005 1:25:17 PM]
you have created a console app which expects there to be a function
int main(int argc, char * arg[])

the code you have is for a windows app which has function

int WinMain(...)

create new project make it a Win32 App (not console) and move all your code to that project
Thank you so much! Normally I would have had no idea what you just said, but I took this class on writing operating systems and... wow all I studied was linux, didn't know windows was so similar.
Quote: Original post by Insane_Wanderer
ummm I'm not the one who said only two errors left. However here are the two errors:
IBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Lesson1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.


Appologies then [embarrass]. Figured GD logged you out when you posted as it has been doing quite so recently...

This topic is closed to new replies.

Advertisement