Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6704 Discussions

fatal error LNK1000 to link iPP 7.0.6.278 static library with Generate debug info option

Jongan888
Beginner
539 Views

When I'm using VC++ 6.0 to link iPP 7.0.6.278 static library with Generate debug info option, it report fatal error LNK1000. But disable the option to link again, it link well. Why? and How to solve the problem if I need use static library and debug my application simultaniusly?

0 Kudos
14 Replies
SergeyKostrov
Valued Contributor II
539 Views

When I'm using VC++ 6.0 to link iPP 7.0.6.278 static library with Generate debug info option, it report fatal error LNK1000. But disable the option to link again, it link well. Why? and How to solve the problem if I need use static library and debug my application simultaniusly?


LNK1000 - Unknown error; consult documentation for technical support options

VC++ 6.0 is a legacy C/C++ compiler and some problems could be expected because IPP 7.x static
libraries could be created with some modern C/C++ compiler.

Iwould try:

- Service Packs 5 or 6 for Visual Studio 98
- to compile, link and debugthe code with some modern C/C++ compiler, for example, Visual Studio 2005
( just for verification! )

Would you be able to attach a simple Test-Case witha static library you're using? I have a Visual Studio 98 SP5 and I could do some tests.

Best regards,
Sergey

0 Kudos
Jongan888
Beginner
539 Views
Thank you Sergey,

But yes, I'm using the Visual Studio 6.0 Service Pack 5. And I do some research about this static library, I found that there is .debug$S section in the library but no .debug$F followed. So I think it's the problem to produce LNK1000 error.
0 Kudos
Gennady_F_Intel
Moderator
539 Views
Please see into documentation the official system requirements for the IPP 7.0:

IA-32 for Microsoft* Windows* Compiler Compatibility

  • ..........
  • Microsoft Visual Studio* 2010
  • Microsoft Visual Studio* 2008
  • Microsoft Visual Studio* 2005
that's mean this versions of IPP were validated with these versions of Microsoft Compiler ...
and correspondingly IPP's libraries were build by one of the latest Intel Compiler (v.12.*) too.

--Gennady
0 Kudos
SergeyKostrov
Valued Contributor II
539 Views
Please try to search the web with "LNK1000 Visual Studio 98" expression. Here are two links from the top:

http://support.microsoft.com/kb/948127
http://archive.msdn.microsoft.com/KB948127

Unfortunately, they describe problems with Visual Studio 2008.

1. Could you try to change '/INCREMENTAL' to '/INCREMENTAL:NO'?

2. Could you try to install SP6 for Visual Studio 98? ( There is a little hope that it will fix the problem ).

By the way,a Linker version installed with VS98on my test laptop is 6.00.8447.

Best regards,
Sergey
0 Kudos
Jongan888
Beginner
539 Views
Dear Sergey,

Thank you for your help, and I solve the problem finally. Just like I said that there are .debug$S section but not seen .debug$F section after, and I write a small program to modify .debug$S section to .data section, and everything is allright. It build well, and I can turn on Generate debug info option and also /INCREMENTAL. And no need to use higher modern compiler or linker just VC++ 6.0 SP5. Thanks again.

Best Regards,
Andy
0 Kudos
Jongan888
Beginner
539 Views

PS. Because of this research, I wrote a program can Compact my static library atfer link iPP static library, because just link iPP static library is too large.

Before Compact is 108MB
After Compact is 1.61MB

0 Kudos
SergeyKostrov
Valued Contributor II
539 Views

I don't use a static linking but I think developers who use the static linking ofIPP libraries could be
interested to learn more about the problem. You stated that:

...I write a small program to modify .debug$S section to .data section...

Do you mean that your 'small program'opened a static library file in a 'binary' mode and chaged all
'.debug$S' expressions to '.debug$F'? Is that correct?

Best regards,
Sergey

0 Kudos
Jongan888
Beginner
539 Views
Dear Sergey,

I'm sorry for answering your question so lately, and opened a static library file in a 'binary' mode is corret, and changed all '.debug$S' expressions to '.data' of IMAGE_SCN_CNT_INITIALIZED_DATA|IMAGE_SCN_ALIGN_16BYTES|IMAGE_SCN_MEM_READ|IMAGE_SCN_MEM_WRITE(0xC0500040) characteristics. I think that correct method is insert a '.debug$F' section after '.text' section, but it'll correct all sections which relate with these section's number.

Best regards,
ANdy
0 Kudos
SergeyKostrov
Valued Contributor II
539 Views
Thank you, Andy!

I understood that your modifications are related toa 'Characteristics' member of IMAGE_SECTION_HEADER structure (declared inWinNT.h header ).

...
typedef struct _IMAGE_SECTION_HEADER
{
...
DWORD Characteristics;
} IMAGE_SECTION_HEADER;
...

and some functions fromImageHlp or DbgHlp APIhave beenused.

Best regards,
Sergey
0 Kudos
igorastakhov
New Contributor II
539 Views
Hi, format of objects anddebug information changed with transition to MS VS 2005 - it's know fact - objects contain additional binary records (Safe SEH, security cookies, etc.) that can't be recognized by the old linker version.

Regards,
Igor
0 Kudos
Jongan888
Beginner
539 Views
Dear Igor:

Yes, you're right butI just need a static library including iPP to link with my old program in Visual C++ 6.0. TheiPP static library does have security cookies, but can write a empty code to link with.Just replace the section talked before and LNK1000 Error is disappear(Generate debug info option is on). Attach a ijl20l.lib below which you can try to link with Visual C++6.0.

Best Regards,
Andy
0 Kudos
igorastakhov
New Contributor II
539 Views
Andy,

the approach you use is the hackers' one - it will not work correctly for all intended cases of library use - the official way is to use a patch from Microsoft - just install http://support.microsoft.com/kb/949009 and you'll be able to use old linker version with the latest IPP libraries

Regards,
Igor
0 Kudos
Jongan888
Beginner
539 Views
Dear Igor,

I take a lookat the link http://support.microsoft.com/kb/949009and it just fix VS2005 SP1 not Visual C++ 6.0, and download the files in the page then installedbut it appeared installation error. Beacuse I didn't install VS2005, the installer cannot find VS2005 to patch. I know that my approach is not very correct, but I cannot let Intel to release the iPP static librarycompatible with Visual C++ 6.0. So It's the shortcut to solve the problem, isn't it?

Best Regards,
Andy
0 Kudos
SergeyKostrov
Valued Contributor II
539 Views
Quoting igorastakhov
Andy,

the approach you use is the hackers' one - it will not work correctly for all intended cases of library use - the official way is to use a patch from Microsoft - just install http://support.microsoft.com/kb/949009 and you'll be able to use old linker version with the latest IPP libraries

Regards,
Igor


I also couldn't find an update or a fix for VS98. Regarding a link provided by Igor. This is what it says:

...
You must have Visual Studio 2005 SP1 installed to apply this hotfix.
...

If Andy's fix works for him this is a great thing even if itlooks like a hack ( and really is! ).

Best regards,
Sergey

0 Kudos
Reply