Solved

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

Posted on 2008-10-01
7
1,239 Views
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)
0
Comment
Question by:Winsearch
[X]
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
7 Comments
 
LVL 31

Expert Comment

by:Zoppo
ID: 22651386
Hi Winsearch,

take a look at the accepted solution of http://www.experts-exchange.com/Programming/Languages/C/Q_21669920.html - maybe this helps you to solve the problem ...

Hope that helps,

ZOPPO
0
 
LVL 39

Expert Comment

by:itsmeandnobodyelse
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.
0
 

Author Comment

by:Winsearch
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.
0
Industry Leaders: 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

by:itsmeandnobodyelse
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.
0
 

Author Comment

by:Winsearch
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.
0
 
LVL 39

Accepted Solution

by:
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?
0
 

Author Comment

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

Featured Post

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!

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…
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…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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…
Suggested Courses

617 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