library help

So I have been studying c++ for a couple of years now and think it is time to learn to build and use my own library file.

I am using vs2012. I basically want to make a simple test library to play with. Maybe one that only has one function that displays 'Hello world' for example.

If anyone could write a walk through on making a simple .lib file and then how to link to it and use it with vs2012, well I would be very glad. Thanks.
It's actually pretty easy.
Hope this helps.
Thanks guys, but no, I have already tried and failed with all the online tutorials. They seem to talk about command line tags and I don't even know if vs2012 has a command line. Or maybe I am too dumb to get it to work. I did build a .lib file. And when I try to use it I get all kinds of errors. I think maybe I built it wrong or maybe I just don't know how to link to it right...
Not sure about vs, but if you're willing to switch to codeblocks, it allows you to create library projects that just compile to libraries extremely easily.
I don't even know if vs2012 has a command line.

do you mean command line arguments?

Right-click on the project and select properties. You'll find the command arguments in the "Configuration Properties -> Debugging" section.
@mutexe Hmm, let me look into that. Maybe that helps.
Wait, I think I got it. If this works I am dancing!
Last edited on
It works!! Thanks to all for your patience and guidance.
Topic archived. No new replies allowed.