Problem related to generation of header file

hi guys,
I am getting Exception during the generation of the header file,
using "javah -jni HelloWorld"
I am refering jni.pdf (java.sun.com/docs/books/jni/download/jni.pdf )
I have given that error below
Exception in thread "main" java.io.IOException: can't find class file HelloWorld.class in java.net.URLClassLoader
{urls=[file:/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre/lib/rt.jar],
parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:./],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}}
at gnu.classpath.tools.javah.Main.getClass(libgcj-tools.so.8rh)
at gnu.classpath.tools.javah.Main.run(libgcj-tools.so.8rh)
at gnu.classpath.tools.javah.Main.main(libgcj-tools.so.8rh)

ejp wrote:
GCJ is what you get in Linux (definitely Ubuntu anyway) as the default Java implementation.GCJ isn't a Java implementation at all, as you will discover when you read its documentation attentively. This is because it doesn't pass the Java certification tests. Ergo whatever it may be it isn't Java.
This is because of the license for Java not being compatible with the Ubuntu distro license.That may be so, or have been so, but it still isn't Java.I guess if you want to label it, it is the GNU Compiler for Java and associated runtimes. As an open source project for when Java licensing was not very compatible with Linux it served a purpose (even if it served it badly).
The following is from the GCJ web site. I guess they don't really claim to be 100% Java compliant.
GCJ is a portable, optimizing, ahead-of-time compiler for the Java Programming Language. It can compile Java source code to Java bytecode (class files) or directly to native machine code, and Java bytecode to native machine code.
Compiled applications are linked with the GCJ runtime, libgcj, which provides the core class libraries, a garbage collector, and a bytecode interpreter. libgcj can dynamically load and interpret class files, resulting in mixed compiled/interpreted applications. It has been merged with GNU Classpath and supports most of the 1.4 libraries plus some 1.5 additions.The first step for me with Linux was always to install the Sun JDK so never really found out how bad it really was :)
Cheers,
Shane

Similar Messages

  • Problem related to OSS Note - importing file problem

    Hi,
    I m facing an issue while implenting an oss note 430580 , i have to import files from sapserver.
    but i don't know how to do it.
    below is the description of my problem.
    Import the following files from SAPSERV:
    /general/R3server/abap/note.0430580/K000687.PLM
    /general/R3server/abap/note.0430580/R000687.PLM
    Import the two files into your system.
    For more information on SAPSERV, see Note 13719.
    Can any one tell me how can i get rid out of this prioblem.
    whether this is possible or BASIS Team can only do this.
    system details
    Operating system     SunOS
    Machine type         sun4u
    R/3 release 4.6C

    Well, these files are part of the zip.file which belong to the note. This is part of a regular transport and is normally done be basis. The data and the cofile (K....PLM & R...PLM) should be imported into your system. Before doing so they have to be transferred to the file server. Better let BASIS do these kind of things.

  • Problem in client generation from wsdl file

    Hi i am trying to generate client from a wsdl file through apache cxf framework, but it throws WSDLRefValidator error.
    Here is the error statment:
    Oct 11, 2012 11:51:33 AM org.apache.cxf.tools.validator.internal.WSDLRefValidator collectValidationPoints
    WARNING: WSDL document file:/D:/latestWS20120925/WebServiceTest26092012/WebContent/wsdl/PlmWebserviceImportGcas.wsdl does not define any services
    WSDLToJava Error:
    line 5 column 646 of file:/D:/latestWS20120925/WebServiceTest26092012/WebContent/wsdl/PlmWebserviceImportGcas.wsdl: cvc-complex-type.2.4.a: Invalid content was found starting with element 'WL5G3N0:definitions'. One of '{"http://www.w3.org/2001/XMLSchema":include, "http://www.w3.org/2001/XMLSchema":import, "http://www.w3.org/2001/XMLSchema":redefine, "http://www.w3.org/2001/XMLSchema":annotation, "http://www.w3.org/2001/XMLSchema":simpleType, "http://www.w3.org/2001/XMLSchema":complexType, "http://www.w3.org/2001/XMLSchema":group, "http://www.w3.org/2001/XMLSchema":attributeGroup, "http://www.w3.org/2001/XMLSchema":element, "http://www.w3.org/2001/XMLSchema":attribute, "http://www.w3.org/2001/XMLSchema":notation}' is expected.
    org.apache.cxf.tools.common.ToolException:
    line 5 column 646 of file:/D:/latestWS20120925/WebServiceTest26092012/WebContent/wsdl/PlmWebserviceImportGcas.wsdl: cvc-complex-type.2.4.a: Invalid content was found starting with element 'WL5G3N0:definitions'. One of '{"http://www.w3.org/2001/XMLSchema":include, "http://www.w3.org/2001/XMLSchema":import, "http://www.w3.org/2001/XMLSchema":redefine, "http://www.w3.org/2001/XMLSchema":annotation, "http://www.w3.org/2001/XMLSchema":simpleType, "http://www.w3.org/2001/XMLSchema":complexType, "http://www.w3.org/2001/XMLSchema":group, "http://www.w3.org/2001/XMLSchema":attributeGroup, "http://www.w3.org/2001/XMLSchema":element, "http://www.w3.org/2001/XMLSchema":attribute, "http://www.w3.org/2001/XMLSchema":notation}' is expected.
         at org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:203)
         at org.apache.cxf.tools.validator.internal.SchemaValidator.validate(SchemaValidator.java:119)
         at org.apache.cxf.tools.validator.internal.SchemaValidator.isValid(SchemaValidator.java:103)
         at org.apache.cxf.tools.validator.internal.WSDL11Validator.isValid(WSDL11Validator.java:157)
         at org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11.JAXWSDefinitionBuilder.validate(JAXWSDefinitionBuilder.java:204)
         at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:182)
         at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:142)
         at org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:300)
    The excerpt from wsdl file is provided below:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="PlmWebserviceImportGcas.wsdl" targetNamespace="D:/webservice">
    <wsdl:types>
    <xsd:schema xmlns="http://www.pg.com/css/webservice" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.pg.com/css/webservice">
    *<WL5G3N0:definitions xmlns="" xmlns:WL5G3N0="http://schemas.xmlsoap.org/wsdl/" xmlns:WL5G3N1="http://www.pg.com/Inputs/HubPollForTSStatusInput" xmlns:WL5G3N2="http://www.pg.com/Outputs/HubPollForTSStatusOutput" xmlns:WL5G3N3="http:/www.pg.com/productNet/HubSubmitForumlatoCSSInput" xmlns:WL5G3N4="http:/www.pg.com/productNet/HubSubmitForumlatoCSSOutput" xmlns:WL5G3N5="http://www.pg.com/Inputs/HubDeleteTSRequestInput" xmlns:WL5G3N6="http://www.pg.com/Outputs/HubDeleteTSRequestOutput" xmlns:WL5G3N7="http://www.pg.com/WS/FormulaHubWS" xmlns:WL5G3N8="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://www.pg.com/WS/FormulaHubWS">*
    <WL5G3N0:types>
    <xsd:schema xmlns="http:/www.pg.com/productNet/HubSubmitForumlatoCSSOutput" xmlns:CSS_SubmitFormulaOutput.xsd="http://pg.com/Inputs/CSS_SubmitFormulaOutput" xmlns:ns2="http://www.pg.com/Inputs/HubPollForTSStatusInput" xmlns:ns3="http://www.pg.com/Outputs/HubPollForTSStatusOutput" xmlns:ns4="http:/www.pg.com/productNet/HubSubmitForumlatoCSSInput" xmlns:ns5="http:/www.pg.com/productNet/HubSubmitForumlatoCSSOutput" xmlns:ns6="http://www.pg.com/Inputs/HubDeleteTSRequestInput" xmlns:ns7="http://www.pg.com/Outputs/HubDeleteTSRequestOutput" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.pg.com/WS/FormulaHubWS" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http:/www.pg.com/productNet/HubSubmitForumlatoCSSOutput">
                                  <xsd:import namespace="http://pg.com/Inputs/CSS_SubmitFormulaOutput"/>
                                  <xsd:element name="SubmitFormulatoCSSOutput">
                                       <xsd:complexType>
                                            <xsd:sequence>
                                                 <xsd:element ref="CSS_SubmitFormulaOutput.xsd:SubmitFormulatoCSS_Output"/>
    It seems to be problem with tag WL5G3NO declaration.
    Can anyone suggest how to rectify this?
    Thanks

    Have you tried pulling the schema out of the wsdl and putting it in a xsd file and see if it validates?
    Otherwise, have you tried removing the xmlns:"" from <WL5G3N0:definitions xmlns:"".
    Edited by: C.Stodden on Oct 11, 2012 8:52 AM

  • Header files  not being included in JNI

    I've written a java program which interfaces with some C code.In the c code i use certain functions which are defined in a header file that i include in the same c file.The problem i have ,is that the compiler shows an error when it comes across one of those functions.It seems to me that the header file is not being included.Here's what i've done at the start of the jni c code,any help will be greatly appreciated.
    #include<stdio.h>
    #include " mnt/cprog/ca.h"
    JNIEXPORT void JNICALL......
    Can other header files be included over here ,or do they have to be included from the java file?..but the problem there is that the header file is of .h extension.....any suggestions??
    ps..The os is Linux
    ..Derick

    If the header files are not found, the compiler will tell you. At least gcc does so. If only some functions you are using are missing, they are probably not in the header file you are including.
    By the way, there is no way to include headers for your native code through Java. What kind of mechanism should that be?

  • Problem related to PS CS6 ext. on Mac.  Nikon DSLR D610 raw file can not be opened

    Problem related to PS CS6 ext. on Mac. Installation is OK but I can't open picture from my Nikon D610 (Raw NEF format). I get a message "can not open this format ...". Checking Help menu to see if I miss an update the message I get is that I'm up-to-date but at the end Nikon D610 (format supported of course) files can not be opened . JPEG are OK but I work with raw files. Thanks

    What OS are you running: 10.x.x?
    What version of the Camera Raw plug-in do you have?  Do (About) Plug-ins / Camera Raw to find out.
    You need at least ACR 8.3 to open D610 files.  If the Help / Updates process does not work, then there is a manual install process you can do.  The page with the download is for when people accidentally updated to ACR 8.4 and need to roll back to ACR 8.3 due to their OS being incompatible, but the installer on that page works even if you haven’t erroneously updated to ACR 8.4:
    http://helpx.adobe.com/x-productkb/multi/camera-raw-84-support-policy.html

  • Problem while including the header file in C source code in CIN

    While Creating code interface node....
    In the C source code we are supposed to include the Header file "extcode.h".In my system i have installed
    Turbo C. I couldn't able to find the above header files.When i am trying to use the above header file i am getting error,what could be the reason

    Hi,
    You need to point your turbo C to ..\labview\cintools which is where you will find the extcode.h and other h file and also the lib file.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • STL map header file problem

    After having applied patch 107311-13, the compiler is reporting an error when I include the STL map header file. It is saying that the insert function is declared twice.
    When I compare the STL map header file with the version before the patch, I can see an additional declaration of the insert function which is identical to a previous declaration. To be able to generate my application, I had to replace the header file by the old version I kept aside.
    Does anyone have an idea?
    I am using compiler SC5.0 on a SunOS 5.7.
    Thanks.

    Hi All,
    I am facing the same issue: unable to save the mapconfig. The mapconfig dropdown list is empty after defining he mapviewer url and the geocoder url.
    Is this a bug? Any suggestions.
    - Tutorial: http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_58/jdtut_11r2_58_3.html
    - JDev: Studio Edition Version 11.1.2.1.0
    Build JDEVADF_11.1.2.1.0_GENERIC_110907.2314.6081
    Thanks
    Mike L

  • What's This Help not working for one entry in each header file

    I have a large RoboHelp project that I have imported into Version 8 from a previous version. Prior to the import into Version 8, all of the What's This Help in the project was working perfectly; now, post-import, I have a problem.
    Firstly, some background information.
    My project contains a large number of individual header (.H) files, one for each dialog within the software. These header files, which have been generated and provided by our developers, contain one entry for each field on the dialog to which the header file relates. The header files are all contained within a \HTML Topics\Fields\ folder (going from the root of my Help project).
    Each header file has a corresponding text (.TXT) file. These text files contain entries that correspond to the entries in the relevant header file. The text files are also contained within the \HTML Topics\Fields\ folder.
    Below is an example of the contents of a header file:
    #define IDH_HIERARCHY_APPEARANCE_HIEARCHY_LIST          16811
    #define IDH_HIERARCHY_APPEARANCE_ADD_APPEARANCE         16812    
    #define IDH_HIERARCHY_APPEARANCE_REMOVE_APPEARANCE      16813
    Below is the contents of the corresponding text file:
    .topic IDH_HIERARCHY_APPEARANCE_ADD_APPEARANCE
    Click this button to add a new row of hierarchical appearance settings to the grid.
    .topic IDH_HIERARCHY_APPEARANCE_HIEARCHY_LIST
    Use this grid to define hierarchy appearance settings. Each row in the grid represents a level of the hierarchy. For example, the appearance settings you define for the first row apply to the top level of hierarchy, the settings you define for the second row apply to the second level, and so on.
    .topic IDH_HIERARCHY_APPEARANCE_REMOVE_APPEARANCE
    Click this button to delete the selected row of hierarchical appearance settings from the grid.
    The What's This Help that was part of the original project still works perfectly. However, after upgrading the project to RoboHelp Version 8, I have had to update the project to reflect changes to the software. As part of this work, I have imported some new header files and updated some existing ones - and edited the corresponding text files accordingly.
    The What's This Help that is covered by the header files that I have imported since the upgrade to RoboHelp Version 8 does not work correctly; in each case, the What's This Help does not work for whichever field appears at the top of the appropriate text file. The position of the entry in the corresponding header file does not make a difference.
    If I manually edit a text file to move a different entry to the top then recompile the Help project, the What's This Help does not work for the field that now appears at the top of the text file - and the What's This Help for the field that used to appear at the top of the text file now works.
    I've tried everything I can think of to fix this, but nothing has worked. It seems as if there is a problem in the way RoboHelp is compiling the header and text files.
    If I use Microsoft HTML Help Workshop to decompile the CHM file, then view the contents of the resulting, decompiled text files, the affected files appear as follows:
    .topic IDH_HIERARCHY_APPEARANCE_ADD_APPEARANCE
    Click this button to add a new row of hierarchical appearance settings to the grid.
    .topic 16811
    Use this grid to define hierarchy appearance settings. Each row in the grid represents a level of the hierarchy. For example, the appearance settings you define for the first row apply to the top level of hierarchy, the settings you define for the second row apply
    to the second level, and so on.
    .topic 16813
    Click this button to delete the selected row of hierarchical appearance settings from the grid.
    Note how the entry at the top - which relates to the What's This Help that doesn't work - appears differently to the other entries which do work. The name of the ID appears after ".topic" rather than the appropriate ID number.
    Any help that anyone can provide me with would be very much appreciated.
    Thank you,
    Mark

    Its working now. We just kept trying to reinstall the tools and restarting indesign. On the 4th time the buttons started working. I can't explain why it finally worked, just that it is working now.

  • Shared library: function is not found and recognized in header file

    Hello,
    I am trying to use Java methods into LV. I am doing so by creating Java Invocation Interface, usind which I can call Java methods into C++ and then create a shared library that can be called into LV.
    When I am importing my shared library into Labview, I am getting the following error messages:
    The shared library contains 3 function(s). But no function is found and recognized in the header file. The following function(s) cannot be wrapped. If you want to import these functions, please review the warning messages next to the functions below. You will need to fix the problems before you can continue with the wizard.
    jclass invokeJavaClass(JNIEnv* jenv, string className);
    The following symbols are not defined:
    jclass;
    Undefined symbols can prevent the wizard from recognizing functions and parameters. To correct this problem, check the header file to determine if you must add preprocessor definitions. Click the Back button to return to the previous page of the wizard to add a preprocessor definitionsl (for example, "NIAPI_stdcall = __stdcall" or "NIAPIDefined = 1").
    The following header file was not found in the specified header file or one of the referenced header files:
    -  string
    -  iostream
    -  cstring
    -  jni.h
    To fix, click the Back button to go to the previous page and add the header file path to the Include Paths list.
     Please advise.
    Regards,
    H
    Attachments:
    SharedLibError.png ‏51 KB

    Hello Vivek,
    The LabVIEW dll that I am trying to import does not include any third-party device..all my code is fully based on LabVIEW. Maybe this helps you to guess what is happening: once I've parsed the dll' header appears an error
    like this one:
    void
    __cdecl Zdmt(LVBoolean *stop, double P, char channelName[],
        TD1
    *errorIn, TD14 *FFTOptions, TD12 *Calibration, char FileName[],
    int32_t minRecordLength, TD26 *InstrumentHandler, LVRefNum
    sessionRefArray[],
        LVRefNum *queueIN, TD1 *errorOut, LVBoolean
    *averagingDone,
        HWAVES LastRecordFetched, TD24 *Impedance, TD17
    *ColeColeCluster,
        TD18 *FFTcluster, TD5
    *InstrumentHandleOutputCluster, LVRefNum *queueOut,
        int32_t
    *Acquired, TD6 *FreqTimeInfoCluster, double *averagesCompleted,
    int32_t len);
    The following symbols are not defined:
    LVBoolean;
    int32_t; LVRefNum;
    Undefined symbols can prevent the wizard
    from recognizing functions and parameters. To correct this problem,
    check the header file to determine if you must add predefined symbols.
    Click the Back button to return to the previous page of the wizard to
    add a preprocessor definitionsl (for example, "NIAPI_stdcall =
    __stdcall" or "NIAPIDefined = 1").
    The following header file was
    not found in the specified header file or one of the referenced header
    files:
    -  extcode.h
    To fix, click the Back button to go to the
    previous page and add the header file path to the Include Paths list.
    I have replaced the first line #include "extcode.h" of
    the dll header file for #include "C:\Program Files\National
    Instruments\LabVIEW 8.6\cintools\extcode.h" that is the full path where
    the header file is located. However, new libraries seems to be missed:
    -  stdint.h
    -  MacTypes.h
    As far as I know,  Mactypes.h contains basic mac os data types and it doesn't have any relation with stdint.h...
    I have created both of them and stored into the same folder as extcode.h, but then other libraries are missed!!!
    Do you know if it would be possible to create the .dll generating all the header files associated for its data structures???
    And if this is not factible, then what do you suggest me? because I hope to not having to create all the header files until it stops giving me an error!
    thanks for four time,
    ben

  • Compiler appears to include .cpp source instead/addition to .h header file

    Numerous source files in our project depend upon unix/dcfPosixLocks.h and must be linked with the dcfPosixLocks.o that results from compiling unix/dcfPosixLocks.cpp. While all of these numerous sources files either directly or indirectly #include "unix/dcfPosixLocks.*_h_*" none of them ever #include "unix/dcfPosixLocks.*_cpp_*" (or any other non .h file for that matter). Yet, the C++ compiler incorrectly appears to include unix/dcfPosixLocks.cpp instead of (or in addition to) unix/dcfPosixLocks.h, for example when compiling dcfConstants.cpp (actual invocation and error below). Renaming unix/dcfPosixLocks.cpp to unix/dcfPosixLocks.c (or other names with C/C++ related file extensions) results in similar behavior. We first discovered this problem when we moved from a partially patched Studio 11 on Solaris 9 SPARC to an unpatched Studio 11 on Solaris 10 SPARC, i.e. it works fine on the old system. The problem remains after fully patching Studio 11 on Solaris 10 SPARC and even after fully patching Studio 12 on Solaris 10 SPARC. The implication is that one of the Studio 11 patches broke the C++ preprocessor and has of course been carried over into Studio 12. Since we use gmake to compile multiple sources concurrently, we ruled gmake out as a source of the problem by eliminating concurrent compilation (e.g. -j1 not -j2) and by tracing it to ensure that it was not deciding to compile unix/dcfPosixLocks.cpp (e.g. due to some implicit rule or something like that). Workaround #1, since the dcfConstants.cpp file contains no templates, is to separately preprocess and then compile, i.e. CC -E dcfConstants.cpp 1> .../dcfConstants.i and then CC -c dcfConstants.i -o .../dcfConstants.o. Of course, workaround #1 is dubious in general and completely unworkable where templates are involved. Workaround #2 is to move the unix/dcfPosixLocks.cpp file out of the include path (many of the directories in our include path contain both source and header files). Unfortunately, workaround #2 is problematic from a source control point of view... implies lots of source files being moved unnecessarily from one location to another to artificially distinguish them from header files, breaking historical chains in the process (granted, depends on the abilities of your source control software). Any thoughts or comments? We are hoping that somebody might be able to help us discover the errors in our ways, contribute additional workarounds, and/or confirm that this is in fact a compiler bug. I can try to provide more information as needed. Thank you in advance. -R
    /opt/studio11/SUNWspro/bin/CC -G -KPIC -w -mt
    -D_POSIX_PTHREAD_SEMANTICS -DCXX_SUNPRO -DDCF_NO_STD_MIN -g
    -D_DEBUG -DDCF_ASSERTIONS_ABORT -DDCF_DEADLOCK_ABORTS -DDC F_EXCEPTIONS_ABORT -I. -I/export/home/buildsys/src/build/tmp.3/dcf1/inc
    -I/export/home/buildsys/src/build/tmp.3/dcf1/platform/unix/solaris/inc
    -I/export/home/buildsys/src/build/tmp.3/dcf1/platform/unix/solaris/inc
    -I/export/home/buildsys/src/build/tmp.3/dcf1/platform/unix/inc
    -Iunix/solaris -Iunix
    -I/export/home/buildsys/src/build/tmp.3/dcf1/interfaces
    -I/export/home/buildsys/src/build/tmp.3/dcf1/platform/unix/solaris/interfaces.overlay
    -I/export/home/buildsys/src/build/tmp.3/dcf1/interfaces.overlay
    -c dcfConstants.cpp -o Debug/unix/solaris/dcfConstants.o
    "unix/dcfPosixLocks.*_cpp_*", line 72: Error:
    dcfLocks::oAtomicAccessToLong is initialized twice.
    "unix/dcfPosixLocks.*_cpp_*", line 103: Error:
    dcfMutexAttributes::pSingleton is initialized twice.
    2 Error(s) detected.
    gmake[2]: *** [Debug/unix/solaris/dcfConstants.o] Error 2
    gmake[1]: *** [all-r] Error 1
    gmake: *** [build] Error 2

    I'm having trouble understanding what change in Sun compilers or in Solaris could have resulted in the change in behavior you report.
    For template code, Sun compilers have always used the automatic inclusion model described in the C++ Users Guide section 5.2, "Template Definitions".
    Specifically, if you include a header foo.h that declares one or more templates, the compiler will automatically include foo.cpp (or foo.cc, foo.C, etc) if it needs a definition of one of those templates. That is, it assumes that template definitions missing from foo.h will be in foo.cpp.
    Does that answer your question?

  • Regarding Header file

    Hello
         I am developing the software related to the Ethernet for vc707 board but i am getting difficulty to select the header file,
         I got some demo code but confuse how they came to know about a particular header file is required for this, I have never 
         seen before these kind of library so please help me so i can choose the proper header file for the further development.
    Thanks & Regards
          Antriksh

    I had the same exception occur in my JNI code and I have some advice on things to look for.
    Symptoms: The C++ code runs fine when called in an native executable but when it is wrapped by a JNI call inside a DLL you get the following exception:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_STACK_OVERFLOW occurred at PC=0x100d72e5
    Function name=_chkstk
    The address will be different of course.
    In my tests I isolated the problem to an allocation of a char array like so at the top of one of my wrapped C++ methods:
    char buf[650000];
    As you see this code is requesting 650000 bytes of stack memory. When run in a native executable there was no problem but when I ran it wrapped in the JNI call it blew up.
    Conclusion: There is a much smaller stack space when using JNI OR the added overhead of my JNI wrapper exhausted the available stack space OR this is a stack space issue related to DLLs.
    Hope this helps. Anyone with insight on this please put in your 2 cents.

  • How to use preprocess​or directives (#define) in C++ header file with LabVIEW 8.2

    I have a C++ header file that contains around 2000 preprocessor directives:
    #define MEM_1   0xC
    #define MEM_2   0xD
    #define MEM_3   0x18
    I want to be able to "access" these memory offsets by identifier name (MEM_1) in my LabVIEW program like I would in a C++ program.  I do not want the overhead of parsing through the header file and storing all the offsets into an array or similar structure. 
    I've written a simple Win32 console program to return the memory offset given the identifier (see code below), and created a DLL to use with my LabVIEW program.  In the console program, you notice that I can call a function and pass in the identifer name, and get the offset back correctly:
    getOffset(MEM_1);
    In LabVIEW, I was hoping to be able to pass in the identifier (MEM_1) but was unsure what datatype to use.  In my C++ code, I defined the parameter as an int.  But in LabVIEW, I can't enter in MEM_1 as an int.   Can someone advise on how to do this?  Or if there is an alternate way to use #define's from external code inside LabVIEW?
    #include "stdafx.h"
    #include "scrmem.h"
    #include "stdio.h"
    void getOffset (int var);
    int _tmain(int argc, _TCHAR* argv[])
     getOffset(MEM_1);
    canf("%d");
     return 0;
    void getOffset (int var)
     printf("The address of MEM_1 is %x", var); 

    kaycea114 wrote:
    Hi,
    Where do you think I should use the string? 
    The way that getOffset is currently defined in the DLL, I have to connect an integer input into the LabVIEW function.  This prevents me from entering in: MEM_1 as the input to the LabVIEW function.
    Are you suggesting that I change getOffset to receive a String parameter ("MEM_1")?  Does that mean I need to do a string compare (line by line) through the header file to get the offset?  It seems like doing this search through the header file would degrade performance, but if that's the only work around, then I'll do it.
    Please advise.
    Well, what you want to do is indeed entering a string and getting back the assigned integer. That is what the C preprocessor is doing too although there it is done only once at the preprocessor stage of course and not at runtime anymore. But LabVIEW is not a C preprocessor.
    What you did so far seems to be to define getOffset() that accepts an enum that needs to be created from the C source code to then return the assigned constant. That's of course not very helpful.
    And writing a VI that could parse the C header file and create a name/constant array is really a lot easier than doing the same in C. You don't even need to parse the file each time again, but can instead cache them in an uninitialized shift register (LV2 style global).
    Even more easy would be to create from that data a ring control using property nodes and save it as custom control and voila you have the most direct lookup you can get in LabVIEW and it works just as comfortable as using the define in C code. It would mean that you need to seperate your header file possibly into several different files to only get related constants into the same ring control, but that is easily done.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to include header files from different directories?

    Hi,
    Sorry for the newb question, but I can't figure this out. I'm trying to compile a simple piece of code (C++) that uses header files in a directory different from the Project directory; header files are in /opt/csw/postgresql/include/pqxx. I've tried a few different things, adding that directory to the include directives under Resource Files, add existing files from a folder, etc etc. Whenever I try to build, dmake bails with status -1. I can't seem to get this working, can someone explain how to use header files from different directories?
    Thanks,
    SlowToady

    Header files are usually specified relative to a base directory. If the base directory is not a system directory -- /usr/include or the compiler installation directory -- add a command-line directive
    -I path/to/base/dirfor each such directory.
    The path can be absolute, such as
    -i /opt/csw/postgresql/includeor relative, such as
    -I ../../my/includeIn your source code, specify the header file relative to the base directory, and be sure to use quotes, not angle brackets. Example:
    #include "header.h"  // right
    #include <header.h>  // wrongThe angle brackets are used for system headers, like <iostream> or <stdlib.h>.
    The rules above are common to all compilers on Unix and Linux, and generally to all C and C++ compilers.
    For more details, read about the -I option in the C++ Users Guide. You can find the guide by pointing your browser to the "docs" directory in the compiler installation, or go here:
    http://docs.sun.com/app/docs/doc/819-5267
    All command-line options are described in Appendix A.

  • How to include header files with different extensions

    Hi,
    When i include a header file with extension .ch (myincludefile.ch), the compiler gives error messages but when i change the extension to .h, the problem disappears.
    Can anyone help me getting rid of this problem?
    For example, for the line below, I get a warning such as, "attempt to redefine MY_CONST without #undef". Remember when i change the extension to .h, the problem disappears.
    #define MY_CONST 500 /* Constant */
    Thank you very much

    I don't see how the name of the file could cause or prevent error messages, except when template declarations are involved. So let's assume for now that the file has a template declaration.
    The Templates chapter of the C++ Users Guide explains about including or separating template declarations and their definitions.
    If you have only a template declaration in a file and the compiler needs the definition, it will look for another file with the same base name and include it automatically. For example, if you have files foo.h and foo.cc, and foo.h has a template declaration, the compiler will include foo.cc automatically, even if you didn't intend for that to happen. You can wind up with multiple delcaration errors that way.
    When looking for a file containing template definitions, the compile will not include a .h file, so as not to create recursive inclusion. If changing the file name to .h causes your problem to disappear, it seems like an unwanted automatic inclusion is the problem.
    You can try two things to find out:
    1. Compile with the -H option. The compiler will output an indented list of all included files. See if you are getting a file you didn't intend, or the same file twice.
    2. Compile with option -template=no%extdef. It disables the automatic search for template definitions.
    If you find an unintended included file this way, you will probably have to change the names or organizaiton of some of the files. Our implementation of the C++ standard library depends on NOT using the -template=no%extdef option, which might mean you can't use that option.

  • A question about /usr/include/sys/select.h header file

    good day! i hope i can get some help about this and i would be very grateful if my question will be answered. i have a question regarding the select.h header file that we include in our programs when we use the select(3C) function.
    * Select uses bit masks of file descriptors in longs.
    * These macros manipulate such bit fields.
    * FD_SETSIZE may be defined by the user, but the
    * default here should be >= NOFILE (param.h).
    29 #ifndef FD_SETSIZE
    30 #define FD_SETSIZE 1024
    31 #endif
    its says here in the header file that the value of FD_SETSIZE may be defined by the user and i need to know how. i've already tried declaring a constant at the beggining of the program but it didn't work...
    example:
    #undef FD_SETSIZE
    #define FD_SETSIZE 2048
    the FD_SET macro generates an error if a value larger than 1024 is passed from in the first argument. i need to increase its value in order for me to wait for more than 1024 socket descriptors on select function. how can i increase or modify its value? thanks in advance...

    AFAIK, the only way to change the FD_SETSIZE value is by building your own version of the libc.a and linking it statically to your executable. Not good at all IMHO.
    The sources of Solaris 8 contain the implementation of select(3C) with both standard and 'large' (64K) FD_SETSIZE.
    AFAIK, 64-bit version of the libc.so contains the 64K-descriptors version of the select(3C), so you may consider building your application with -xarch=v9 flag to get 64-bit application...
    As for poll(2) - there is a manual page (man -s 2 poll) and some notes in the Answerbook. poll(2) is the actual system call that is used by select(3C), which is an interface function, so there is no functional difference between these two.
    There is a potential problem with portability of your code if you are using poll(), but it looks like you have no choice... sorry about it...

Maybe you are looking for

  • Function module for document flow

    Hi, I am developing a report on sales. i need to display the delivery and billing status of the sale order in the report. Is there any function module to get both the delivery and billing status for the input parameter sale order number.....? Thanks

  • Can you add a search feature an HTML webgallery?

    This is a two part question. I created an HTML webgallery using the Bridge CS4 output module <awesome tool!> I intend to link this to my company website. Q#1: Is there a way to include the filename for each image *without* including all the camera an

  • Adobe Flash Player for Desktop

    I downloaded the debugger version of Adobe Flash Player 10 and installed it on Windows with no problem.  Works great....  I then went to the same site on my MAC and downloade the MAC version and it appears to install as a plugin for browsers.  I was

  • IPad mini with 30 pin HDMI adapter

    Hi, I have iPad mini and "lightning to 30 pin converter". I want to buy 30 pin HDMI Adapter (for iPad 2). I want to know that if I connect that 30 pin HDMI adapter to my iPad mini with the help of "lightning to 30 pin converter", will it work on my d

  • Fullscreen on 2 beamers

    Hi all! I have one single video which is 3840px wide. The video is composed of two images of 1920px wide each. The goal would be to diffuse the video through 2 beamers in fullscreen, so each image is diffused through one beamer. On Windows sytems, a