Archived

This topic is now archived and is closed to further replies.

xx0de

'unresolved external symbol'

Recommended Posts

*newbie* ''unresolved external symbol'' What does this depend on? I asked about it on a c++ irc channel, and they said that I should include a lib for it. Well, how do I know what lib I should include? I am trying to make a directx8 app, but this is c++ question so I posted it here instead. I am including a header file for direct input, and it asks about the library including "IID_IDirectInput8A" - where is it? How do I include these libs in MSVC6?

Share this post


Link to post
Share on other sites
You need to link external libraries to your project to compile with your program. I assume that you are using Visual Studio 6. To link libraries using that, while your project(and workspace since you probably only have one project under the workspace) is open go to the menu, project, settings, and user the link tab(you may have to scroll to the right to see it), there is a text box with a list of libraries. If you go to the end of this list, append(add) d3d8.lib and other libraries needed. I dont know what library Direct Input uses but whatever the header file is named, just change the .h to .lib and add it here. It probably will work.

"Ogun''s Laughter Is No Joke!!!" - Ogun Kills On The Right, A Nigerian Poem.

Share this post


Link to post
Share on other sites
Ebony Seraph gave you the answer.

Just incase you didn''t get it from that post, I''ll give you the step by step process:

When using library files, you have to do two things, first you have to make sure that VC++ will look in the directory where the library file is.

How you do this is go to Tools >> Options then select the "Directories" tab. For directX, you''ll need to add the lib folder that came with your directx SDK, it will be something like c:\MSSDK\LIB

I also recommend moving it to the top of the list. The reason for this is that VC++ will go with the first copy of the library file it finds. If you''re using a different version of the same lib, it will go with the one it finds first (starting at the top of the list).

Now that you''ve done this, you''ll never have to do it again. It will work with all of your projects. Your VC++ now knows where to look for your library files. Next, you just have to tell it what ones to use with your project.

First, open your project. Then go to Project >> Settings... Now go to the "Link" tab. In the project options box: enter the names of the library files you want your project to use.

Any directx program you do will need dxguid.lib so put that in there. Then just put in whatever goes with what you''re doing. Lets say you''re using direct draw and direct input... Then, add dinput.lib and ddraw.lib

Now theres one last thing, in the same box, check where it says "subsystem:" it will either be "subsystem:console" or "subsystem:windows" console means it''s an MSDos program, and windows means it''s a windows program.
DirectX is a windows api, so make sure its "subsystem:windows"

Thats all, it should compile now. If it doesn''t, send me an email. My email address is in my signature.




--Lowell N. Manners
lowell@makevideogames.com
MakeVideoGames.com

Share this post


Link to post
Share on other sites