News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

How to associate headers with libraries

Started by Storkman, December 10, 2005, 11:32:21 PM

Previous topic - Next topic

Storkman

Good evening...

I"m trying to compile some PSDK samples; and I had the hardest time figuring out which libraries I need to link to.  Going through the platform SDK docs could take a while.  Is there a list somewhere that associates the header file with the library that needs to be linked to?  I'm using the Visual C++ Toolkit 2003, but I suppose the question would arise for any compiler.

Thanks.

Michael

Hello,

May be the Code::Blocks SDK Reference Manual for 1.0 RC2 WIP (http://forums.next.codeblocks.org/index.php?topic=1358.0) could be of some help.

Michael
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

takeshimiya

Are you talking about MS Platform SDK or C::B SDK?
What do you want to compile?

Vampyre_Dark

Quote from: Storkman on December 10, 2005, 11:32:21 PM
Good evening...

I"m trying to compile some PSDK samples; and I had the hardest time figuring out which libraries I need to link to.  Going through the platform SDK docs could take a while.  Is there a list somewhere that associates the header file with the library that needs to be linked to?  I'm using the Visual C++ Toolkit 2003, but I suppose the question would arise for any compiler.
I think they all match up. mmsystem.h into mmsystem.lib and etc... If not, it's very easy to see just by browsing and seeing the matching names, like ~cmctrl.h ~cmctrlxx.lib for the common controls.
C::B Wishlist
~BOYCOTT THE EVIL YELLOW BOXES~

Storkman

Quote from: Vampyre_Dark on December 11, 2005, 05:49:15 AMI think they all match up.

Good afternoon...

Not exactly.  I mean some do, 1:1.  Others are pretty close, like commctrl.h to comctl32.lib.  But when headers are nested, i.e.: including windows.h includes winuser.h wihich is assoicated with user32.lib.  It's especially the last case that is troublesome.

Urxae

How about this: don't bother with libraries until you get a link error, then you look at http://www.google.com/search?q=site%3Amsdn.microsoft.com%20SOME_NAME, with SOME_NAME replaced by whatever symbol you got the error on. (Might want to strip any 'A' or 'W' at the end off though)
I think MSDN lists for every function in the PSDK what library is required... At least, I've never had any problems doing this and I don't even use MSVC :D.

tiwag

there is a thread regarding this in another forum, where they try to automate this task
http://smorgasbordet.com/phpBB2/viewtopic.php?t=391&highlight=hdr2lib

there you can download a list (csv file) of matching headers <==> libraries

but personally i find it convenient to have a look at http://msdn.microsoft.com (or your local installed PSDK )
to resolve linker errors.

Storkman

Quote from: tiwag on December 11, 2005, 07:33:24 PM
there is a thread regarding this in another forum, where they try to automate this task
http://smorgasbordet.com/phpBB2/viewtopic.php?t=391&highlight=hdr2lib

wow!  there's so much cool stuff on the net.  thanks for pointing this one out to me.

Quote from: tiwag on December 11, 2005, 07:33:24 PM
there you can download a list (csv file) of matching headers <==> libraries

i haven't found the link to the download yet, but i'll try again later when i have more time to really read through the whole posting.

Quote from: tiwag on December 11, 2005, 07:33:24 PM
but personally i find it convenient to have a look at http://msdn.microsoft.com (or your local installed PSDK )
to resolve linker errors.

yeah, i can see when developing my own stuff i'll have the PSDK docs open and i'll naturally just include, add the lib, then use the function/class/whatever...  but when trying to setup an environment to compile someone else's code, who either did not provide a projet or like in this case where no project exists for C::B it'd be handy to have a quick-ref table. 

if i come up with anything i'll post it - somewhere in the neighborhood.