How to force multiple symbol definitions and create output(a static lib) in VS2008 (64-bit release build)

Posted on 2008-10-01
Last Modified: 2013-12-14
I am trying to build a static lib and getting the following warning :
__NULL_IMPORT_DESCRIPTOR already defined.
This is because I need to use the other dependency libs while building this static lib. I want to ignore this warning and create the static lib. I am using VS2008. The debug build succeedes. But my release build is failing even if I give /igonre:4006. (This symbol definition is coming from some system libs which I can not modify and I need them)
Question by:Winsearch
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 31

Expert Comment

ID: 22651386
Hi Winsearch,

take a look at the accepted solution of - maybe this helps you to solve the problem ...

Hope that helps,

LVL 39

Expert Comment

ID: 22652550
Can you post all libs you were using?

I assume you have some 32bit libs involved where you definitively should use the 64bit version only.

Note, a static library must not necessarily link system libraries. It should be sufficient to link these libraries with the executable (dll or exe) that uses the static lib.

Author Comment

ID: 22657052
Thanks for the comments.
Only one lib is explicitely added, which is vssapi.lib(64-bit). None other is added as "dependency". Others are default ones that get linked. If I remove vssapi.lib, the lib gets created but the final DLL (which is linked with this static lib and vssapi.lib) does not get loaded.
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!

LVL 39

Expert Comment

ID: 22657872
>>>> but the final DLL (which is linked with this static lib and vssapi.lib) does not get loaded.

Can you show the errors? I assume it is (one of) the default libraries where there is a 32/64 bit conflict.

Author Comment

ID: 22662225
RegSvr32 Error is: "LoadLibrary Failed(<path>): The specified procedure could not be found"
The same DLL compiled as debug version (where vssapi.lib is directly linked with static lib) gets loaded properly.
LVL 39

Accepted Solution

itsmeandnobodyelse earned 125 total points
ID: 22664724
>>>> RegSvr32 Error

That isn't a linker error but a registration error. It means that *at runtime* one of the dlls which was dynamically loaded by means of LoadLibrary could not be found.

>>>> The same DLL compiled as debug version gets loaded properly.

Actually that proves nothing. The error either means that one of the dlls loaded dynamically was not available at all, e. g. you have only the debug version built *or* the release version could not be found (e. g. it was built in a different folder which was not part of the PATH environment variable) *or* the name of the release dll differs from that used with LoadLibrary.

Does your code contain any dynamically loaded dlls? Or is it a problem of the vssapi.dll where the release dll has a different name or was not stored in a folder whcih was part of PATH?

Author Comment

ID: 22707469
I found the wrong DLL (it was 32 bit) and it worked! Thanks for your help!

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from Go to that link and select download selenium in the right hand columnThat will then direct you to their download page.From that page s…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Suggested Courses

751 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