Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom library usage in Visual C++

Status
Not open for further replies.

Axshun

Programmer
Feb 16, 2004
2
US
I made my own library of classes and they work fine in my program. The part I am wondering about is this: How do I get Visual Studio to auto-complete my code when using my library? For instance, I included the .h file and linked to the library, then created an object of that class in the program. When I type in 'Object.' it should come up with a list of class methods, but it doesn't. Anyone know how to get it to come up? Other than including the original .cpp & .h files for the library class in my project, I haven't been able to get the auto-complete to work.
 
Either include the files in the project. At least the .h files (the .cpp isn't really interesting from an auto complete point of view, right?).

Or, you can select Tools->Options->Directories->Source files to tell VC++ what directories IntelliSense (as it so marketingish is called) should look in.

/Per

"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."
 
Thanks. Adding the .h file works, but directing VC++ to the source folder doesn't work for some reason. That was the first way I tried it. I set up VC++ to look in both the include folder and the source folder, as well as the lib folder. There must be some way to do it though. Could it have something to do with precompiled headers? I added the .h file to my project, compiled it, then removed the .h file from the project, and the auto-complete still works. I should be able to just #include it and not have to add it to the project's files.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top