Sp.sod undefined

Hi - trying to build a simple office 365 sharepoint app. But i always get this SP.sod undefined. Tried several alternatives but they all return this undefined error. Not much help found online. Please advise
$(document).ready(
    function ($) {
        //SP.SOD.executeOrDelayUntilScriptLoaded(beginProgram, 'sp.js');
        //SP.SOD.executeFunc('sp.js', 'SP.ClientContext', beginProgram);
        //ExecuteOrDelayUntilScriptLoaded(beginProgram, 'sp.js');
        // setTimeout(beginProgram, 2000);
        beginProgram();

Hi Dennis, It seems there were multiple issues with the scripts getting loaded in order. I had also tried the alert I I had tried the alert msg yesterday but it would not work. Finally got the ExecuteOrDelayUntilScriptLoaded command to work, not sure
how. But then ran into problems with microsoftajax.js not loading. So as you can see below I removed the function.createdelegate option and called out the success and failure functions as is and it seemed to work. I will do some additional testing today and
post updates on whether it is successful or not by tonight.  Thanks
$(document).ready(
    function () {
        //SP.SOD.executeOrDelayUntilScriptLoaded(beginProgram, 'sp.js');
        //SP.SOD.executeFunc('sp.js', 'SP.ClientContext', beginProgram);
        ExecuteOrDelayUntilScriptLoaded(beginProgram, 'sp.js');
        // setTimeout(beginProgram, 2000);
        //beginProgram();
function beginProgram(){
    $('#chartPanel').hide();
    getUserList();
    $('#button').click(function () {
        console.log('inside button click');
        ExecuteOrDelayUntilScriptLoaded(callAjaxJs, 'sp.js')
    function callAjaxJs() {
        console.log('ajaxFunction called')
        //executeFunc('MicrosoftAjax.js', 'SP.ClientContext', function () { alert('ajax function called 0'); });
        //alert('step 1');
        ExecuteOrDelayUntilScriptLoaded('MicrosoftAjax.js', 'SP.ClientContext', function () { alert('ajax function called 0'); });
        console.log('step 2 after ajax script executed');
        submitVote();
        function submitVote () {
        console.log('Vote has been submitted');
        var configList = context.get_web().get_lists().getByTitle('Poll Responses');
        var itemCreateInfo = new SP.ListItemCreationInformation();
        var oListItem = configList.addItem(itemCreateInfo);
        var chkVote;
        chkVote = $('input[name=vote]:checked').val();
        console.log(chkVote);
        oListItem.set_item('Title', chkVote);
        oListItem.set_item('Voter', newVoter);
        oListItem.update();
        context.load(oListItem);
        console.log(oListItem);
        context.executeQueryAsync(
            //Function.createDelegate(this, this.onSetVoteSuccess),
            //Function.createDelegate(this, this.onSetVoteFail));
            function () {
                console.log(' query success');
                onSetVoteSuccess();}, function () { console.log('query failed'); });

Similar Messages

  • Error while deploying a composite  (Message part "body" is undefined)

    Hi All,
    I am trying to deploy a composite but i am getting the following error.
    Buildfile: C:\Oracle\MiddlewareJdev\jdeveloper\bin\ant-sca-compile.xml
    scac:
    [scac] Validating composite "C:\JDeveloper\mywork\Sample\SampleDequeueBPEL\composite.xml"
    [scac] /C:/JDeveloper/mywork/Sample/SampleDequeueBPEL/Outputftp.wsdl: error: Message part "body" is undefined [element = EmpCollection
         [scac] Setting BPELC option 'classpath' to C:\Oracle\MiddlewareJdev\jdeveloper\jdev\extensions\oracle.sca.modeler.jar;C:\Oracle\MiddlewareJdev\jdeveloper\soa\modules\oracle.soa.fabric_11.1.1\fabric-runtime.jar;C:\Oracle\MiddlewareJdev\jdeveloper\soa\modules\oracle.soa.mgmt_11.1.1\soa-infra-mgmt.jar;C:\Oracle\MiddlewareJdev\oracle_common\modules\oracle.fabriccommon_11.1.1\fabric-common.jar;C:\Oracle\MiddlewareJdev\jdeveloper\soa\modules\oracle.soa.bpel_11.1.1\orabpel.jar;C:\Oracle\MiddlewareJdev\jdeveloper\soa\modules\oracle.soa.mediator_11.1.1\mediator_client.jar;C:\Oracle\MiddlewareJdev\oracle_common\modules\oracle.mds_11.1.1\mdsrt.jar;C:\Oracle\MiddlewareJdev\oracle_common\modules\oracle.adf.model_11.1.1\adfbcsvc.jar;C:\Oracle\MiddlewareJdev\oracle_common\modules\oracle.adf.model_11.1.1\adfbcsvc-share.jar;C:\Oracle\MiddlewareJdev\oracle_common\modules\commonj.sdo_2.1.0.jar;C:\Oracle\MiddlewareJdev\modules\org.eclipse.persistence_1.1.0.0_2-1.jar;C:\Oracle\MiddlewareJdev\oracle_common\modules\oracle.webservices_11.1.1\wsclient.jar;C:\Oracle\MiddlewareJdev\oracle_common\modules\oracle.web-common_11.1.1.jar;;C:\JDeveloper\mywork\Sample\SampleDequeueBPEL\SCA-INF\classes
    [scac] C:\JDeveloper\mywork\Sample\SampleDequeueBPEL\composite.xml:21: error: SCAC-50012
    BUILD FAILED
    C:\Oracle\MiddlewareJdev\jdeveloper\bin\ant-sca-compile.xml:272: Java returned: 1 Check log file : C:\JDeveloper\mywork\Sample\SampleDequeueBPEL\SCA-INF\classes\scac.log for errors
    Total time: 4 seconds
    This is an integration from Dequeue to FTP . Dequeue have a payload of message type which is transformed to Ftp message type. Below is the wsdl file where i am getting error
    <wsdl:definitions
         name="Outputftp"
         targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/Sample/SampleDequeueBPEL/Outputftp"
         xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
         xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/ftp/Sample/SampleDequeueBPEL/Outputftp"
         xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
        >
      <plt:partnerLinkType name="Put_plt" >
        <plt:role name="Put_role" >
          <plt:portType name="tns:Put_ptt" />
        </plt:role>
      </plt:partnerLinkType>
        <wsdl:types>
          <schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/Sample/SampleDequeueBPEL/Outputftp"
                  xmlns="http://www.w3.org/2001/XMLSchema" >
            <include schemaLocation="xsd/FileFTP.xsd" />
          </schema>
        </wsdl:types>
        <wsdl:message name="Put_msg">
            <wsdl:part name="body" element="EmpCollection"/>
        </wsdl:message>
        <wsdl:portType name="Put_ptt">
            <wsdl:operation name="Put">
                <wsdl:input message="tns:Put_msg"/>
            </wsdl:operation>
        </wsdl:portType>
    </wsdl:definitions>XSD of FTP:
    <?xml version= '1.0' encoding= 'UTF-8' ?>
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <xs:element name="EmpCollection">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="Emp" maxOccurs="unbounded" minOccurs="0">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element type="xs:string" name="name"/>
                                <xs:element type="xs:byte" name="id"/>
                                <xs:element type="xs:byte" name="dept"/>
                                <xs:element type="xs:string" name="address"/>
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
    </xs:schema>Could someone help me on this. Thanks in advance.
    Thanks
    Gnanaprakasam R

    Gnanaprakasam ,
    Check log file : C:\JDeveloper\mywork\Sample\SampleDequeueBPEL\SCA-INF\classes\scac.log for errorsDid you managed to look into logs.
    Try to reconfigured the ftp adapter from scratch.
    I had ran into same error as yours what i did was, restarted the Jdeveloper and was able to compile !!
    Regards,
    Abhinav Gupta

  • Logical System is not appearing in Informer tab to check SOD's

    Hi GRC Experts,
    I have an issue with logical system to run risk analysis.
    I created logical system by following the Config guide, added physical system and generated rules (RAR Configuration>>Logical Systems>>Generate Rule) for that logical system.
    I haven't generated rules for the physical system (RAR Config>>Rule Upload>>Generate Rules) since I dont want more rules to be displayed in the reports.
    However I do not see logical system as an option in Risk Analysis (informer Tab) and Config>>Schedule background job for BAtch Risk Analysis>> under system as well.
    It would be great if any one advice me on this.
    Regards,

    Thanks Chinmaya,
    Yes you are right, I confirmed with a friend (my ex-GRC colleague) of mine as well.
    can't execute sod checks on a logical system - logical systems are only intended to eliminate the need to add the same rule set over and over for the same types of systems
    Regards,
    Ramesh K

  • Adobe Bridge CS6 undefined in not an object Help Please

    I am so sick and tired of getting this error message when I try to create a pdf contact sheet - undefined is not an object.  Can someone help me?
    What frustrates me the is there is no log file telling me what image has the problem which Bridge does not like.
    This example is of brand new eps files that were created in the last month
    I also have the same undefined object is not an object using AI files but none are shown in this example.
    If there is no solution to tell me what eps or ai file(s) bridge does not like - is there a setting I can change so Bridge skips the file it does not like?  Sorta silly skipping a file for a contact sheet but if that is a workaround to make it bridge work that would be a huge improvement versus the program not working at all, LOL...
    1. I have tried using another program to rename all my files to be sequential numbers too, so that is taking more time and I am losing the ability to find my files by name and I still get the undefined is not an object.
    2. I am to the point of using other programs to create jpeg images of AI and EPS files and then using bridge to make contact sheets and doing that takes a ton more time and is just silly to do so now I am to the point of asking for help. 
    3. Operating system is Wondows 7 - I use CS6 - Adobe Bridge for making contact sheets - screen shoot is attached - all CS6 items are up to date with updates.
    4. Yes, I have searched the internet for help and searched adobe for help --- seems like no one has posted a solution.

    I am having this same issue. I'm attempting to make a pdf in Bridge but am getting the error message "undefined is not an object." A log or a report of some kind would be very useful here to find out which object is the offender. Looking at my files they appear to be in order but obviously something is amiss....

  • Upgraded to Firefox 4 now can not access my inbox in email. Error message say I have undefined new mails in the inbox

    Downloaded update toi mFirewfox 4. ISP is Talktalk. Can open My mail and get to screen with inbox but page seems to stopp loading then as it doesa not show amount of space being used etc which it normally does. Instead message says 'You have undefined new mails in your inbox' Nothing then happens and the button to open the inbox does not work. Can however access my email and inbox through Outlook express. Contacted TalkTalk help line and after running some checks was told that the problem is with the browser. Canb anyone help solve this please.

    Me too, problem is being googled alot by other tiscali users also.

  • View attributes can not be retrieved. View instance not found or undefined

    Hi,
    I am creating a simple master detail OAF page. For this I have done following steps:
    1. Created ParentEO and ChildEO
    2. Created ParentVO with a transient attribute called "SelectFlag" with default value "Y" .
    3. Created ChildVO
    4. Created a UserViewLink.
    5. Created Application module (UserAM).
    6. New Page UserPG
    7. In the main region I have defined Application Module.
    8. Under the main region, I have created a new advanced table region with following properties:
    View Instance : ParentVO1
    Detail View Attribute : SelectFlag
    View Link Instance: UserViewLink.
    Now when I click to select the "Child View Attribute", it gives a pop up saying "View attributes can not be retrieved. View instance not found or undefined".
    Please help, I am not able to proceed on this.
    Thanks,
    Anupam

    Anupam,
    I do not see in your steps where you associated the VO with the AM. In order to select an attribute, the AM must have an instance of the VO associated with it. Double click the AM in the navigator. Click Data Model and shuttle the VO's you want to be available from the left to the right.
    Hope this helps.
    Kristofer

  • When I try to log on to my ichat I get the error message "An undefined AIM socket error has occurred.". How do I resolve this?

    The error message "An undefined AIM socket error has occurred." comes up when I try and log on to ichat.

    I have the same issue. Does anybody know why this has happened

  • The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or

    I have taken the cfdump for tmpqry and it shows all data for
    the range ( No error at this step ) . But when we exceute this
    dbquery we get below mentioned error .
    <cfquery name="qry" dbtype="query" >
    SELECT *
    FROM tmpqry
    ORDER BY #arguments.colSort# ASC
    </cfquery>
    senerio:
    I am using createobject to create a reference for component
    and call MDArraySort function in the cfc and getting this error .
    'The system has attempted to use an undefined value, which
    usually indicates a programming error, either in your code or some
    system code.
    Null pointer is undefined.... '
    i am using this code in a cfc file.
    <cffunction name="MDArraySort" Returntype="query"
    access="public" >
    <cfargument name="colArray" type="array"
    required="true">
    <cfargument name="colNames" type="string"
    required="true">
    <cfargument name="colSort" type="string"
    required="true">
    <cfargument name="sensorIDs" type="string"
    required="true">
    <cfscript>
    var tmpqry = Querynew(arguments.colNames);
    var qRow = QueryAddRow(tmpqry, Arraylen(arguments.colArray)
    </cfscript>
    <cfloop from="1" to="#Arraylen(arguments.colArray)#"
    index="qRowIndex">
    <cfscript>
    sIndexinSensorIDs = colArray[qRowIndex]["SENSOR"]&"##";
    Temp_readin_code =
    colArray[qRowIndex]["READING_CODE"]&"##";
    QuerySetCell(tmpqry, 'SENSOR', sIndexinSensorIDs,
    qRowIndex);
    QuerySetCell(tmpqry,
    'TYPE',javacast('String',colArray[qRowIndex]["TYPE"]), qRowIndex);
    QuerySetCell(tmpqry, 'TIMESTAMP2',
    LSParseDateTime(colArray[qRowIndex]["TIMESTAMP2"]), qRowIndex);
    QuerySetCell(tmpqry,
    'ORDER_BY_PARAM',javacast('String',colArray[qRowIndex]["ORDER_BY_PARAM"]),
    qRowIndex);
    QuerySetCell(tmpqry, 'READING_CODE',Temp_readin_code ,
    qRowIndex);
    QuerySetCell(tmpqry,
    'READING',javacast('String',colArray[qRowIndex]["READING"]),
    qRowIndex);
    QuerySetCell(tmpqry,
    'PK_READING',javacast('String',colArray[qRowIndex]["PK_READING"]),
    qRowIndex);
    QuerySetCell(tmpqry,
    'ALARM_STATUS',javacast('String',colArray[qRowIndex]["ALARM_STATUS"]),
    qRowIndex);
    QuerySetCell(tmpqry, 'DURATION',
    javacast('String',colArray[qRowIndex]["DURATION"]), qRowIndex);
    QuerySetCell(tmpqry,
    'DESCRIPTION',javacast('String',colArray[qRowIndex]["DESCRIPTION"]),
    qRowIndex);
    </cfscript>
    </cfloop>
    <cfquery name="qry" dbtype="query" >
    SELECT *
    FROM tmpqry
    ORDER BY #arguments.colSort# ASC
    </cfquery>
    <cfreturn qry >
    </cffunction>
    It is working fine for some date range and and getting above
    mentioned error in sone situation .

    Hi All ,
    Thank you for your support ,
    Finally i have fix the issue using some changes in my
    function in cfc .
    <cffunction name="MDArraySort" Returntype="query"
    access="public" >
    <cfargument name="colArray" type="array"
    required="true">
    <cfargument name="colNames" type="string"
    required="true">
    <cfargument name="colSort" type="string"
    required="true">
    <cfargument name="sensorIDs" type="string"
    required="true">
    <cfscript>
    //Declare variable collection used in function as local
    --->
    var tmpqry =
    Querynew(arguments.colNames,"CF_SQL_VARCHAR,CF_SQL_VARCHAR,CF_SQL_DATE,CF_SQL_VARCHAR,CF_ SQL_VARCHAR,CF_SQL_VARCHAR,CF_SQL_VARCHAR,CF_SQL_VARCHAR,CF_SQL_VARCHAR,CF_SQL_VARCHAR");
    var qRow = QueryAddRow(tmpqry,
    Arraylen(arguments.colArray));
    </cfscript>
    <cfloop from="1" to="#Arraylen(arguments.colArray)#"
    index="qRowIndex">
    <cfscript>
    // Populate the query table
    QuerySetCell(tmpqry, 'SENSOR',
    colArray[qRowIndex]["SENSOR"], qRowIndex);
    QuerySetCell(tmpqry,
    'TYPE',arguments.colArray[qRowIndex]["TYPE"], qRowIndex);
    QuerySetCell(tmpqry, 'TIMESTAMP2',
    LSParseDateTime(arguments.colArray[qRowIndex]["TIMESTAMP2"]),
    qRowIndex);
    QuerySetCell(tmpqry,
    'ORDER_BY_PARAM',arguments.colArray[qRowIndex]["ORDER_BY_PARAM"],
    qRowIndex);
    QuerySetCell(tmpqry, 'READING_CODE',
    colArray[qRowIndex]["READING_CODE"] , qRowIndex);
    QuerySetCell(tmpqry,
    'READING',arguments.colArray[qRowIndex]["READING"], qRowIndex);
    QuerySetCell(tmpqry,
    'PK_READING',arguments.colArray[qRowIndex]["PK_READING"],
    qRowIndex);
    QuerySetCell(tmpqry,
    'ALARM_STATUS',arguments.colArray[qRowIndex]["ALARM_STATUS"],
    qRowIndex);
    QuerySetCell(tmpqry, 'DURATION',
    arguments.colArray[qRowIndex]["DURATION"], qRowIndex);
    QuerySetCell(tmpqry,
    'DESCRIPTION',arguments.colArray[qRowIndex]["DESCRIPTION"],
    qRowIndex);
    </cfscript>
    </cfloop>
    <cfquery name="qry" dbtype="query" >
    SELECT *
    FROM tmpqry
    ORDER BY #arguments.colSort# ASC
    </cfquery>
    <cfreturn qry >
    </cffunction>
    Rajesh
    SCMS
    India

  • Getting bobj is undefined when report is viewed in Internet Explorer 8

    Background
    We are running a web application on a server that has "BusinessObjects Enterprise XI 3.1 FP 2.6 Update" installed on it.
    The server uses the 1.1 .net framework.
    This web app can generate Crystal reports and display them either by exporting to pdf, or by using the CrystalReportViewer control.
    (The CrystalDecisions references in the sln for the website are using version 12.0.1100.0.
    The web app is a custom web app that is not defined in iis at the default level.  It lives as a virtual website under the default website and uses the crystalreportviewers12 virtual directory.) 
    when the browser displays a report by exporting to pdf, it works just fine.
    Here is our issue:
    When the browser displays a report by using the CrystalReportViewer control using Internet Explorer 8 (IE8), it generates a javascript error:
    'bobj' is undefined
    Here are a few peculiar things on this:
    - the report displays ok for other IE8 users (so the issue only occurs for select IE8 users).
    - the report displays ok in ie6.
    - One notable observation is that IE8 has different sets of options amongst browsers.  We compared 2 machines that didnu2019t work, with 1 machine that does work. All 3 sets of IE8 settings differ in one way or another.
    Does anyone know if this is an issue that that can be fixed through an IE8 setting?  Or does it need to be fixed elsewhere?  Thank you!

    Hi Brownie,
    We only support IE 8 in Compatibility mode. Try selecting that option in the Browser and test again
    Thank you
    Don

  • Unable to get value of the property 'nodeName': object is null or undefined  Error in apex_ns_3_1.js

    I am getting the following error with IE9 and Firefox 26 with application express 3.2:
    SCRIPT5007: Unable to get value of the property 'nodeName': object is null or undefined
    apex_ns_3_1.js, line 589 character 10
    this.dialog.check2 = function (e){
    var tPar = html_GetTarget(e);
    var lEl = $x('apexir_col_values_drop');
    var l_Test = true;
    ******  while(tPar.nodeName != 'BODY'){
    tPar = tPar.parentNode;
    if(tPar == lEl){l_Test = false;}
    if(l_Test){$x_Remove('apexir_col_values_drop')}
    This happens when I click the Gear Icon, then Filter, then I click the dropdown arrow under expressions and pick an expression from the list.
    If I set (through IE Developer tools) back to IE8 mode, I don't get the error.

    Guess no one is using 3.2 any longer or no one else gets this error.....  Guess I can edit the JavaScript file to trap the error since it really doesn't seem to cause an issue.  Just didn't want to have to go that route.

  • CLOB datatype appearing as UNDEFINED

    Hi,
    we are using Oracle 8.1.5 - if a table with column datatype CLOB
    is created - while describing the datatype appears as
    'UNDEFINED'.
    Do I need to do any configuration?
    Has anyone come across this?
    thanks much,
    null

    sql plus 3.3 does not support lobs and gives this type of result. Try describing in Sql Plus 8.1.5

  • Popup Key LOV, NULL and "Invalid numeric value undefined for column"

    Hello.
    I've created an item based on database column of NUMBER type and set the following properties:
    Display As = Popup Key LOV (Displays description, returns key value)
    List of values definition=select 'display_value' d, 1 r from dual
    Null display value=%
    Null return value=
    Display Null=Yes
    When I select "%" in the LOV and try to apply changes to database I get error:
    ORA-20001: Error in DML: p_rowid=1781, p_alt_rowid=N1, p_rowid2=, p_alt_rowid2=. ORA-20001: Invalid numeric value undefined for column N2
    Error Unable to process row of table TTT.
    If I set Display As = Select List, all works fine. But I need Popup Key LOV.
    Could anybody help me?
    I use Application Express 2.2.1.00.04

    Hi all,
    I did my homework and solved this issue. First I would like to thank Patrick Wolf for the invaluable help he gives out on thread Re: Null value handling in LOVs The code presented here is just a minor edit to his code, but an essential one when dealing with Popup Key LOV items.
    Here's what I did:
    1. Create an Application Process.
    Name: RemoveNulls
    Sequence: 0
    Point: On Submit: After Page Submission - Before Computations and Validations
    Process Text:
    BEGIN
        FOR rItem IN
          ( SELECT ITEM_NAME
              FROM APEX_APPLICATION_PAGE_ITEMS
             WHERE APPLICATION_ID   = TO_NUMBER(:APP_ID)
               AND PAGE_ID          IN (TO_NUMBER(:APP_PAGE_ID), 0)
               AND LOV_DISPLAY_NULL = 'Yes'
               AND LOV_DEFINITION   IS NOT NULL
               AND LOV_NULL_VALUE   IS NULL
        LOOP
            IF (V(rItem.ITEM_NAME) = '%null' || '%' OR V(rItem.ITEM_NAME) = 'undefined')
            THEN
                Apex_Util.set_session_state(rItem.ITEM_NAME, NULL);
            END IF;
        END LOOP;
    END;Error Message: #SQLERRM#Condition: None
    2. You should be able to submit a Popup Key LOV with a NULL value now.
    Once again, THANKS, Patrick! You rock! I'm seriously thinking of trying ApexLib now :)
    Georger

  • SCRIPT5007: Unable to get property 'top' of undefined or null and too much recursion

    I am not sure about placing two questions into one post, but here it goes:
    The error above  "SCRIPT5007: Unable to get property 'top' of undefined or null" is coming from this function:
    Code: 
    $(function () { //this is the way to run your code at the DOM Ready event  $('a').click(function () { $('html, body').animate({ scrollTop: $($(this).attr('href')).offset().top }, 1500); return false; });  });
    This is the effected code I believe that is causing the problem:
    Code: 
    scrollTop: $($(this).attr('href')).offset().top
    the error occurs when I click on a "clear" button in my form. My website is one long page and that function allows my navigation to slide up and down the site. Without it, everytime you click a nav, it jumps to that anchor.
    For the 2nd problem, the too much recursion, the problem lies within here:
    Code: 
    function () { if ($.isReady) return; imReady = true; $.each($.includeStates, function (url, state) { if (!state) return imReady = false }); if (imReady) { $.readyOld.apply($, arguments) } else { setTimeout(arguments.callee, 10) } }
    where the error is actually coming from the 2nd "function" script. This is part of the browser compatibility script for mozilla/opera at the top of the index page. Any help would be great. Thanks.

    Ahh I apologize. I simply was posting to JavaScript forums in hopes of
    finding a solution. Sorry for the mixup.

  • Missing prototype and Undefined Symbol errors

    So, I am using an Opal Keyy XEM3005 board.
    Depending on the documentation I read, this board has a native ANSI C interface with a C++ wrapper.
    In their forums, they say to rename the ".cpp" file to "c", and then go forward with calling the default constructor & keep track of the pointer.  Their functions are all in an externally loadable DLL.
    Well and good.
    Their API documentatin is available here:  http://www.opalkelly.com/library/FrontPanelAPI/
    I have written a REALLY simple app to ease my way in - it does nothing more than allow the user to throw a switch, and when this happens, it goes off to connect to the board:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    #include <cvirte.h>
    #include <userint.h>
    #include "Try1.h"
    #include "XEM.h"
    #define _WIN32_WINNT 0x0501
    //#define _WIN32
    #include <windows.h>
    static int panelHandle;
    static okFrontPanel_HANDLE    XEM_Device;
    int __stdcall WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPSTR lpszCmdLine, int nCmdShow)
    if (InitCVIRTE (hInstance, 0, 0) == 0)
    return -1;    /* out of memory */
    if ((panelHandle = LoadPanel (0, "Try1.uir", PANEL)) < 0)
            return -1;
        DisplayPanel (panelHandle);
        RunUserInterface ();
        DiscardPanel (panelHandle);
        return 0;
    int CVICALLBACK Connect (int panel, int control, int event,
            void *callbackData, int eventData1, int eventData2)
        int    Value = 0;
        switch (event)
            case EVENT_COMMIT:
                GetCtrlVal(PANEL, PANEL_CONNECT_SWITCH, &Value);
                SetCtrlVal(PANEL, PANEL_CONNECT_LED, Value);
                if( Value )
                    XEM_Connect(XEM_Device);
                else
                    XEM_Disconnect(XEM_Device);
                break;
        return 0;
    int CVICALLBACK Quit (int panel, int control, int event,
            void *callbackData, int eventData1, int eventData2)
        switch (event)
            case EVENT_COMMIT:
                QuitUserInterface (0);
                break;
        return 0;
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    This, of course, works fine by itself (with empty _Connect() and _Disconnect() functions)
    I then started working with the XEM_Connect function.
    The first step is to run their LoadDLL function as such:
    int XEM_Connect ( okFrontPanel_HANDLE    XEM_Device )
        int    NoDevices = 0;    //    Number of devices attached to the PC
        //    Load the DLL (?)
        // Load the FrontPanel DLL
        if (FALSE == okFrontPanelDLL_LoadLib(NULL))
            printf("Could not load FrontPanel DLL\n");
            exit(-1);
        return XEM_SUCCESS;
    And this would compile and run just fine.
    Now, when I added the functions to start trying to get info about the device, I started getting "missing prototype" errors.
    int XEM_Connect ( okFrontPanel_HANDLE    XEM_Device )
        int    NoDevices = 0;    //    Number of devices attached to the PC
        //    Load the DLL (?)
        // Load the FrontPanel DLL
        if (FALSE == okFrontPanelDLL_LoadLib(NULL))
            printf("Could not load FrontPanel DLL\n");
            exit(-1);
        //    Find out how many devices are attached
        XEM_Device = okFrontPanel_Construct(  );
    //    XEM_Device = okCFrontPanel( void );
    //    NoDevices = GetDeviceCount( );
        printf("%d OK devices attached\n", NoDevices);
        //    Call the contructor?    
    //    okCFrontPanel ();
        return XEM_SUCCESS;
    Now, I searched the forums and found the bits about adding #define _WIN32_WINNT 0x0501 prior to inclusion of windows.h.  Did that.  No joy.
    Then I searched some more and found the bit about changing the build options to uncheck the "prototype required" flag.
    Done.
    This seemed to work at first (the above code could be built with no errors, and appeared to run).
    So I thought maybe I had it, and added the next line, so:
    int XEM_Connect ( okFrontPanel_HANDLE    XEM_Device )
        int    NoDevices = 0;    //    Number of devices attached to the PC
        //    Load the DLL (?)
        // Load the FrontPanel DLL
        if (FALSE == okFrontPanelDLL_LoadLib(NULL))
            printf("Could not load FrontPanel DLL\n");
            exit(-1);
        //    Find out how many devices are attached
        XEM_Device = okFrontPanel_Construct(  );
        OpenBySerial( XEM_Device, "UaLgzvVpBJ" );
    //    XEM_Device = okCFrontPanel( void );
    //    NoDevices = GetDeviceCount( );
        printf("%d OK devices attached\n", NoDevices);
        //    Call the contructor?    
    //    okCFrontPanel ();
        return XEM_SUCCESS;
    Now it doesn't complain about no prototypes (duh), but instead I get linker errors:
        Undefined symbol '_OpenBySerial@0' referenced in "XEM.c".
    So, dredging through the .h and .c files, I found a couple of things:
    in the okFrontPanel.c file I found the following:
    okDLLEXPORT ok_ErrorCode DLL_ENTRY
    okFrontPanel_OpenBySerial(okFrontPanel_HANDLE hnd, const char *serial)
        if (_okFrontPanel_OpenBySerial)
    ;  return((*_okFrontPanel_OpenBySerial)(hnd, serial));
        return(ok_UnsupportedFeature);
    In the okFrontPanel.h file I found:
    and also:
    okDLLEXPORT ok_ErrorCode DLL_ENTRY okFrontPanel_OpenBySerial(okFrontPanel_HANDLE hnd, const char *serial);
    So, I see them in the .h & .c files, but the linker is bombing out.
    I smell a problem with actual code to link being in the DLL...  How do I resolve this, any ideas?  Or am I doing something so stupidly (and obviously) wrong that I'm being blinded to it?

    Hi tomii,
    My suspicion is that these issues are due to using a C++ dll in a C environment. There are inherent challenges with performing such an operation as you have to make sure all your parameters and settings are correct.
    I also could not find the documentation that the Opal Kelly dll is ANSI C but it sounds like you can use this in C with some reconfiguration. I would recommend using their forums to get more information on what steps need to take place to get things working in ANSI C.
    From the information you provided, I did find some resources on the missing prototype error and undefined symbol issue with the linker.
    For the missing prototype I found a thread of someone actually using LabWindows and seeing this compiler error you may want to look at
    http://bytes.com/topic/c/answers/695019-missing-prototype
    I found a few cases where using a function definition of int func(void) removes such issue when int func() does not.
    Another link I found that may be worth a look can be found at http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html
    It gives some good pointers to mixing C and C++ code. Some of it may be applicible in your case.
    And, a resource for your undefined symbol linking issue.
    http://www.cprogramming.com/tutorial/compiler_linker_errors.html
    Hopefully these resources will give some context for getting things compiling and working with your dll.
    Good luck!
    James W.
    Applications Engineer
    National Instruments

  • I'm using AOL for email and Firefox 9.0.1. Problem started 2 days ago. Before that I put in the first two letters of an email address and it gave me a list of possibles. Now I get "undefined" for each possible instead of the email address.

    After updating to Firefox 9.0.1 there were no problems. My contact list still shows as it did before this problem arose. When I type in the first letter or two of the email address, it used to give me a list of possibles. Now t is just showing the email address as "undefined" when it gives me suggestions for the email address I'm typing in the send line. This means that instead of being able to click on my choice in the possibles it gives me, I have to go to my contact list, find the name and then click on it if I'm sending the email to one person. If it goes to more than one, I either have to type in the full address or use copy and paste from the contact list. This is a huge hassle. Any help is appreciated.

    I moved the file formhistory.sqlite to another file folder. I then started Firefox up again to see if it worked or if I needed to start it in Safe Mode. No need for Safe Mode. It now works exactly as it should. Thank you so much!!

Maybe you are looking for

  • Apply Quartz filter to a PDF from command line

    Hello I'm trying to apply a quartz filter to a PDF document via the command line. I know it's possible with Python and there's a script at /Developer/Examples/Quartz/Python/filter-pdf.py that does just that. The problem with this is that the script i

  • Each request gets a new session problem

    I have a standalone oc4j and I have deployed an application that uses Dynamic JDBC Credentials as described in ½How To Support Dynamic JDBC Credentials½. The application works fine when oc4j runs on every computer except one (the one it should be on)

  • How well does MS Remote Desktop work?

    For those that have used Microsoft's Remote Desktop client, http://www.microsoft.com/mac/products/remote-desktop/default.mspx, have you found it satisfactory? Does it work fine with either Vista or XP? Does the Windows machine need anything special i

  • Kerberos AFP service on multiple subnets

    Here is an interesting one. I don't think there is a solution since the AFP server can have only one Kerberos principal, although I'm interested in what the experts think. My Mac OS X Server 10.6.2 is running a Kerberos realm on host www.domain.com.a

  • Applescript equivalent of PHP $$ variable

    Hi, i hope someone can help with this. I'm new to mac developing and am trying to write a simple mac app to output some serial commands. This is all working fine but the software i'm using to output the serial commands works on applescript, hence usi