?
Solved

linking library problem

Posted on 2006-03-25
9
Medium Priority
?
548 Views
Last Modified: 2013-11-17
I am using Borland C++ 5.02 and have problem to use uuid.lib
At link time it complains "Some invalid record in library 0x21?"
Any ideas?
0
Comment
Question by:serg111
  • 4
  • 4
9 Comments
 
LVL 9

Expert Comment

by:Cayce
ID: 16289798
Your uuid.lib must be a lib file for VisualC, you need to use the implib tool from Borland and create a correct one.
0
 
LVL 2

Author Comment

by:serg111
ID: 16290701
I know that I can use implib.exe to create uuid.lib from uuid.dll
but I cant find uuid.dll online.
Do you know where can I get one?
0
 
LVL 14

Expert Comment

by:cwwkie
ID: 16290889
If you have c++builder too, you can use the uuid.lib from there.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 2

Author Comment

by:serg111
ID: 16290956
I dont have it
0
 
LVL 14

Expert Comment

by:cwwkie
ID: 16291129
> I know that I can use implib.exe to create uuid.lib from uuid.dll
> but I cant find uuid.dll online.

uuid.lib is a static library, not a import library, so there is no uuid.dll

You might use this to create your own uuid.lib: http://svn.dsource.org/projects/bindings/trunk/uuid_obj.d
0
 
LVL 2

Author Comment

by:serg111
ID: 16291485
This file include

** Batch file to create uuid.lib **
dmd -c uuid_obj.d
lib -c uuid.lib uuid_obj.obj

There is no dmd under Borland 5.02

How can I create library?
0
 
LVL 14

Expert Comment

by:cwwkie
ID: 16291568
and the file is not c either. So you have to convert it.

For example the line
    const IID _DBBMKGUID = {0xB04B30F6, 0x88D1, 0xCD11, [0xAD, 0x48, 0x00, 0xAA, 0x00, 0x3C, 0x9C, 0xB6]};
would be something like:
    DEFINE_GUID(_DBBMKGUID, 0xB04B30F6, 0x88D1, 0xCD11, 0xAD, 0x48, 0x00, 0xAA, 0x00, 0x3C, 0x9C, 0xB6);

Instead of linking the uuid.lib file, you can also include the converted c++ file in your project.
0
 
LVL 2

Author Comment

by:serg111
ID: 16291634
Ok, now I am using it like this:

DEFINE_GUID(IID_IHTMLDocument2, 0x25442C33, 0xCB26, 0xD011, 0xB4, 0x83, 0x00, 0xC0, 0x4F, 0xD9, 0x01, 0x19);
m_hResult = m_pDispatch->QueryInterface(IID_IHTMLDocument2, (void**)&m_pHtmlDoc);

It does not complains about wrong library but gives linker error:
"Unresolved external _IID_IHTMLDocument2..."


It looks like microsoft uuid.lib contains something also beside GUID definition...
0
 
LVL 14

Accepted Solution

by:
cwwkie earned 500 total points
ID: 16293232
see http://www.michaelmoser.org/tip12.htm and http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q130869

There are two versions of the DEFINE_GUID macro. You need the other version. You need to include initguid.h.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question