Unresolved external 'JNI_GetDefaultJavaVMInitArgs' error

need help. i keep on getting
Error : Unresolved external 'JNI_GetDefaultJavaVMInitArgs' referenced from D:\NATIVES\JNATIVEIMP.OBJ
and
Error : Unresolved external 'JNI_CreateJavaVM' referenced from D:\NATIVES\JNATIVEIMP.OBJ
jnativeimp is the cpp file i'm using. i'm using the free borland compiler v5.5. jdk1.3.1_02
JDK1_1InitArgs vm_args; _
jint res; _
jclass cls; _
jmethodID mid; _
jstring jstr; _
jobjectArray args; _
char classpath[1024]; _
vm_args.version = 0X00010002; _
JNI_GetDefaultJavaVMInitArgs((void*)&vm_args); _
sprintf(classpath, "%s%c%s", vm_args.classpath, PATH_SEPARATOR, USER_CLASSPATH);
vm_args.classpath = classpath; _
res = JNI_CreateJavaVM(&jvm,(void**)&env,&vm_args); _

hi,
my code goes like this. i've already loaded the jvm.dll like what andrew said, but still getting the 'unresolved' error. i decided to just place jvm.dll in my current working directory. i think that shouldn't be a problem as long as its loaded and it did. what else have i missed out. pls help.
#include <stdio.h>
#include <stdlib.h>
#include <jni.h>
#include <windows.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifdef _WIN32
#define PATH_SEPARATOR ';'
#endif
#define USER_CLASSPATH "."
#define DOTRELEASE "1.4"
#define JRE_KEY "Software\\JavaSoft\\Java Runtime Environment"
main(){
HINSTANCE handle;
JNIEnv *env = NULL;
JavaVM *jvm = NULL;
JavaVMInitArgs vm_args;
JavaVMOption options[4];
jint res;
jclass cls;
jmethodID mid;
jstring jstr;
jobjectArray args;
char classpath[1024];
if ((handle = LoadLibrary("jvm.dll"))==0)
printf("unable to load jvm.dll\n");
} else {
printf("jvm.dll is loaded\n");
options[0].optionString = "-Djava.compiler=NONE";
options[1].optionString = "-Djava.class.path=c:\javanative";
options[2].optionString = "-Djava.library.path=c:\borland\bcc55\lib";
options[3].optionString = "-verbose:jni,class";
vm_args.version = JNI_VERSION_1_2;
vm_args.options = options;
vm_args.nOptions = 4;
vm_args.ignoreUnrecognized = JNI_FALSE;
res = JNI_CreateJavaVM(&jvm,(void**)&env,&vm_args);
if (res < 0){
printf("Can't create java VM \n");
exit(1);
........

Similar Messages

  • 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?

  • 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

  • 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 "unresolved external" error

      I have a large project written in straight C that Visual Studio 2013 (with a little forcing) compiles and runs without error.  I have written a C++ shell around it to create a new project.  Everything works except that I get
    the “unresolved external” error for every instance of my C-style declarations, i.e., where I declare a variable directly with first use, and forever thereafter declare it with the “extern” keyword. How (exactly) can I fix this?  

      I found the “unresolved external” problem.  What happens is that VS will not “port” an initial declaration in a .cpp file into a set of .c files (and vice versa) so when it hits my “extern” declarations in the set of .c files which I assumed
    would be associated with the initial declarations in the set of .cpp files in my .cpp shell, It thinks none of them has a legitimate initial antecedent.  Since I need only two .cpp files in the shell, this was easily fixed.  However, the project
    still won’t compile because I have apparently not set up my header files properly.  This results in hundreds of errors like the following, where VS attacks and rejects its own MS code:  “IntelliSense: declaration is incompatible with "double
    __cdecl acos(double _X)" (declared at line 474 of "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\math.h") c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\cmath.” I might eventually be able to “fiddle” my way to
    a solution, but any help would certainly be appreciated.

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • 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.

  • 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

  • C++ builder 6 unresolved external error loading a dll

    Im using LabVIEW 6.1 and i'm trying to export a DLL that performs math routines (such as FFT and stuff..) to include it im my BC#B6 project. I chose the C Calling convention (because the Standard Calling Convention cannot be converted by the Coff2omf.exe tool (to get rid of the 0x21 error)). Still, i now get the following linking error (it searches for an underscore before the first letter of my function):
    [Linker Error] Unresolved external '_calcul' referenced from E:\WORK\PROJECT\CALLINGFORM.OBJ
    for now i only have a simple "multiply by 2" function that takes an int and returns an int :
    int16 __cdecl calcul(int16 Input);
    I would like to know...
    1 - How to get rid of this problem - where is the source
    of the problem (application builder i guess)?
    2 - Will I have this problem if i link dynamically the driver?
    3 - do i need to link the Run-time engine dlls to make it work in both static and dynamic loading?
    Simon Lapierre
    [email protected]

    Hello Simon,
    Thank you for contacting National Instruments.
    When you created your DLL in LabVIEW, a LIB file should also have been created. To call the DLL in C#, make sure that you include the LIB file in C#.
    In answer to your questions:
    1. You can solve this problem by including the LIB file in C#.
    2. You will not have this problem if you dynamically link the driver.
    3. You do not need to link the Run-time engine DLLs to make it work in both static and dynamic loading.
    I hope this helps. Let me know if this does not solve your problem.
    Sean C.
    Applications Engineer
    National Instruments

  • Error 106 error LNK2019: unresolved external symbol

    Hi there,
    I'm trying to instantiate a Factory object to then get a SchemaValidator from createSchemaValidator in C++.
    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!

    yeah I checked it but it was set as you said. another interesting thing is I can access "pi" variable in math library. ex:
    double a= NI :: CNiMath :: Pi;
    but when I use
    NI::CNiMath::FFT(fftData,imgData);
    I get these errors
    mfc3 error LNK2019: unresolved external symbol "public: int __thiscall NI::CniDemo::Access(void)" (?Access@CniDemo@NI@@QAEHXZ) referenced in function "public: static enum NI::MathError __cdecl NI::CNiMath::FFT(class NI::CNiComplexVector &)" (?FFT@CNiMath@NI@@SA?AW4MathError@2@AAV?$CNiComple​xVector@N@2@@Z)
    mfc3 error LNK2019: unresolved external symbol "class std::auto_ptr NI::global_demo" (?global_demo@NI@@3V?$auto_ptr@VCniDemo@NI@@@std@@​A) referenced in function "public: static enum NI::MathError __cdecl NI::CNiMath::FFT(class NI::CNiComplexVector &)" (?FFT@CNiMath@NI@@SA?AW4MathError@2@AAV?$CNiComple​xVector@N@2@@Z)Message Edited by alperkal on 12-16-2005 06:00 AM

  • "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.

  • [need assistance​] error LNK2019: unresolved external symbol _CVIXMLLoa​dDocument

    I attempt to load an existing XML file and edit it with Microsoft Visual Studio 2008. Once I add the following function, I get the error LNK2019.
    CVIXMLDocument doc = 0;
    CVIXMLLoadDocument ("c:\\Temp\\AppTestCmd.xml", &doc); 
    1>01_cpp_list.obj : error LNK2019: unresolved external symbol _CVIXMLLoadDocument@8 referenced in function _main
    1>C:\sc\practice\01_cpp_list\Debug\01_cpp_list.exe : fatal error LNK1120: 1 unresolved externals
    I try to add the files and lib mentioned in the following link, but they do not help.
    http://forums.ni.com/t5/LabWindows-CVI/unresolved-​external-symbol-MSXML-IXMLxxx/m-p/1127380/highligh​...
    How can I fix it? Thanks!
    Here is the code piece. I have only one file in my MSVS project.
    ==================================================​==========
    #include <iostream>
    #include <cvixml.h>
    #include <msxmldom.h>
    #include <cvirte.h> // NI CVI
    #include <userint.h> // NI CVI
    #include <utility.h>
    using namespace std;
    int main ()
         CVIXMLDocument doc = 0;
         CVIXMLLoadDocument ("c:\\Temp\\AppTestCmd.xml", &doc);
         return 0;
    Solved!
    Go to Solution.

    Hi, 
    The link to the following include path has been added by two ways in Microsoft Visual Studio 2008.
    C:\Program Files (x86)\National Instruments\CVI2013\toolslib\toolbox
    (1) [menu bar, Tools -> Options -> Projects and Solutions -> VC++ Directories -> Include files
    (2) [menu bar, Project -> Configuration Properties -> C/C++ -> General -> Additional Include Directories
    "cvisupp.lib" and "cviwmain.lib" are added to linker input. I cannot find this one in my NI folders "cvirte.dll".
    In my MSVS project, add "cvixml.c" to the Source Files folder and "cvixml.obj" to the Resource Files folder.
    With the above settings, it ends up with the following compilation error.
    If we roll back to the initial code in the beginning of this discussion thread, we probably just miss one lib file or a few which contains CVIWindows XML function tree.
    ==================================================​=======
    1>------ Build started: Project: 01_cpp_list, Configuration: Debug Win32 ------
    1>Compiling...
    1>01_ni_xml.cpp
    1>cvixml.c
    1>c:\sc2\01_practice_template\01_cpp_list\cvixml.c(153) : error C2440: '=' : cannot convert from 'void *' to 'char *'
    1> Conversion from 'void*' to pointer to non-'void' requires an explicit cast
    1>c:\sc2\01_practice_template\01_cpp_list\cvixml.c(308) : error C2440: '=' : cannot convert from 'void *' to 'char *'
    1> Conversion from 'void*' to pointer to non-'void' requires an explicit cast
    1>c:\sc2\01_practice_template\01_cpp_list\cvixml.c(1488) : error C2664: 'MSXML_IXMLDOMNamedNodeMapGetlength' : cannot convert parameter 3 from 'int *' to 'long *'
    1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    1>c:\sc2\01_practice_template\01_cpp_list\cvixml.c(1534) : error C2664: 'MSXML_IXMLDOMNamedNodeMapGetlength' : cannot convert parameter 3 from 'int *' to 'long *'
    1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    1>Generating Code...
    1>Build log was saved at "file://c:\sc2\01_practice_template\01_cpp_list\01​_cpp_list\Debug\BuildLog.htm"
    1>01_cpp_list - 4 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped =========

  • 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.

  • Error LNK2019: unresolved external symbol GetBestRoute

    Hi all, a C++ beginner here. Basically I am trying to see if my network devices are connected to a specific ip address, without actually using sockets or the connect() function (due to project rules), and after thats done, I retrieve the MAC address
    of the device that is currently being connected.
    However I got this error while compiling my code.
    1>ATLProject1.obj : error LNK2019: unresolved external symbol _GetBestRoute@12 referenced in function "bool __cdecl getMacAddress(unsigned long)" (?getMacAddress@@YA_NK@Z)
    #include "stdafx.h"
    #include "resource.h"
    #include "ATLProject1_i.h"
    #include "Iphlpapi.h"
    using namespace ATL;
    class CATLProject1Module : public ATL::CAtlServiceModuleT< CATLProject1Module, IDS_SERVICENAME >
    public :
    DECLARE_LIBID(LIBID_ATLProject1Lib)
    DECLARE_REGISTRY_APPID_RESOURCEID(IDR_ATLPROJECT1, "{4C585367-A6D5-453D-AA45-3DC868030901}")
    HRESULT InitializeSecurity() throw()
    // TODO: CoInitializeSecurity を呼び出し、サービスのための適切なセキュリティ設定を指定します
    // 推奨 - PKT レベルの認証、
    // RPC_C_IMP_LEVEL_IDENTIFY の偽装レベル、
    // および適切な非 NULL セキュリティ記述子。
    return S_OK;
    CATLProject1Module _AtlModule;
    bool getMacAddress(IPAddr managercom)
    bool connection = false;
    PMIB_IPFORWARDROW routept = (PMIB_IPFORWARDROW)malloc(sizeof(MIB_IPFORWARDROW));;
    GetBestRoute(managercom,0,routept);
    //retrieving MAC address code will be added later
    return connection;
    int main(int argc, char *argv[])
    getMacAddress(INADDR_ANY);
    extern "C" int WINAPI _tWinMain(HINSTANCE /*hInstance*/, HINSTANCE /*hPrevInstance*/,
    LPTSTR /*lpCmdLine*/, int nShowCmd)
    return _AtlModule.WinMain(nShowCmd);
    Am I lacking something or are there some bad settings in my project?
    I am using Windows 7 and Visual Studio 2013, and created my code in ATL project.
    Any help and comments are appreciated. Thank you!!!

    Hi MrCapybara,
    Since you got this issue when compiling my code which seems that this issue is related to your project, and this forum is to discuss and ask questions about the
    Visual Studio Debugging tools, Visual Studio Profiler tools, and Visual Studio Ultimate IntelliTrace.
    For development issue about C++, I would recommend you post it in C++ forum to get dedicated supports, you could post another thread there.
    Regards. 
    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 _SDL_SetVideoMode

    I had included SDL2-2.0.3 and i have copied the .dll files and did all the setup for the sdl in the directories and linker, but i get these errors....
    error LNK2019; unresolved external symbol _SDL_SetVideoMode referenced in function _SDL_main
    error LNK2019; unresolved external symbol _SDL_Flip referenced in function _SDL_main
    error LNK2019; unresolved external symbol _SDL_WM_SetCaption referenced in function _SDL_main
    error LNK1120:3 unresolved externals
    any help? 

    SDL is not a Microsoft or standard library. You should check with people that know the library, but the errors make it look like you are omitting a .lib file.

Maybe you are looking for

  • [solved]script fails when changing profile through powerdevil.

    i use ondemand governor and i want to change up_threshold value. Whenever i change profile through powerdevil up_threshold gets its default vaule of 80. what i did was to create a script named threshold containing the lines: #!/bin/bash sudo sh -c 'e

  • Snow Leopard and Windows 7 networking - Can't see in Finder

    I have 6 Mac Pros all networked, and have just added 2 Windows 7 Ultimate computers. I have gone through the setup on all machines so that I SHOULD be able to see the Windows 7 machine in the finder, but I cannot. I have a folder on one of the Window

  • Recovery of reformatted external hard drive

    My kid accidentally plugged my external hard drive (which I use to back up my Think Pad laptop) to my new MacBook Pro and let Time Machine reformatted it to become my mac's backup disk. Now all data that I stored before in that external hard drive is

  • How to store / retrieve attachments?

    Hi Experts, I am sending message attachments to XI using ABAP Proxy program. The message itself has a number which identifies the attachment. My requirement is to store the attachment in some format in ABAP table. The is required because there is a w

  • Restoring failed: There is insufficient system memory in resource pool 'internal'

    Hi, I am going through all those similar questions but non of them solved my issue.  Our database is lost by mistake, now we need to recover the database from the backup. The backup file is 4.23 GB and when I am trying to restore the database after 4