Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


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

Posted on 2008-10-01
Medium Priority
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.
Technology Partners: 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 500 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


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
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 column That will then direct you to their download page. From that p…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

705 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