Stubborn Unresolved External Symbol Problem.

Hello Folks:
   Developing on Win8.1 Pro, Visual Studio 2010, C++, WIN32 no MFC.  
   Here is a weird one.  I must be doing something really stupid.  
   I've been adding code to a massive project for years.  It was 100,000 lines of code when I checked a couple of years ago, and is growing.  
   The application's static library has over 200 ".cpp" source files, not counting the headers.  It also relies upon a similar number of source modules from static libraries used by other applications.  
   Yesterday builds started generating this error, formatted to make it easier to understand:
3>tfa.obj : error LNK2019: unresolved external symbol "
bool __cdecl run_contact_import_from_menu(
struct HWND__ *,
struct HWND__ *,
class PROCESS_RECORD *,
class TFA_THREAD_CRYPTO_RECORD *,
class TFA_THREAD_CRYPTO_RECORD *,
class botan_utilities::EAX_CTR_THREAD_CRYPTO_RECORD *,
class TFA_MAIN_WINDOW_CONTEXT *,
class std::basic_string<char,
struct std::char_traits<char>,
class std::allocator<char> > *)"
   I tried a few things.  When I commented out the call to run_contact_import_from_menu() the application built without a problem.  
   I wasn't even working on that part of the application.  
The usual solution:
   I've seen unresolved external symbol errors before of course.  It usually means I've changed the function's arguments without updating the function's forward declaration in a header, and I haven't updated a call to the function elsewhere
in the code.  The first thing I did was copy the interface from the function's definition in a "cpp" file:
bool run_contact_import_from_menu(HWND hdlg,
HWND change_alert_source_window_handle,
PROCESS_RECORD *process_record_ptr,
TFA_THREAD_CRYPTO_RECORD *tfa_thread_crypto_ptr,
TFA_THREAD_CRYPTO_RECORD *tfa_thread_financial_crypto_ptr,
EMAIL_THREAD_CRYPTO_RECORD *tfa_thread_email_crypto_record_ptr,
TFA_MAIN_WINDOW_CONTEXT *main_window_dialog_context_ptr,
std::string *message_string_ptr)
replaced it in the header file, and added a ";" to make it a forward declaration.  
   Same error.  
   EMAIL_THREAD_CRYPTO_RECORD is botan_utilities::EAX_CTR_THREAD_CRYPTO_RECORD:
   From the email thread's header:
      typedef botan_utilities::EAX_CTR_THREAD_CRYPTO_RECORD EMAIL_THREAD_CRYPTO_RECORD;
   For testing, I slapped that typedef in front of the function's forward declaration and the function's definition.  Compiles fine, same link error.  
This seems to be the only unresolved external
   After #ifdef-ing out the call to this function, this application with it's thousands of calls to thousands of different functions built just fine, and ran as expected.  
Is the module's C++ file being processed?
   This function isn't being found in tfa_contact_import.cpp, where it lives.  What happens when I comment out other function definitions in this C++ file?  
   Now I get a whole bunch of "error LNK2019: unresolved external symbol" errors.  Other functions in that file are being referenced, and found.  And missed if they are absent.  
   Is it positional?  run_contact_import_from_menu() is the first function defined in the file.  Moving it to the end of the file gets me the same error.  
   I create a new C++ file with the "Add New Item" to the app's library, just for this function.  Same error.  
   I change the function's name to "run_contact_import_from_menu_x".  New name, same error.  
   I'm missing something really basic, really obvious.  Can someone tell me what it is?  
      Thanks
      Larry

Thanks Igor:
   For some reason my first reply to your post went missing. 
   No problem.  I didn't understand the dumpbin options when I posted it. 
   So now I have an output of dumpbin run with the /SYMBOLS option. 
   It's pages and pages of stuff.  The decorated names I've seen so far seem to be the function names followed by "@" signs and other text, so I think I can identify the functions. 
   The unresolved external function name, "run_contact_import_from_menu" is nowhere to be found in any text of the dumpbin output.  The second function in the source, "populate_individual_contact_import_vector" can be found
at 9 places in the output, as part of these decorated names. 
   Another function in the same .cpp file was also represented in the dumpbin output. 
   I have some obligations tonight.  Tomorrow, Saturday, I'll try to create a stripped down version of the C++ file that I can present as both a source and dumpbin output in a form small enough to show here.  I don't know enough
about dumpbin to predict how successful that effort will be, but I can snip the source to the function interface definitions and return values. 
      Thanks
      Larry

Similar Messages

  • OCCI Link problem (Error LNK2019: unresolved external symbol) in VS2012

    Hi,
    I'm having a hard time with this. I'm trying to implement OCCI within my application. Error I'm getting is:
    Error     1     error LNK2019: unresolved external symbol "public: static class oracle::occi::Environment * __cdecl oracle::occi::Environment::createEnvironment(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,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@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0W4Mode@123@PAXP6APAX2I@ZP6APAX22I@ZP6AX22@Z@Z) referenced in function "private: bool __thiscall ServerDataLoader::getPreSuffixesFromDB(void)" (?getPreSuffixesFromDB@ServerDataLoader@@AAE_NXZ)     P:\code\VizTool\VizPortal\DwgDgnConverter\ServerDataLoader.obj     DwgDgnConverter
    Error     2     error LNK1120: 1 unresolved externals     P:\code\VizTool\VizPortal\Debug\DwgDgnConverter.exe     1     1     DwgDgnConverter
    Yes, it looks like linking problem,...but for me everything seems set-up.
    - Included header files (from instantclient-sdk-windows.x64-11.2.0.3.0.zip)
    - Included library path from OCCI download (11.2.0.3.0)
    - Added oraocci11d.lib in linker
    Please, what am I doing wrong?
    Millions of thanks for any kind of feedback ;-)

    Have you succeeded? I tried vs2012 and it passed compilation, but gave the run-time error of _crtisvalidheappointer. But the same code runs well with vs2010. I think Oracle needs to publish the new patch for vs2012                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Unresolved external symbols when building release version of DLL

    I have C code which I use to build a DLL project.  I have used the same code to create this DLL project in several different solutions.
    I am trying to build it in a new solution, and can build the debug version, but I receive a bunch of unresolved external errors when I try to build the release version.
    I have painstakingly compared the project release properties with the debug properties, and with the release properties of the same project when I have included it in other solutions.  I can't find the problem.
    Here are a few of the errors:
    1>OLDNAMES.lib(access.obj) : error LNK2001: unresolved external symbol _access
    1>Cbase_filedir.obj : error LNK2001: unresolved external symbol __imp__strchr
    1>Cusage.lib(CusageWebLog.obj) : error LNK2001: unresolved external symbol __imp__strchr
    1>Cbase_filedir.obj : error LNK2001: unresolved external symbol __imp__fopen
    Any Suggestions?
    Mike

    Hi Mike,
    Thanks for posting in MSDN forum.
    1.Please check project properties->Linker->Additional dependencies has the same libs in both debug and release version. Maybe the lib you added in bebug version but not working in release version.
    2.Double check there is no code in something like that #ifdebug  ... #endif
    3.please use the same character set in your dll or the referenced lib. Both are unicode character set or multi-Bity.
    4.Please use the same Runtime library in your dll or the referenced lib. Both are C\C++->code generation->runtime library ->/MD or /MT
    Above are some general scenarios, hope this helps some.
    Best regards,
    Shu Hu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • C++ Kinect SDK: error LNK2019 unresolved external symbol

    I'm receiving the message "error: LNK2019" error when I attempt to run a basic C++ Kinect program.  I am running Windows 7 32bit with the Kinect SDK 1.0 and developing in Visual Studio 2010.  The included Skeletal Viewer sample works correctly,
    so I believe my problem lies in the project configuration.  I tried comparing my project config to the sample's, but I can't find any differences so I thought I'd open this up to the forums.  Is there any missing or incorrect information that I'm
    not seeing?  Or is there some other configuration I should be checking?
    Thank you in advance.
    #include "stdafx.h"
    #include <iostream>
    #include <windows.h>
    #include <NuiApi.h>
    #include <stdio.h>
    -- Include Directories: --
    $(VCInstallDir)include;
    $(VCInstallDir)atlmfc\include;
    $(WindowsSdkDir)include;
    $(FrameworkSDKDir)\include;
    $(KINECTSDK10_DIR)\inc;
    -- Library Directories --
    $(VCInstallDir)lib;
    $(VCInstallDir)atlmfc\lib;
    $(WindowsSdkDir)lib;
    $(FrameworkSDKDir)\lib;
    $(KINECTSDK10_DIR)\lib\x86;
     These are the specific errors I'm getting:
    1>kinectruntime.obj : error LNK2019: unresolved external symbol __imp__NuiImageStreamGetNextFrame@12 referenced in function _main
    1>kinectruntime.obj : error LNK2019: unresolved external symbol __imp__NuiImageStreamOpen@24 referenced in function _main
    1>kinectruntime.obj : error LNK2019: unresolved external symbol __imp__NuiInitialize@4 referenced in function _main

    Is kinect10.lib listed among the libraries in your project's properties, under Linker | Input | Additional Dependencies?
    If not, that is the likely cause for the errors.
    John
    K4W Dev
    That was it!  Thank you for the quick response and the clear directions.
    Since I see you're with Microsoft, I'd like to point out this step was missing from the set up instructions that come with the SDK installation.  This guide says to link kinect10.lib by linking
    $(KINECTSDK10_DIR)\lib\x86;  As we saw here, that's not quite the same thing!
    Programming Guide > Using Visual Studio > To Create an Unmanaged Application > Step #5

  • Unresolved external symbol __imp__JNI_CreateJavaVM@12 Under JDK 1.6

    I'm running on Microsoft Vista using VisualStudio 2008 to create a C++ program that starts a Java process through JNI. I'm using jdk1.6.0_13 which is currently the only JDK on my machine. I started with a very basic program to just boot strap the project, and immediately ran into an issue. I'm linking with the jvm.lib in the JDK lib directory, but I seem to still be missing the import reference for JNI_JavaCreateVM. Any idea why the linker can't pick up the reference?
    // Test2JNI.cpp : Defines the entry point for the console application.
    #include "stdafx.h"
    #include <jni.h>
    int _tmain(int argc, _TCHAR* argv[])
         JavaVM *jvm = NULL;       /* denotes a Java VM */
        JNIEnv *env = NULL;       /* pointer to native method interface */
        JavaVMInitArgs vm_args; /* JDK/JRE 6 VM initialization arguments */
        JavaVMOption* options = new JavaVMOption[1];
        options[0].optionString = "-Djava.class.path=lib/maxwell.jar";
        vm_args.version = JNI_VERSION_1_6;
        vm_args.nOptions = 1;
        vm_args.options = options;
        vm_args.ignoreUnrecognized = false;
        /* load and initialize a Java VM, return a JNI interface
         * pointer in env */
        jint result = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
        delete[] options;
        /* invoke the Main.test method using the JNI */
        jclass cls = env->FindClass("com.zenmonics.maxwell.Maxwell");
        jmethodID mid = env->GetStaticMethodID(cls, "main", "([Ljava.lang.String)V");
        env->CallStaticVoidMethod(cls, mid, 100);
        /* We are done. */
        jvm->DestroyJavaVM();
         return 0;
    Error
    1>------ Build started: Project: Test2JNI, Configuration: Debug Win32 ------
    1>Linking...
    1>Test2JNI.obj : error LNK2019: unresolved external symbol __imp__JNI_CreateJavaVM@12 referenced in function _wmain
    1>C:\Users\Owner\Business\Engagements\Zenmonics\Test2JNI\Debug\Test2JNI.exe : fatal error LNK1120: 1 unresolved externals
    1>Build log was saved at "file://c:\Users\Owner\Business\Engagements\Zenmonics\Test2JNI\Debug\BuildLog.htm"
    1>Test2JNI - 2 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    Link Line =
    /OUT:"C:\Users\Owner\Business\Engagements\Zenmonics\Test2JNI\Debug\Test2JNI.exe" /INCREMENTAL /NOLOGO /LIBPATH:"C:\Program Files\Java\jdk1.6.0_13\lib" /MANIFEST /MANIFESTFILE:"Debug\Test2JNI.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Users\Owner\Business\Engagements\Zenmonics\Test2JNI\Debug\Test2JNI.pdb" /SUBSYSTEM:CONSOLE /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:PROMPT jvm.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

    HI,
    I am facing the same problem.
    Still you can look at my output
    I look for Dir structure. Declared all Env Variables too. And yes I also specified the jvm.dll for it. But still error remains same.
    C:\Program Files\xerox\practice\devprac>"c:\Program Files\Microsoft Visual Studio 8\VC\bin\cl.exe" -I"C:\Program Files\Microsoft Visual Studio 8\VC\include" -Ic:\Softwares\JDeveloper\jdk\include -Ic:\Softwares\JDeveloper\jdk\include\win32 -I"C:\Program Files\Microsoft Visual Studio 8\VC\lib" -IC:\Softwares\JDeveloper\jdk\jre\bin\server\jvm.dll -LD devprac_Use5.c -Fedevprac_Use5.exe
    Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86
    Copyright (C) Microsoft Corporation. All rights reserved.
    devprac_Use5.c
    Microsoft (R) Incremental Linker Version 8.00.50727.42
    Copyright (C) Microsoft Corporation. All rights reserved.
    /dll
    /implib:devprac_Use5.lib
    /out:devprac_Use5.exe
    devprac_Use5.obj
    devprac_Use5.obj : error LNK2019: unresolved external symbol __imp__JNI_CreateJa
    vaVM@12 referenced in function _main
    devprac_Use5.exe : fatal error LNK1120: 1 unresolved externals

  • Unresolved external symbol _sqlglm

    Hi all
    I'm having trouble using Pro*C. I precompile the .pc file without problems but when I try to make the c file I get the error below:
    ora2c.obj : error LNK2019: unresolved external symbol sqlglm referenced in function sql_error
    ora2c.obj : error LNK2019: unresolved external symbol sqlgls referenced in function sql_error
    I have included sqlcpr.h in the code and it is in the directory I run the compile commands from.
    I think I am missing some libraries in my makefile?
    My makefile currently contains
    ORACLELIBS = C:\Oracle\product\10.1.0\Client\oci\lib\msvc\oci.lib
    link $(LFLAGS) -out:$*.exe $*.obj $(OBJS) $(ORACLELIBS)
    link $(LFLAGS) -out:$*.exe $*.obj C:\Oracle\product\10.1.0\Client\precomp\lib\oraSQL10.LIB
    link $(LFLAGS) -out:$*.exe $*.obj C:\Oracle\product\10.1.0\Client\precomp\lib\msvc\oraSQX10.LIB
    Could anyone tell me if there is another lib I need to include?
    Thanks in advance!

    Hi,
    orasql10.lib is what you want:
    C:\oracle\10.2\database\precomp\LIB>dumpbin /exports orasql10.lib | findstr /c:"sqlglm"
    sqlglm
    sqlglmt
    What's up with the 3 different link lines?
    Regards,
    Mark

  • Unresolved external symbol NumericArrayResize when compiling a DLL at x64 platform using vs2005

    I have a dll which is called by Labview through "Call Library Function Node". I want to port this dll to x64 platform from 32bit code which runs well at x86 computer. So, I download the Labview 8.5 evaluation version, replace the orginal referenced header file and library file in 32 bit code, such as extcode.h, fundtypes.h, labview.lib etc. Then I compile the code with Visual Studio 2005, error occurs when link "error LNK2001: unresolved external symbol NumericArrayResize". I don't know why because I really link library labview.lib. Can anyone help me?

    Please check the solution in this thread, this may help you solve your problem.
    http://stackoverflow.com/questions/925540/how-to-resolve-the-following-linker-errors-in-visual-studio
    If you still get the same problem after try the solution, please feel free and let me know.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • "error LNK2019: unresolved external symbol" help......!

    Hi, i'm still newbie with Oracle 10g and VC8. The problem is i found this LNK2019 error when build my project. Here the steps i take when run VC8 for the first time:
    (1). In PROJECT->PROPERTIES->CONFIGURATION PROPERTIES->C/C++->ADDITIONAL INCLUDE, i add the "C:\oracle\product\10.1.0\db_1\OCI\include"
    (2). In PROJECT->PROPERTIES->CONFIGURATION PROPERTIES->LINKERS->ADDITIONAL LIBRARY, i add the c:\oracle\product\10.1.0\db_1\OCI\lib\MSVC\vc8 (i've downloaded the OCI for vc8)
    (3). I make new project with 1 cpp page with this code:
    #include <iostream>
    #include <occi.h>
    using namespace oracle::occi;
    using namespace std;
    int main (void)
    Environment *env = Environment::createEnvironment();           
    (4).I compiled this code and succedded
    (5).I build this code and i get this error:
    ------ Build started: Project: Example, Configuration: Debug Win32 ------
    Linking...
    ok.obj : 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
    C:\Documents and Settings\Frederick\Example\Debug\Example.exe : fatal error LNK1120: 1 unresolved externals
    Build log was saved at "file://C:\Documents and Settings\Frederick\Example\Example\Debug\BuildLog.htm"
    Example - 2 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    I've tried everything i know. If someone have experienced this error, please let me know the solution. Thanks in advance...
    Frederick A

    I'm not very new to C++, but I'm new to Visual Studio and working with C++ in MS environment. I'm experiencing the same problem using
    Studio 2010 Microsoft Visual Studio 2010
    Version 10.0.30319.1 RTMRel
    Microsoft Visual C++ 2010 01021-532-2002102-70432
    Microsoft Visual C++ 2010
    On a Windows 7 Professional 64 bit OS connecting to a 11gR2 (64) database on the same system
    I've performed the exact steps in this post and I still receive the link error after performing all the steps identified with the exception that I performed them with respect to the 11gR2 libs & I'm using the libs / includes from this database's home.
    I'm sure that I'm missing something trivial, but I'm at a loss to determine what it is. Your assistance in these matters is greatly appreciated.

  • Error LNK2019: unresolved external symbol

    Hi there,
    I'm trying to instantiate a Factory object to then get a SchemaValidator from createSchemaValidator.
    Here's the code snippet:
    Tools::Factory<?, Element> *myFactory = new Tools::Factory<? ,Element>();
    SchemaValidator<Element> *mySchemaValidator = myFactory->createSchemaValidator(SchValidatorIdType::SchValCXml, NULL);
    Basically, I can't seem to find the right template argument which is supposed to be of type "Context" but I can't figure it out. I tried using "xmlctx" but that leads to the following compiling error:
    Error     106     error LNK2019: unresolved external symbol "public: class OracleXml::Parser::SchemaValidator<class Element> * __thiscall OracleXml::Tools::Factory<struct xmlctx,class Element>::createSchemaValidator(enum OracleXml::Parser::SchValidatorIdType,struct xmlctx *)" (?createSchemaValidator@?$Factory@Uxmlctx@@VElement@@@Tools@OracleXml@@QAEPAV?$SchemaValidator@VElement@@@Parser@3@W4SchValidatorIdType@53@PAUxmlctx@@@Z) referenced in function _main     TestCppXDK1.obj     
    I verified I linked my project to oraxml10.lib.
    Help?
    Thanks!
    Message was edited by:
    user617632

    I'm not very new to C++, but I'm new to Visual Studio and working with C++ in MS environment. I'm experiencing the same problem using
    Studio 2010 Microsoft Visual Studio 2010
    Version 10.0.30319.1 RTMRel
    Microsoft Visual C++ 2010 01021-532-2002102-70432
    Microsoft Visual C++ 2010
    On a Windows 7 Professional 64 bit OS connecting to a 11gR2 (64) database on the same system
    I've performed the exact steps in this post and I still receive the link error after performing all the steps identified with the exception that I performed them with respect to the 11gR2 libs & I'm using the libs / includes from this database's home.
    I'm sure that I'm missing something trivial, but I'm at a loss to determine what it is. Your assistance in these matters is greatly appreciated.

  • I'm getting this "error LNK2001: unresolved external symbol _niFgen_SendSoftwareTrigger@4" when I try to make any CNiFgen object.

    Hi, I have a working project that has a few classes using the NI5411 APIs and now I want to use CNiFgen classes. After adding Core Components(Advanced Analysis, Common) and NI Device Instrument Drivers(NiFgen) from the Measurement Studio Components Wizard. Even when I try to make an object of CNiFgen(CNiFgen cnf I get the following error:
    --------------------Configuration: puzzle - Win32 Debug--------------------
    Linking...
    NiFgenInterfaceD.lib(NiFgenImpl.obj) : error LNK2001: unresolved external symbol _niFgen_SendSoftwareTrigger@4
    Output/puzzle.exe : fatal error LNK1120: 1 unresolved externals
    Error executing link.exe.
    puzzle.exe
    - 2 error(s), 0 warning(s)
    My APIs version is working fine and so are these CNiFgen classes(I have tried then for a dummy project). But, things start getting nasty when I try to integrate them.
    Regards,
    Vaibhav.

    It looks like you have a typical linking error in VC++. Have you made sure that all of the necessary .lib files are properly linked to?
    Also, are you passing any data between your custom classes and the niFGEN classes? These will take different data types unless you have already type cast all of them to work properly together. If they don't share variables, you should be okay.
    Jack Arnold
    Application Engineer
    National Instruments

  • Linker error: error LNK2001: unresolved external symbol __imp_printf

    On a newly installed compiler, Visual Studio 2013, I get some linker error:
    Sample program (for test):
    #include <stdio.h>
    int main ()
    printf("Help");
    return 0;
    I get some linker errors:
    Error 2 error LNK2001: unresolved external symbol __imp_printf F:\ug_info\indices\Project1\Project1\Source.obj Project1
    Error 1 error LNK2001: unresolved external symbol __security_check_cookie F:\ug_info\indices\Project1\Project1\Source.obj Project1
    Error 3 error LNK2001: unresolved external symbol mainCRTStartup F:\ug_info\indices\Project1\Project1\LINK Project1
    I thinks there is a configuration issue..
    Any suggestions?

    Hi Camiel.Rys,
    Thanks for posting in MSDN forum.
    Error 3 error LNK2001: unresolved external symbol mainCRTStartup F:\ug_info\indices\Project1\Project1\LINK Project1
    I would guess that you may create a wrong project template. Could you try to create a new Win32 Console project following this document?
    Walkthrough: Creating a Win32 Console Program (C++)
    Best regards,
    Shu Hu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Unresolved external symbols when linking C++ with ni.4882.obj

    Moving from 32-bit XP to Windows 7 using Microsoft Visual Studio 2008 C++.  When linking with NI-488.2 version 3.0.2 I (ni4882.obj) get the following warning and errors:
    1>Linking...
    1>ni4882.obj : warning LNK4217: locally defined symbol _time64 imported in function time
    1>ni4882.obj : error LNK2019: unresolved external symbol __imp_rand referenced in function LoadFunction
    1>ni4882.obj : error LNK2019: unresolved external symbol __imp_srand referenced in function LoadFunction
    1>ATP.exe : fatal error LNK1120: 2 unresolved externals
    1>Creating browse information file...
    1>Microsoft Browse Information Maintenance Utility Version 9.00.21022
    1>Copyright (C) Microsoft Corporation. All rights reserved.
    Any ideas.
    Solved!
    Go to Solution.

    Hi Guys,
    I got this error too recently. Was troubling me a lot. I was using Windows 7 OS, Visual Studio 2010 compiler.
    The fix for this is pretty much straight forward and solution lies in the Project settings only.
    To my knowledge, with /MDd switch, it causes the compiler to place the library name MSVCRTD.lib into the .obj file.
    But with /MTd switch, This option just causes the compiler to place the library name LIBCMTD.lib into the .obj file so that the linker will use LIBCMTD.lib to resolve external symbols. For details, please refer to this MSDN article:
    https://msdn.microsoft.com/en-us/library/2kzt1wy3(VS.71).aspx
    Its very useful.
    Also
    MDd stands for Multi-threaded Debug DLL
    MTd stands for Multi-threaded Debug
    Thanks,
    Kiran

  • LNK2019: unresolved external symbol errors.

    I am new to JNI and I am experimenting with a C library we have. I could compile the java code and create the .h header file. When I tried to compile the .c file and generate a .dll file, i get the following link errors.
    cl -I:C:\projects\NewLogon -LD Logon.c -Felogon.dll -link /LIBPATH:"C:\projects\NewLogon\lib\"
    Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
    Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
    Logon.c
    Microsoft (R) Incremental Linker Version 7.10.3077
    Copyright (C) Microsoft Corporation. All rights reserved.
    /dll
    /implib:logon.lib
    /out:logon.dll
    /LIBPATH:C:\projects\NewLogon\lib
    Logon.obj
    Creating library logon.lib and object logon.exp
    Logon.obj : error LNK2019: unresolved external symbol SAPIHandleRelease referenced in function Java_Logon_logon@8
    Logon.obj : error LNK2019: unresolved external symbol SAPILogon referenced in function Java_Logon_logon@8
    Logon.obj : error LNK2019: unresolved external symbol SAPIHandleAcquire referenced in function Java_Logon_logon@8
    Logon.obj : error LNK2019: unresolved external symbol SAPIExtendedLastErrorGetreferenced in function Java_Logon_logon@8
    Logon.obj : error LNK2019: unresolved external symbol _SAPIInit referenced in fu
    nction JavaLogon_logon@8
    logon.dll : fatal error LNK1120: 5 unresolved externals
    I hope the syntax of the command is correct, if not, please let me know. All the unresolved methods are supposed to be in the library files (.lib) located in the "NewLogon\lib" folder. I am not positive about that assumption, is there a way to look at a .lib file and make sure that the methods are defined correctly?
    Any help is greatly appreciated and thanks in advance.
    Hugo

    I am having the same errors, can anyone provide some help with this?

  • LNK2019 unresolved external symbol issue

    Hello,
    i checked the thread https://social.msdn.microsoft.com/Forums/vstudio/en-US/11977b92-0077-4ff8-be36-e04e3f6c36aa/error-lnk2019-unresolved-external-symbol?forum=vcgeneral
    I added extern "C", but it still didn't work. 
    May i know how to fix it?
    /*++
    Copyright (c) Advanced Windows Debugging (ISBN 0321374460) from Addison-Wesley Professional. All rights reserved.
    THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
    KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
    PURPOSE.
    #include"stdafx.h"
    #include <windows.h>
    #include <stdio.h>
    #include <conio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <iostream>
    #include <memory>
    #include <process.h>
    #include <malloc.h>
    #include "menu.h"
    #include "debug.h"
    #pragma auto_inline(off)
    int CalledFunction1(int a){ return 1; }
    int CalledFunction2(int a, int b){ return 2; }
    int CalledFunction3(int a, int b, int c){ return 3; }
    int CalledFunction4(int a, int b, int c, int d){ return 4; }
    int CalledFunction5(int a, int b, int c, int d, int e){ return 5; }
    void try_except();
    class Global
    public:
    int m_ref;
    Global() :m_ref(1){};
    ~Global()
    m_ref = 0;
    } gGlobal;
    void RaiseBP()
    DebugBreak();
    void RaiseCPP()
    throw 0;
    void RaiseAV()
    WCHAR* invalidAddress = 0;
    *invalidAddress = 0;
    void RaiseStackOverFlow(__int64 limit)
    if (limit > 10) return;
    RaiseStackOverFlow(limit);
    void __cdecl RaiseStackOverFlowThread(void * threadParam)
    Sleep(1000);
    __int64 limit = (__int64)threadParam;
    RaiseStackOverFlow(limit);
    class KBTest
    int m_lastN;
    public:
    KBTest::KBTest()
    m_lastN = -1;
    virtual ~KBTest()
    #pragma optimize("y",off)
    static unsigned int __cdecl Fibonacci_fpo(unsigned int n)
    switch (n)
    case 0: STOP_ON_DEBUGGER; return 0;
    case 1: return 1;
    default: return Fibonacci_fpo(n - 1) + Fibonacci_fpo(n - 2);
    #pragma optimize("y",on)
    static unsigned int __cdecl Fibonacci_cdecl(unsigned int n)
    switch (n)
    case 0: STOP_ON_DEBUGGER; return 0;
    case 1: return 1;
    default: return Fibonacci_cdecl(n - 1) + Fibonacci_cdecl(n - 2);
    static unsigned int __fastcall Fibonacci_fastcall(unsigned int n)
    switch (n)
    case 0: STOP_ON_DEBUGGER; return 0;
    case 1: return 1;
    default: return Fibonacci_fastcall(n - 1) + Fibonacci_fastcall(n - 2);
    static unsigned int __stdcall Fibonacci_stdcall(unsigned int n)
    switch (n)
    case 0: STOP_ON_DEBUGGER; return 0;
    case 1: return 1;
    default: return Fibonacci_stdcall(n - 1) + Fibonacci_stdcall(n - 2);
    unsigned int Fibonacci_thiscall(unsigned int n)
    m_lastN = n;
    int localN = n + gGlobal.m_ref;
    switch (n)
    case 0: STOP_ON_DEBUGGER; return 0;
    case 1: return 1;
    default:
    return Fibonacci_thiscall(localN - 2) + Fibonacci_thiscall(localN - 3);
    extern "C"
    int Function5(int a, int b, int c, int d, int e);
    void Stack()
    wprintf(L"F (32) = %d\n", KBTest::Fibonacci_stdcall(32));
    extern "C"
    void Stack64()
    wprintf(L"%d\n", Function5(1, 2, 3, 4, 5));
    void StackObj()
    KBTest kbTest;
    wprintf(L"F (32) = %d\n", kbTest.Fibonacci_thiscall(32));
    void StackFPO()
    wprintf(L"F (32) = %d\n", KBTest::Fibonacci_fpo(32));
    void StackFast()
    wprintf(L"F (32) = %d\n", KBTest::Fibonacci_fastcall(32));
    void StackCdecl()
    wprintf(L"F (32) = %d\n", KBTest::Fibonacci_cdecl(32));
    void StackOverflow()
    _beginthread(&RaiseStackOverFlowThread, 0x1, NULL);
    _beginthread(&RaiseStackOverFlowThread, 0x1, NULL);
    _beginthread(&RaiseStackOverFlowThread, 0x1, NULL);
    _getch();
    void HandledAV()
    __try
    RaiseAV();
    __except (TRUE)
    void HandledBP()
    __try
    RaiseBP();
    __except (TRUE)
    void OutputDebug()
    OutputDebugStringA("Application ");
    OutputDebugStringW(L" running\n");
    OPTIONS options[] = {
    { L'1', L"To generate access violation exception", RaiseAV },
    { L'2', L"To generate breakpoint exception", RaiseBP },
    { L'3', L"To generate C++ exception", RaiseCPP },
    { L'4', L"To generate a standard stack", Stack },
    { L'5', L"To generate a standard call stack(x64)", Stack64 },
    { L'6', L"To generate a C++ call stack", StackObj },
    { L'7', L"To generate a Fast call stack", StackFast },
    { L'8', L"To generate a cdecl call stack", StackCdecl },
    { L'9', L"To generate a FPO call stack", StackFPO },
    { L'a', L"To generate a stack overflow", StackOverflow },
    { L'b', L"To generate a handled access violation exception", HandledAV },
    { L'c', L"To generate a handled breakpoint exception", HandledBP },
    { L'd', L"To check the exception chain", try_except },
    { L'e', L"To call OutputDebugString", OutputDebug },
    { L'x', L"To exit", NULL },
    int _cdecl wmain(ULONG argc, WCHAR* argv[])
    AppInfo appInfo = AppInfo(options);
    appInfo.Loop();
    return 0;
    Error is: 
    Error 1
    error LNK2019: unresolved external symbol _Function5 referenced in function _Stack64
    \ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.obj
    ConsoleApplication1
    Error 2
    error LNK1120: 1 unresolved externals
    \ConsoleApplication1\Debug\ConsoleApplication1.exe
    1 1
    ConsoleApplication1
    Cheers,
    Axel

    Hi Simon,
    i added extern "C" before all function5, but the error still persisted and error message is the same like:
    Error 1
    error LNK2019: unresolved external symbol _Function5 referenced in function _Stack64
    \ConsoleApplication1\ConsoleApplication1\ConsoleApplication1.obj
    ConsoleApplication1
    Error 2
    error LNK1120: 1 unresolved externals
    \ConsoleApplication1\Debug\ConsoleApplication1.exe
    1 1
    ConsoleApplication1
    /*++
    Copyright (c) Advanced Windows Debugging (ISBN 0321374460) from Addison-Wesley Professional. All rights reserved.
    THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
    KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
    PURPOSE.
    #include"stdafx.h"
    #include <windows.h>
    #include <stdio.h>
    #include <conio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <iostream>
    #include <memory>
    #include <process.h>
    #include <malloc.h>
    #include "menu.h"
    #include "debug.h"
    #pragma auto_inline(off)
    int CalledFunction1(int a){ return 1; }
    int CalledFunction2(int a, int b){ return 2; }
    int CalledFunction3(int a, int b, int c){ return 3; }
    int CalledFunction4(int a, int b, int c, int d){ return 4; }
    extern "C"
    int CalledFunction5(int a, int b, int c, int d, int e){ return 5; }
    void try_except();
    class Global
    public:
    int m_ref;
    Global() :m_ref(1){};
    ~Global()
    m_ref = 0;
    } gGlobal;
    void RaiseBP()
    DebugBreak();
    void RaiseCPP()
    throw 0;
    void RaiseAV()
    WCHAR* invalidAddress = 0;
    *invalidAddress = 0;
    void RaiseStackOverFlow(__int64 limit)
    if (limit > 10) return;
    RaiseStackOverFlow(limit);
    void __cdecl RaiseStackOverFlowThread(void * threadParam)
    Sleep(1000);
    __int64 limit = (__int64)threadParam;
    RaiseStackOverFlow(limit);
    class KBTest
    int m_lastN;
    public:
    KBTest::KBTest()
    m_lastN = -1;
    virtual ~KBTest()
    #pragma optimize("y",off)
    static unsigned int __cdecl Fibonacci_fpo(unsigned int n)
    switch (n)
    case 0: STOP_ON_DEBUGGER; return 0;
    case 1: return 1;
    default: return Fibonacci_fpo(n - 1) + Fibonacci_fpo(n - 2);
    #pragma optimize("y",on)
    static unsigned int __cdecl Fibonacci_cdecl(unsigned int n)
    switch (n)
    case 0: STOP_ON_DEBUGGER; return 0;
    case 1: return 1;
    default: return Fibonacci_cdecl(n - 1) + Fibonacci_cdecl(n - 2);
    static unsigned int __fastcall Fibonacci_fastcall(unsigned int n)
    switch (n)
    case 0: STOP_ON_DEBUGGER; return 0;
    case 1: return 1;
    default: return Fibonacci_fastcall(n - 1) + Fibonacci_fastcall(n - 2);
    static unsigned int __stdcall Fibonacci_stdcall(unsigned int n)
    switch (n)
    case 0: STOP_ON_DEBUGGER; return 0;
    case 1: return 1;
    default: return Fibonacci_stdcall(n - 1) + Fibonacci_stdcall(n - 2);
    unsigned int Fibonacci_thiscall(unsigned int n)
    m_lastN = n;
    int localN = n + gGlobal.m_ref;
    switch (n)
    case 0: STOP_ON_DEBUGGER; return 0;
    case 1: return 1;
    default:
    return Fibonacci_thiscall(localN - 2) + Fibonacci_thiscall(localN - 3);
    extern "C"
    int Function5(int a, int b, int c, int d, int e);
    void Stack()
    wprintf(L"F (32) = %d\n", KBTest::Fibonacci_stdcall(32));
    extern "C"
    void Stack64()
    wprintf(L"%d\n", Function5(1, 2, 3, 4, 5));
    void StackObj()
    KBTest kbTest;
    wprintf(L"F (32) = %d\n", kbTest.Fibonacci_thiscall(32));
    void StackFPO()
    wprintf(L"F (32) = %d\n", KBTest::Fibonacci_fpo(32));
    void StackFast()
    wprintf(L"F (32) = %d\n", KBTest::Fibonacci_fastcall(32));
    void StackCdecl()
    wprintf(L"F (32) = %d\n", KBTest::Fibonacci_cdecl(32));
    void StackOverflow()
    _beginthread(&RaiseStackOverFlowThread, 0x1, NULL);
    _beginthread(&RaiseStackOverFlowThread, 0x1, NULL);
    _beginthread(&RaiseStackOverFlowThread, 0x1, NULL);
    _getch();
    void HandledAV()
    __try
    RaiseAV();
    __except (TRUE)
    void HandledBP()
    __try
    RaiseBP();
    __except (TRUE)
    void OutputDebug()
    OutputDebugStringA("Application ");
    OutputDebugStringW(L" running\n");
    OPTIONS options[] = {
    { L'1', L"To generate access violation exception", RaiseAV },
    { L'2', L"To generate breakpoint exception", RaiseBP },
    { L'3', L"To generate C++ exception", RaiseCPP },
    { L'4', L"To generate a standard stack", Stack },
    { L'5', L"To generate a standard call stack(x64)", Stack64 },
    { L'6', L"To generate a C++ call stack", StackObj },
    { L'7', L"To generate a Fast call stack", StackFast },
    { L'8', L"To generate a cdecl call stack", StackCdecl },
    { L'9', L"To generate a FPO call stack", StackFPO },
    { L'a', L"To generate a stack overflow", StackOverflow },
    { L'b', L"To generate a handled access violation exception", HandledAV },
    { L'c', L"To generate a handled breakpoint exception", HandledBP },
    { L'd', L"To check the exception chain", try_except },
    { L'e', L"To call OutputDebugString", OutputDebug },
    { L'x', L"To exit", NULL },
    int _cdecl wmain(ULONG argc, WCHAR* argv[])
    AppInfo appInfo = AppInfo(options);
    appInfo.Loop();
    return 0;
    This testing code is for testing different scenario such like AV, breakpoint exception (for debug pratice).
    I compared other functions, which haven't any error and no need to decorate with extern "C".
    May i know the reason for that?
    Cheers,
    Axel

  • Unresolved external symbol _sqlcxt

    hello
    i was trying to compile Pro*C program on windows 7 professional 64 bit with visual studio, and I get the following error while linking library. Please help!
    envionment:
    windows 7 professional 64 bit
    Oracle Database 11g Release 2 Client (11.2.0.1.0) for Microsoft Windows (x64)
    visual studio(i tried both 2005 and 2008)
    error LNK2019: unresolved external symbol _sqlcxt referenced in function.
    error LNK2019: unresolved external symbol _sqlglm referenced in function.
    the program was compiled and worked on windows xp/oracle 9/visual studio 2005 just fine.
    Thanks in advance.
    Ivan

    try this:
    in the IDE go to project properties, configuration manager and create a new config for 64bit platform - I had exaqctly the same issue when porting existing code that runs fine using 10g lib but wouldn't find sqlcxt using 11g lib under win7 64 and vs2010 - changing platform to 64bit fixed it for me

Maybe you are looking for

  • How to find out open PO in SAP?

    Hi, I have a simple question? How to find out if the PO is open? Is there any field in any table in SAP which indicates this? Is there any report in SAP which gives list of all open PO in the system? Thanks, Pratik

  • FAQ: Can I delete photos that were added to GroupPix?

    FAQ: Can I delete photos that were added to GroupPix? Answer: Yes, the person that added a photo can also delete it. Additionally, the host of the event can delete any photo. Contributors cannot delete photos that other people took, however.

  • Help ! Acrobat Pro 9

    Bonjour à tous, J'ai un souci pour imprimer des fichiers PDF à partir de l'application QUARX XPRESS 6.1 depuis mon MAX OS X 10.6.2 avec l'application ACROBAT PRO 9. Dans la liste d'impression il m'indique : "error: error drawing page 1" Est-ce que qu

  • Set-HybridConfiguration showing error

    Hello, About my Environment: Single Virtual Machine (VM) in Windows Azure with following ports enabled for public and private. HTTPS TCP   443 LDAP TCP   389 PowerShell TCP   5986 Remote Desktop TCP   58142 SMTP TCP   25 OS: Windows Server 2012 R2 (D

  • How do I get a photo inside a custom shape in CS6

    How do I get a photo inside a custom shape in CS6...