Public Group

This topic is 3983 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

##### Share on other sites
I've run through the first I belive 21 NeHe lessons, and with a couple changes here and there, at the most, everything compiled in DevC++. Doesn't VC++ have a linker place you can use other than pragma comments? Here's what I use for linkers in opengl:
-lopengl32 -lglu32 -lglaux -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32

good luck. Hope this helps.

##### Share on other sites
Linker place? i dont know, 2bh i dont really know anything about the program as ive only started using it, those lines you added can they all be found in default directories?

i know of a directories part were you specifies place to link, if thats what you mean and ive included the directories that have openGL headers and libaries and it still doesnt work. do you use DevC++ then i take it? can you send me some of your modified code and ill see what VS says about that?

im pretty sure it must have something to with the way VS is set up at the minute, im also pretty sure that these errors wouldnt be here if i had the full version im pretty sure its microsofts way of saying yer we will give you the program for free but nothing under the sun will work in it unitill you sell your left kidney to buy the full suite

Thanks,

##### Share on other sites
Quote:
 im pretty sure it must have something to with the way VS is set up at the minute, im also pretty sure that these errors wouldnt be here if i had the full version im pretty sure its microsofts way of saying yer we will give you the program for free but nothing under the sun will work in it unitill you sell your left kidney to buy the full suite

Actually, I'm pretty sure you just didn't install everything properly.

Quote:
 1>LINK : fatal error LNK1104: cannot open file 'glaux.lib'

glaux, being largely an ancient piece of trash, does not come with the PSDK distribution of OpenGL. You'll have to find it elsewhere, use a replacement (I think NeHe's got one), or refactor your code to remove it.

Quote:
 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

Suggests you have an error leading the compiler to assume you are declaring a function when you are not. Possibly missing semicolons somewhere, et cetera, or missing types due to improperly configured headers.

Quote:
 error LNK2019: unresolved external symbol __imp__CoInitialize@4 referenced in function _WinMain@16

CoInitialize is in ole32.lib, are you linking with that (libraries to link with are specified via #pragma comment, or via the Project Options -> Linker -> Inputs section).

If you are linking with it, you didn't install and configure the Platform SDK properly, and you should go back and review the directions.

##### Share on other sites
Quote:

EDIT: Bah, too slow [smile]

##### Share on other sites
Quote:
 Original post by ChrisPepper19891>LINK : fatal error LNK1104: cannot open file 'glaux.lib'

So, obvious question. Do you have this file? Where is it located? (And do you need it? If not, don't link to it)

Quote:
 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

Which means there's a syntax error that should be fixed. The compiler thinks you're trying to declare a function without specifying its return type (which is illegal). Are you? If not, there's another error leading it to believe this.

Quote:
 error LNK2019: unresolved external symbol __imp__CoInitialize@4 referenced in function _WinMain@16

Which means it can't find the function. Most likely because some library isn't being linked in correctly.

Quote:
 now that particular error was in the case of a tutorial off my game dev disk!

What exactly is your game dev disk?

Quote:
 i get a variety of different errors so far nothing has even run in VS when i fix 1 error, that is apparently the last one it will either come up with another 60 or have 100 linker errors!

Which just means your fixing the first errors, have made further errors visible to the compiler. That's not a bad thing.

Quote:
 i never had this many problems in borland but i get the feeling that borland is more noobish friendly in comparison to VS C++.

More likely, the borland compiler just isn't very good at following the C++ standard. That's not noobish friendly, quite the opposite.

Either start from some simpler code, and get that working, or at least post your code so we can see it. It's a bit hard to tell you what you're doing wrong when we don't know what you're doing.

##### Share on other sites
Quote:
 Original post by ChrisPepper1989 im also pretty sure that these errors wouldnt be here if i had the full version im pretty sure its microsofts way of saying yer we will give you the program for free but nothing under the sun will work in it unitill you sell your left kidney to buy the full suite
Nonsense... Microsoft provides the best free IDE out there. It is absolutely fully functional--unless you need the professional features (which you probably don't)--and has no usage restrictions.

You just have to learn to use it. In addition to the info already linked, you should also know...

If you right-click on project and select "Properties", you can:

There is a lot of other stuff under that properties menu, also.

##### Share on other sites
ok thanks jpetrie, Spoonbender and Evil Steve ill start looking at those now!

to evil steve, originally i downloaded a different SDK and not that specific one, so ill try that and see were the other steps take me, im not looking forward to downloading another SDK but here goes anyway!

to jpetrie, yer but thing is i dont know what i did wrong, when asked i just insalled everything and it just never worked. yer i found the glaux fixer but wasnt really sure how to use it, im still a noob when it comes to these things! When i check out the int error it leads me to this line:
WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR, int nCmdShow) //i assume the problem is here as HINSTANCE, LPSTR dont name a variable
{ //and stops here
int loopRet;
and at the mo i dont have any pragma links! as i say im trying to get started using code already written on my gave dev tutorials, i supose i should just start from scratch really!

to Spoonbender, im guesing to not link to it you add its path in exclutions so ill try that. The game dev disk came with my book "OPENGL GAME programming" part of the "the premier press Game develpment series" by kevin hawkins and dave astle. Ie http://glbook.gamedev.net/oglgp.asp (if im allowed to do that)! And yer your ight, as i said above i should really just start from scratch again, i just cant bare the thought though :-(!! time to bite the bullet me thinks! yer i supose borland has just taught me bad habits and fooled me into thinking i can get away with alot of stuff!

To everyone THANKS FOR ALL YOUR HELP, i really do appreciate it! ill go away now download the SDK install it and start writing from page 1 of my book again, then post again with my progress! and if i have any errors with that code, ill post it, at the moment i keep trying to compile bits of old code and other peoples code just hoping to see something compile, which clearly isnt working so i should just bin all that!

Cya, time for me to start on the caffine!

##### Share on other sites
Quote:
Original post by smitty1276
Quote:
 Original post by ChrisPepper1989 im also pretty sure that these errors wouldnt be here if i had the full version im pretty sure its microsofts way of saying yer we will give you the program for free but nothing under the sun will work in it unitill you sell your left kidney to buy the full suite
Nonsense... Microsoft provides the best free IDE out there. It is absolutely fully functional--unless you need the professional features (which you probably don't)--and has no usage restrictions.

You just have to learn to use it. In addition to the info already linked, you should also know...

If you right-click on project and select "Properties", you can:

There is a lot of other stuff under that properties menu, also.

Ahhh thanks that will also be of help, so far ive just been going into tools->Options->Projects and solutions->VC++ directories. Which to be honest makes me fear that im screwing things up further! yer i gues im just a bit cynical about microsoft, we just generally dont seem to get along!

##### Share on other sites
I re-installed the SDK, which although it did nothing, at least now ive got the most up-to-date version! i re-liked all my lib and include folders which again did nothing but at least i knew enough about it to tidy the thing up! However it was Evil Steve's magic link to the steps on what to do, that solved the problem (you can now go into smug mode if you wish) particularly
Step 4: Update the corewin_express.vsprops file.
Step 5: Generate and build a Win32 application to test your paths.(update AppSettings.htm)

which i had no idea about! After this the flows of errors seemed to go away and i saw a magical thing! my first compilled program in VC++!!!!!! :-)!!!

i couldnt of done this without all your help, evil steves steps helped me configure it properly once and for all, the new SDK prompted me to relink all my directories and Glaux.lib was for some reason no longer linked! which i wouldnt of checked out if it wasnt for Spoonbender and jpetrie! i also have a nice way of linking extra files thanks to smitty1276! and thanks to brandonman for your advice i have a sneaking feeling that will come in handy! I would also like to say that if it wasnt for everyones input i wouldnt know that litle bit more about VC++ so now its a little less scary as i have a bit of a head start on things like general errors,linking and lib problems!

Thanks to everyone for your time and help on this post, i can finally program again!!!! i feel a bit of geek being so happy of that fact but sod it!!!
:-)

• 48
• 12
• 10
• 10
• 9
• ### Forum Statistics

• Total Topics
631374
• Total Posts
2999661
×