Note that there are some explanatory texts on larger screens.

plurals
  1. POVisual Studio 2010: Linker > Command Line contains unneeded .lib
    primarykey
    data
    text
    <p>Similar problem to this: <a href="https://stackoverflow.com/questions/4569653/how-to-exclude-lib-file-from-linker-command-line-argument-in-vc">How to exclude .lib file from linker command line argument in VC++</a></p> <p>Basically I was doing a school assignment that requires my c++ program to call my oracle database. I was messing around with Oracle OCCI and set the libraries <strong>"oraocci11.lib" "oraocci11d.lib"</strong> to be included to all projects by default.</p> <p>I followed the settings that is explained <a href="http://thisthread.blogspot.com/2011/07/oracle-occi-for-visual-studio-2010.html" rel="nofollow noreferrer">here</a></p> <p>After which I tried to compile a sample project from the same source to test the OCCI and got an error like this:</p> <pre><code>error LNK2019: unresolved external symbol "public: static class oracle::occi::Environment * __cdecl oracle::occi::Environment::createEnvironment(enum oracle::occi::Environment::Mode,void *,void * (__cdecl*)(void *,unsigned int),void * (__cdecl*)(void *,void *,unsigned int),void (__cdecl*)(void *,void *))" (?createEnvironment@Environment@occi@oracle@@SAPAV123@W4Mode@123@PAXP6APAX1I@ZP6APAX11I@ZP6AX11@Z@Z) referenced in function _main </code></pre> <p>My default Linker > Command Line</p> <pre><code>/OUT:"C:\Users\Jem\Documents\Visual Studio 2010\Projects\sql\Debug\sql.exe" /INCREMENTAL /NOLOGO "msvcprtd.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" "oraocci11.lib" "oraocci11d.lib" /MANIFEST /ManifestFile:"Debug\sql.exe.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Users\Jem\Documents \Visual Studio 2010\Projects\sql\Debug\sql.pdb" /SUBSYSTEM:CONSOLE /PGD:"C:\Users \Jem\Documents\Visual Studio 2010\Projects\sql\Debug\sql.pgd" /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE </code></pre> <p>If you look at the above properties there this two libraries being included "oraocci11.lib" "oraocci11d.lib"</p> <p>I would like to remove those two off the Command Line but the option is in Read-Only.</p> <p>After being frustrated over the OCCI, I tried to make a simple program call main.cpp with just "int main() { return 0; }" inside. I build it and I get this</p> <pre><code>LINK : fatal error LNK1104: cannot open file 'oraocci11.lib' </code></pre> <p>I included the folders containing the libraries. This time, I get this</p> <pre><code>LINK : fatal error LNK1104: cannot open file 'msvcprtd.lib' </code></pre> <p>I have tried in my notebook and it worked fine. My notebook VS2010 is a fresh install of VS2010.</p> <p>So I figured it might be the command line since I have already excluded all the folders and libraries in the properties before I attempt to build with the first setting that returns the oraocci11.lib error.</p> <p>I have done all the possible solutions I have found online to no avail. I have tried to undo all the settings already (Directories and Additional Dependencies) Even installing and reinstalling my VS2010 wasn't helping. Please help.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload