-
How to work with a .LIB in C++ (IDE:Visual Studio 6)
Hi all, I'm again here to ask help or informations!
I have to create a wrapper for a .lib using Visual Studio 6.
I have to do this cause the source of the lib use templates and Visual Studio 6 isn't able to manage them, and I can't use another IDE.
Here the questions:
1) I have the library created in Visual studio 2005, I haven't documentation about it, so what can I do?
2) How can I create a wrapper in C++ for it using Visual Studio 6? (the most important passes)
3) If I'll find the source, I have to read/study it to be able to create the wrapper?
4) In my C++ wrapper, I have to create methods that have the same names of the methods library?
i.e.:
in the library I have: GetImages(int x, int y);
if i want to use this method in my C++ wrapper, have to call: .....->GetImages(x,y);
-
-you can use the tools from visual 6 to get the info about the lib -- specifically dumpbin can tell you what is in the file to create a .h file
-It may be impossible to link a 2005 into a 6.0 due to formatting issues (I dont know!) or even because if 6.0 cannot handle templates you cannot reference the lib properly
-with the source it will be easier
- actually I think you can rename them if you use raw hex jump points, but this is harder, do not do it... use the original names.
all I can say is try it and see. If you have 2005 perhaps make a single function simple lib file and try to call it in 6.0 and see if it is even possible before you go deep down a path that cannot be.
-
It may be impossible to link a 2005 into a 6.0 due to formatting issues (I dont know!) or even because if 6.0 cannot handle templates you cannot reference the lib properly
I'll try and I'll tell here ;)
-
Sorry again for this question:
but HOW can I use the library??
For example I open the project properties and in the "Linking" tab (or where??) I have to add: mylib.lib!
We assume that in this .lib I have a method called: isFlat();
What do I have to write in my .cpp file to use that method??
-
you add the .lib to the project and the associated .h as well (or # include it or both).
Then, if it links up, you just call the functions. (thats how in .net, some compilers make this an ordeal)
you can also do it with a pragma comand or something but that is ugly and hard to find in the code.
-
I asked a wrong question, sorry!!
I have the source of .lib (now) but Visual Studio 6 can't manage it, because it has some problems to work with some templates.
I have to create a .h for that .lib, so both will be included in another project and can be used by the users.
Is it possible? How can I create the .h?
Last edited by Arkanops; 03-30-2007 at 03:21 AM.
-
the same .h that is in the source of the lib should work with the compiled lib file. If visual cannot process this file, I do not know how to tell you to create a working one.
Similar Threads
-
By agushary in forum ASP.NET
Replies: 2
Last Post: 09-22-2006, 05:57 AM
-
By jacky@ in forum Careers
Replies: 1
Last Post: 07-22-2006, 09:39 AM
-
By Gary Bronson in forum Web
Replies: 0
Last Post: 10-15-2001, 07:52 PM
-
By Jason Langston in forum Careers
Replies: 10
Last Post: 08-08-2000, 08:37 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks