Add the project of sample problems-specific classes

Hallo!

I'm sorry - I think it's a very stupid question, but after two days of googling and asking a colleague who has experience with C++ (which I did not...) I can't know what I'm doing wrong.

I use in a clean project, some (reduced) categories of a sample application (the cat of SPP) as a basis for my application. This works as expected.

But when I try to call a constructor of a custom class, I always get a ' conversion of ' TestClass * "no scalar of type"TestClass"requested" or error "undefined reference".

(ChatManager.cpp)

First error:

void SPPThread::run()
{   // conversion from 'TestClass*' to non-scalar type 'TestClass' requested
   TestClass test = new TestClass();
}

Second mistake (after searching on Google, the first error and find this "solution"):

void SPPThread::run()
{
   TestClass* test;
   test->process();     // undefined reference to `TestClass::process()'
}

TestClass.hpp:

#ifndef TESTCLASS_HPP_
#define TESTCLASS_HPP_

class TestClass {
public:
    TestClass();
    virtual ~TestClass();

    void process();
};

#endif /* TESTCLASS_HPP_ */

TestClass.cpp:

#include "TestClass.hpp"

TestClass::TestClass() {
    // TODO Auto-generated constructor stub

}

TestClass::process()
{

}

TestClass::~TestClass() {
    // TODO Auto-generated destructor stub
}

The TestClass.hpp file is included in the ChatManager header.

I also tried being a Q_OBJECT TestClass but with the same result. My colleague and I suspect strongly that TestClass is found by the compiler/linker, but why?

Does anyone have an idea?

Sorry if this is a stupid question - I am new to the development both BlackBerry10 and C++, but you have to start somewhere, not you?

-Answered my own question (is it just me or the answer always comes, when you post your question on a forum?).

I created an empty Test Cascades in QNX Projekt and added a class. I don't have the "undefined reference" error, when you create a new instance or call a method of that class.

I then compared this Test and my project project .pro files and found a single line, what was missing in my project:

include(config.pri)

I don't know yet, why the sample application (which I copied the .pro file) didn't need this, but of course I need, when I want to add more classes (no QObject)...

With this, it works:

void SPPThread::run()
{
   TestClass* test = new TestClass();
   test->process();
}

Not sure by now why I have to use a pointer (as I said - I'm a beginner C++), but maybe I'll find out...

Tags: BlackBerry Developers

Similar Questions

  • Close the reference (for a more specific class)

    I'm feeding a control reference to the node "to a more specific class.  When I finished, I understand that I have to close the order, but what I also close the reference that is the output of the node "to a more specific class?

    This is the same reference... There is no need to close the two.  And if you approve the automatic cleanup of references LabVIEW, you really do not need to close, as the references control must never be matched and will be automatically cleaned when your VI is inactive.

    For more information, here is a blog that just now, I wrote that talks about closing reference.

  • Add the short name field for specifications in the XSL file

    Hello

    I'm looking for help to see if it is possible to add the short name for the inputs and spare field in a specification of Formulation in the XSL file. If it is possible, how can I do this?

    Thanks in advance.

    Well, CSS is much more locked, by design. So it's a little (or maybe a lot) more complicated.

    Also remember that if you change the CSS schema, and you use the web service contract that we provide for the CSS message, then the approach will probably be different. This means that the web service contract would not support additional XML nodes, unless he expects them.

    If you do not use our web service contract, then you could make changes in the XML in a different way. Can you elaborate on how you receive the message in CSS?

    Basically, if you use the web service method, then you will probably need to use the ExportExtensions method, which is documented in the CSS guide. ExportExtensions allows you to include xml code in a node specific extensibility through managers, which are classes that you configure in the config\extensions\exportExtensions.xml configuration file. It is currently the custom how sections are included in syndication. So you can add your own XML nodes and call you a custom class to provide additional data that you need.

  • How to add the new column to a specific position

    Hello

    My table looks like Fallows.

    Select * from company

    PRODUCT_ID COMPANY_ID COMPANY_SHORT_NAME COMPANY_LONG_NAME
    11001An Inc.Long name A Inc.
    11002B Inc.Long name B Inc.
    11003C Inc.Long name C Inc.
    21004D Inc.Long name D Inc.
    21005E Inc.Long name E Inc.
    21006F Inc.Long name F Inc.

    My requirement is I would LIKE to add A NEW COLUMN AS COMPANY_LOCATION NEXT TO COMPANY_SHORT_NAME

    How to get there.


    I tried like Fallows alter company table add company_location varchar2 (100) after company_short_name;

    but this query shows the error

    ORA-01735: invalid option of ALTER TABLE

    If the query I've tried is correct?

    Give me your suggestions.

    Thanks in advance.

    As long as you're on 11 GR 2 or lower, it will not work.

    There is no Clause "AFTER"in the alter table do not add column."

    You have the chance to use dbms_redefinition (when no interruption of service is possible) or manually create a new table with the columns in the order you need and then migrate the data and then drop the original and rename a new.

    In case you are already on 12 c, you have a chance to add the column to the end and then make visible columns and invisible status in the right order. This way your column will get to the position that you want it to be.

    Kind regards

    Carsten

  • Add the project to remote portlets as a shared library in another project

    Hello

    We are working on WSRP. We have producer such as Websphere and Weblogic (ver 10.2) consumer.

    We created a portal (WsrpEar) EAR & portal (WsrpWeb) Web project and then consumed all the remote portlets for Websphere. The "producer" created during this process is 'MyProducer '. This project has no other all local portlets. In this "WsrpWeb" project we do not have a file ".portal. The reason is that we want to EXPORT this project "Web portal" alone as a '. '. WAR"file (WsrpWeb.war), and then add it as a shared library in our application MAIN WEBLOGIC PORTAL (MyProjectEar & MyProjectWeb).

    We could do all this stuff. Once the war (WsrpWeb.war) is added as a shared library in the main application, we could see the remote portlets under "Available Portlets" from the main application. We could even drag it and drop it on the main ".portal' of application file. But when I ran, he throwed an error like below:
    -----
    {color: #ff0000} The source of this error is:
    com.bea.wsrp.consumer.management.producer.ProducerManagerException: producer with handle {color} [{color: #ff0000} MyProducer {color} | http://forums.oracle.com/forums/] {color: #ff0000} in webapp {color} [{color: #ff0000} MyProjectWeb {color} | http://forums.oracle.com/forums/] {color: #ff0000} does not exist. {color}
    -----

    He is looking for the handful of producer in ' wsrp producer - registry.xml "of the main application (MyProjectWeb). But here we do not have an entry because we are consuming remote portlets directly from shared library and the shared library has a file of "wsrp producer - registry.xml" who did the handful of producer entry.

    When I manually added the entry handle producer in the ' wsrp producer - registry.xml ' main, as application below, remote portlet executed successfully.

    & lt; wsrp producer handle = "MyProducer" & gt;
    & lt; Description / & gt;
    & lt; seller / & gt;
    & lt; initCookie requires & gt; perGroup & lt; / initCookie requires & gt;
    & lt; requires registration & gt; false & lt; / requires registration & gt;
    & lt; - service URL & gt;
    & lt; WSDL url & gt; [http://xxx:yyy/wsdl/myservice.wsdl] & lt; / wsdl-url & gt;
    & lt; / service-URL & gt;
    & lt; / wsrp-producer & gt;

    (xxx and yyy here are the host name and port # producer websphere).

    Anyone can guide us on this? Is he referring to also make an entry in the ' wsrp producer - registry.xml ' main application or is there any way?


    Thank you
    ANU

    Published by: user10826720 on January 29, 2009 06:36

    Published by: user10826720 on January 29, 2009 06:38

    Hello Anu,

    The file WEB-INF/wsrp-producer - registry.xml (normally created by the IDE) and the database tables (normally created through construction Administration Tools) are the only two places where WSRP producer is stored for a consumer WSRP WLP.

    So, yes - you can add this file (or an entry in this file) in your web application, or the other possibility would be to create your own code that calls the ProducerManager API to implement the producer when the webapp deploys first of all to a new server to boot. You could make this code look in what that are the configuration files you wanted to, but I don't think it would be easier to just put information in wsrp producer - registry.xml.

    Thomas

  • Debug the project with CVI2013 problem

    Hello NO,.

    the following scenario could be improved, I think that

    If I press the button "Debug Project" (green triangle), you can start compiling. As it may take some time one may be tempted to press the button "Debug Project". Interestingly, now the button is dimmed, but also the build fails.

    This behavior could be repaired if the green button would be grayed out as long as clang is running...

    Hi Wolfgang,.

    We're tracking at your request in bug report #423029.

  • How to add _LARGEFILE64_SOURCE to the project?

    I'm on a project that does not allow me to add

    DEFINES += _FILE_OFFSET_BITS = 64
    DEFINE _LARGEFILE64_SOURCE += = 1

    in the .pro file.  The IDE auto generates the config.pri

    I tried to add the project properties defined in the paths and symbols but my application does not always scan all files on the sd card.  What gives?

    In other projects, all I do is just add to the .pro file and it works.

    Too bad. I just had to add to the .pro file.  Arggg

  • Add target project by program specific class

    Hello

    I am creating a vi that can programmatically create a project and add a device target (PXI-7954R). Currently I have no problem to create a project and add a FPGA target, but this isn't class specific, that is. This isn't the 7954R.

    I found a really horrible way to do it by opening the project file as a text file and picking through and adding what needs to be added (looking at a project already created with the target in it to compare).

    Does anyone know how to add a specific target of the class to a project in the labview environment without having to manually edit the project file?

    Any help would be much appreciated

    Hi James,

    You must add the correct class ID in the terminal project item Type.

    You must create and set the correct tags associated with this element.

    Please see the attachment,

    Kind regards

    Steve

  • Why not two MAF project Java classes in the same package, see the other (including those in the project downloadable tutorial used)?

    I use JDev 12.1.3.0, updated to include the MAF 2.1.1 and am using 1.8.0_45 and 1.7.0_79 of JDK.

    I have the SDK with Tools 24.1.2, tools 22, Build-tools 22.0.1 platform and from the 21 API, but I don't think I even got that far...

    So, for some reason, then the creation of two public classes in the same package, they do seem to see each other.

    The flags of the code editor, any mention of each and the other classes as "< < WhateverClass > > Type not found", even after an explicit import.

    A screenshot showing the error is included.

    The classes are created by simply clicking on the ViewController project, then 'new' then selecting class Java and accepting all the default values.

    Everything I do is add a class EMP member to EMP, both in the mycomp.mobile package.

    This happens even if I don't use the prefix of the tutorial "mycomp" from the appointment package.

    At first, I noticed that when following the tutorial staff then again when downloading the employees project completed, which also shows the same problem when I open it.

    When I create any other application, same and asks the ADF, this does not happen.

    I thought that maybe it's something to do with the fact that the MAF uses JDK 8 while JDev runs on JDK 7?

    Anything I'm doing wrong?

    Any help is appreciated!

    I can't reproduce this behavior in my environment, there might be something specific to your installation.

    Can you try deleting the IDE system directory and restart JDeveloper? to find the location of this directory see help-> about-> properties-> de.system.dir

  • Problem with the combination of LabVIEW (dynamic distribution) classes, statechart module and module FPGA

    LOCATION:

    -I am developing a software plugin based on plug-ins based on LabVIEW classes that are instantiated in running. Plugin real classes come from the plug in generic classes that define interfaces to the VI instantiation and can provide basic functionality. This means that many of the methods of the class are dynamic distribution and even methods of child classes can call the parent method.

    -Plugins top level (the ones directly accessible by the main VI) each have a run method that animates a plug-in specific state transitions.

    -Transitions of the plug-in data acquisition (DAQ class) class calls a method of the DAQ class that reads data from an FPGA card OR and transmits to another component via a queue.

    PROBLEM:

    -Higher sampling rate, a FPGA-to-host FIFO overflow occurs after some time. When I "weigh" the system just by moving a window of Firefox browser on the screen, the overflow is triggered immediately. I did not have this kind of problem in older software, where I was also reading a FIFO of FPGA, but made no use of LabVIEW classes or diagrams.

    SOLUTIONS I'VE TRIED (WITHOUT SUCCESS):

    -J' put the transitions in a timed (instead of a simple while loop) loop that I assigned specifically to an own kernel (I have a quad-core processor), while I left all the other loops of my app (there many of them) in any simple loops. FIFO overflow still occurs, however.

    QUESTION:

    -Does anyone have a tip how I could fix this problem? What could be the cause: dynamic distribution methods, the acquisition of data of state transitions or just the fact that I have a large number of loops? However, I cannot change the fact that I have dynamic distribution methods because it is the essence of my architecture...

    Tips are greatly appreciated!

    I've now changed the execution priority of all the screws involved in reading of the FPGA FIFO '(highest) priority critical time '. This seems to be improving the situation much: so far I have not a FIFO overflow, even when I move around the windows on the screen. I hope it stays like that...

  • How to add the external library in the folder path of class for use in Java outgoing call?

    Hello

    I work with the OSB 12 c under Jdeveloper Java legend item.

    Thing is pot I use to perform the conversion from json to xml that use external libraries.

    When I give my jar to java legend project reference it doen't find external libraries.

    Could you please tell me how to add external libraries in the class path folder or use to add it via web logic Server?

    Thank you

    Pavan

    Hello

    Thanks, I solved a problem.

    We can add the following in windows pc path:

    C:\Users\your_usename\AppData\Roaming\JDeveloper\system12.1.3.0.41.140521.1008\DefaultDomain\lib

    We add your external lib here and restart the weblogic server instance.

    Now you have this external lib or jar in use.

    Cool!

  • Does anyone know how to add a folder with sample data the installer to labview

    I have set up a program to install the application to a project I'm working on that.  I want to add a folder to the installation with some sample data files.  Currently, I added a readme file that tells the user to decompress a file included with the Setup program in a certain folder.  Is there a way to automate the process and include this with the installer?

    First add all the files you want to include in the project. Then in the properties of the installer:

    1 use tab destinations to add a folder if you have the sample files contained in their own folder.

    2. on the file source page, expand "My Computer" and find the files in the project you want to add.

    3. Select the folder you want to that they be located on the right side and click the right arrow.

  • can not see Add targets and devices in the Project Explorer

    Hello!

    I think I have a strange question. I have the evaluation version of Labview 2010. I am trying to add my cRIO 9004 to a project. I'm just trying to follow the instructions in the getting started with manual cRIO. It is said, add crio to the project by project root right clicking and selecting NEW > ADD TARGETS AND DEVICES. The problem is I can't see the link to the NEW, but once I click that I see not a link under "add new target or device" appear, instead, I see the dialog box to open a NEW FILE LABVIEW appear. everywhere in distress forum/basic knowledge/support of shooting and get started articles have mentioned project root right click > select NEW > select Add a target or peripheral >, as if she IS supposed TO APPEAR STANDARD in all new projects! But I'm not! I do not understand what Miss me. The version of software that I have are below:

    the cRio:

    OR VISA 5.0

    NEITHER RIO 3.0
    RT LV 8.6

    and he allied himself with what I installed on my host.

    I can communicate with the device of cRIO times using MAX as well as ping at the windows command prompt command.

    Any help would be great!

    Thank you!

    Rajesh

    After you have installed the evaluation version of LV 2010, you reinstall all of the other drivers, as for the cRIO?

  • Cannot use casting "to more specific class ' function to the parent class of child class

    Hello

    I am using OOP for my request for data acquisition. I have different e/s analog and digital materials. I create a superclass named DAQ.lvclass. This class has four childs: analog in out analog, digital, and Digital Out. I am trying to invoke screws of the child of the parent class's class. For that I am throwing the class parent her child to aid "to a more specific class' function. But I get the below error.

    Error 1448 occurred at the more class specific in DAQ.lvclassMain.vi AQ

    Possible reasons:

    LabVIEW: Bad type cast. LabVIEW does not deal with the run-time value of this class of LabVIEW as an instance of the given class of LabVIEW.

    How can I handle these cases where I have to call child VI of the parent member?

    I have attached two screws 1 snapshot. Main DAQ: it's the class main VI parent who manages all functions. 2. read the analog inputs: this VI trying to set the parent class for its class of the child and child vi reads value of data acquisition task. I get the second error off VI.

    Kindly help.

    Honestly, I have NO idea on what you want to do.

    Inheritance of classes in EACH OOD (object-oriented design) requires to define common ground as the parent class. Children can add things like properties and methods.

    If you set children who have no points in common, you have made a mistake.

    If all children have too many different specific methods, your OOD is absent.

    Example:

    Parent defines the method A.

    1 child adds the B method.

    Child 2 adds method C.

    But method B will not be usable on 2 children while method C will not work with 1 child.

    It is an approach that you want to prevent. In any programming language oriented OBJECT. This adds unnecessary complexity leading to difficult to maintain the code, and it is prone to errors.

    However, if you're going to do, "to more specific class ' is the correct type cast. But your screenshots and error messages, it is obvious that refine you a particular child's casting only. You must extend the code to check the real child, specifically expressed and call the method. That being said, your code increases the complexity you want to add a bunch of case of structures which essentially nihilates all THE BENEFITS of the use of OOP.

    I'm sorry to say that.

    Norbert

  • Add the item to the basket problem on SCC 11

    Hello

    We have customized shippingGroups, with only an additional property and it works very well in the app store application of trade, but, when I try to add an item to your cart via CSC, I get an error and the item is not added. This problem occurs only on the CSC.

    It's on OrderTools:

    beanNameToItemDescriptorMap-=.

    atg.commerce.order.HardgoodShippingGroup = hardgoodShippingGroup

    & beanNameToItemDescriptorMap =.

    com.my.order.MyHardgoodShippingGroup = hardgoodShippingGroup

    shippingTypeClassMap-=.

    hardgoodShippingGroup = atg.commerce.order.HardgoodShippingGroup

    & shippingTypeClassMap =.

    hardgoodShippingGroup = com.my.order.MyHardgoodShippingGroup

    And this is the error I get when trying to add an item to the basket:

    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler caused by (#2):atg.repository.RepositoryException: descriptor invalid name: 'atg.commerce.order.HardgoodShippingGroup'
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.adapter.gsa.GSARepository.getValidItemDescriptor(GSARepository.java:6622)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.adapter.gsa.GSARepository.createItem(GSARepository.java:710)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.OrderTools.createShippingGroup(OrderTools.java:1397)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.OrderTools.createShippingGroup(OrderTools.java:1344)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.ShippingGroupManager.createShippingGroup(ShippingGroupManager.java:651)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.ShippingGroupManager.createShippingGroup(ShippingGroupManager.java:627)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.purchase.PurchaseProcessHelper.getShippingGroupForItem(PurchaseProcessHelper.java:1881)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.purchase.PurchaseProcessHelper.addItemToOrder(PurchaseProcessHelper.java:1027)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.purchase.PurchaseProcessHelper.addItemsToOrder(PurchaseProcessHelper.java:957)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.purchase.CartModifierFormHandler.doAddItemsToOrder(CartModifierFormHandler.java:3800)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.purchase.CartModifierFormHandler.addItemToOrder(CartModifierFormHandler.java:3420)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.purchase.CartModifierFormHandler.handleAddItemToOrder(CartModifierFormHandler.java:3367)

    What I'm doing wrong here? Any ideas?

    Kind regards

    Lucas

    Look at the configuration rolled upward to OrderTools.shippingTypeClassMap in/dyn/admin or CCA.  My theory is that there is a table entry with something like the key and atg.commerce.order.HardgoodShippingGroup as the value.  OrderTools.createShippingGroup takes a group expedition (string) as input type and who looks up in shippingTypeClassMap.  If there is no entry, you will get an exception.  You do not get an exception.  Later, createShippingGroup takes the output of shippingTypeClassMap and upward resembling beanNameToItemDescriptorMap.  If there is no entry, the input string is returned by the search and used as input for createItem.  This is the exception you get.  If CSC must have configured the form Manager with a group type of delivery of the first card that has a class name (atg.commerce.order.HardgoodShippingGroup), which is no longer in the second plan.

    There are two oddities of = and += who could you be shifted upward.  One is that they are not necessarily be applied in the order that you will see in your properties file.  The Java properties class based implementation of the map and does not preserve the order of the text file.  The second oddity is that deleting via = requires that the text exactly.  If you have a space located right at the end of your line of =, for example, the kernel does not match and will not erase what you want to delete.

Maybe you are looking for