Can't include C-code in objective-c project

I am having problems including a little C source code file in an existing objective-c project.
The problem is that xcode spits out lots of warnings and error messages when it tries to compile the whole project or just the C file, in particular, lots of "parse error"s.
I thought obj-c is a true superset of C, isn't it?
The project is the GLSLEditorSample that comes with the XCode Examples.
The funny thing is that the project contains already two other plain C source code files ...
If you could give me any hint or suggestion or pointer where to look, i would be very grateful.
If you want to take a quick look at my xcode project you can download everything from
http://zach.in.tu-clausthal.de/tmp/Source.zip
Thanks a lot in advance,
gabriel.

Thanks a lot for testing.
When i build the project (with nano_timer.[ch] included), then i get zillions of errors.
The first ones in the list are:
nano_timer.c:13: error: parse error before '*' token
nano_timer.c:14: warning: no previous prototype for 'nano_init'
nano_timer.c:15: error: 'nt' undeclared (first use in this function)
nano_timer.c:15: error: 'true' undeclared (first use in this function)
And even before those i seem to get an error in nano_timer.h at line 18, which is the declaration of 'first_time' in the struct 'NanoTimer', i.e., in
struct NanoTimer
unsigned long long int time_stamp;
double history[NANOTIMER_NUMHISTORY];
bool first_time;
} NanoTimer;
And the error message there is:
nano_timer.h:18: error: parse error before 'bool'
Any ideas?
Best regards,
Gabriel.

Similar Messages

  • Can I include a bean inside a customization project?

    Hi,
    I am customizing out-of-the-box Profile (.jsff) pages. I'll have to create a bean which will get binary data from Oracle. I have a project to customize the Profile pages. Can I include the bean inside the project? Or, should I create a separate project, and have the pages referenced to the bean class. How should I go for that?
    Many Thanks

    Hi,
    For now, you can change any attributes on user's profile page like department and etc. What's about if I want to create a dynamic drop-down department list for a user to pick? The department list will be generated from a database source. In jdeveloper, you can have various roles. I'm switching back and forth between 'default' and 'customization' roles. In the default role, I'm going to create a javabean to create the dynamic department list. In customization role, I customize the 'look and feel' of the profile page. This is kind of pain in the neck. Am I going to a wrong direction? Is there anyway of getting the work done without switching.
    Secondly, on the profile page, I use EL to reference an attribute in a javabean. But, when I load the page, it errors out.
    <Jan 24, 2012 3:16:22 PM EST> <Warning> <oracle.adf.view.rich.component.fragment.UIXRegion> <ADF_FACES-00009> <Error processing viewId: /edit-basic/view1 URI: /oracle/webcenter/peopleconnections/profile/view/jsf/regions/ootbedit/editbasic.jsff actual-URI: /oracle/webcenter/peopleconnections/profile/view/jsf/regions/ootbedit/editbasic.jsff.
    javax.el.PropertyNotFoundException: Target Unreachable, identifier 'PersonBean' resolved to null+
    at com.sun.el.parser.AstValue.getTarget(Unknown Source)
    at com.sun.el.parser.AstValue.isReadOnly(Unknown Source)
    at com.sun.el.ValueExpressionImpl.isReadOnly(Unknown Source)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer._getUncachedReadOnly(EditableValueRenderer.java:486)
    at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.cacheReadOnly(EditableValueRenderer.java:416)
    Any help would be appreciated. Thanks.
    Edited by: 891549 on Jan 26, 2012 9:45 PM

  • Can I include java files into my javafx project?

    If I do so, exception always occurs until I delete the created java files.

    Suppose I include the following class in my project (all other classes are of .jx type)
    public interface ServicePortType extends java.rmi.Remote{
        public String getMessage() throws java.rmi.RemoteException;
    }However if I'm trying to run the whole project,
    the following exception occurs:
    Cannot run program "C:\Program Files\Java\jre6\bin\javac.exe": CreateProcess error=2, The system cannot find the file specified
    C:\Documents and Settings\daps-stg\My Documents\NetBeansProjects\ProductionPath\nbproject\build-impl.xml:143: exec returned: -1
    BUILD FAILED (total time: 0 seconds)If I cancel the java source from my javafx project, it runs normally without any bug.
    So how is this happening and what is the potential solution?
    Thx. -- Isaac.

  • How can I include external code in an Installer?

    My LabVIEW program calls some external code using a Call Library Function Node. The external code takes the form of a DLL, and it needs to be located in the same directory with the executable that LabVIEW builds. However, when I look in the installer properties under Source Files, it won't let me, even under My Computer, except .vi files and a few related types that LabVIEW knows about. I can't select my DLL! And if that's true, this installer spec can't build a complete installer for my program. Is there anyway around this, to get my DLL included?
    Thanks,
    Ken

    To elaborate on smercurio's answer:
    If you only specify the DLL name in the Call Library Node configuration, LabVIEW (actually really Windows) will search through the Windows standard locations to find the DLL. LabVIEW will update the path to show the actual location Windows has found the DLL at, but it will assume that it is a standard DLL that either comes with Windwos itself or its own installer.
    If you enter the entire path to the DLL LabVIEW will include that DLL in the built automaticaly and copy it into the data folder by default.
    If you specify the DLL name on the diagram with the path parameter to the DLL Node, the LabVIEW compiler can not know at compile time what DLL will be used (even if you use a fixed path constant which would be a bad idea anyhow). It is then your responsibility to make sure that the DLL is installed on the target computer at that location.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Can you embed HTML code into a Captivate project?

    Hi there.
    Is it possible to embed HTML code into a project? I can't find any options to do it. I'm using Captivate 7.
    Thanks.

    Yes I am talking about the play button when the course launches.  If you modify the index.html to look like this, the course will automatically play instead of showing the play button.
    function initializeCP()
                    function cpInit()
                                    document.body.innerHTML = "
                                    cp.DoCPInit();
                    if((typeof InitAppPackager !== "undefined") && (typeof InitAppPackager === "function"))
                                    InitAppPackager(cpInit);
                    else
                                    cpInit();
                                    cp.movie.play();
    The part in read is the command that I add to the index to make it autoplay.

  • Where are Cost Codes attached to a Project Number in Financials?

    Where are Cost Codes attached to a Project Number in Financials?
    Don't know where to start looking in the documentation..
    I need to know where I can add GL Cost Codes to a particular Project number for our testing of i-Expenses.
    anybody know?
    many thanks,
    Steven

    Well, not sure what you mean by "cost codes". Normally when I see that wording I think of work breakdowns within a project. I don't think of cost codes as being general ledger numbers. But maybe you are meaning to say general ledger number? I see "Project Number" though, which makes me think you are talking about project accounting. You set up your projects in project accounting and create what Oracle calls Tasks (I like to them of them as cost codes) that you can assign to your projects. So this would all be in Project Accounting. You may want to download the various user guides for Oracle Projects to start learning about this application. You must be running project accounting, correct? So maybe you need to find the person in your company who knows this application and start to get educated on it. There is a separate forum for Projects where this may be a better place to ask this question. You may need to provide more detail on what you are trying to do if you are not involved with project accounting.
    John Dickey

  • Can i include gr/ir account in 3keh trancation code

    hi
    can i include gr/ir account in 3keh trancation code for transferring balance sheet items to profit center accounting.
    thanks,
    monica

    Hi,
    - not sure why you want to include a clearing account in 3KEH
    - use 1KEH for material/stock balance transfers
    - use 3KEI as an alternative
    Rgds.

  • Can you recommend me a PDF to learn to code in Objective-C

    Can you recommend me a PDF to learn to code in Objective-C

    I don't have a specific PDF but a Google search results in many tutorials, documents, classes, etc. to learn Objective C.
    https://www.google.com/search?q=learn+objective+c

  • How can i watch native code for hashCode() in Object class?

    How can i watch native code for hashCode() in Object class?

    Those are two different requirements. You still haven't told us why you want the first one.
    The second one is called JNI - Java Native Interface. There is a forum here, and a large amount of documentation, and a book about it.

  • [SOLVED] Can I submit a package including source code inside to AUR?

    I'm about to make PKGBUILD for scim-unikey (http://code.google.com/p/scim-unikey/), they dont not have a public subversion url right now. The current version on their site is quite old. They update the newest package through a thread here http://forum.ubuntu-vn.org/viewtopic.ph … &sk=t&sd=a (WARNING: it's Vietnamese).
    I want to make a package for the newest version, so my question is: can I include the source code of the newest version inside my tarball to the AUR?
    The wiki http://wiki.archlinux.org/index.php/AUR_User_Guidelines and http://wiki.archlinux.org/index.php/Arc … _Standards dont mention anything about included source code.
    Comments are welcome!
    Last edited by tinhtruong (2009-02-22 07:57:24)

    Many thanks. Here is the details what I've done:
    set the 'source' in the PKGBUILD file like this:
    source=($pkgname-$pkgver.tar.bz2)
    Instead of a valid url, make sure you have the file '$pkgname-$pkgver.tar.bz2' (in my case it's scim-unikey-20090218.tar.bz2) is in the same directory as the PKGBUILD file.
    Hope it could be useful to someone else.

  • (261718088) Q: Can you use xm:multiple with Objects other than String?

    Q: Can you use xm:multiple with Objects other than Strings?
    <br>
    A: You bet. Attached find a text file with some code from the example I showed
    today, a version of the multipleSayHiTo() method that has a parameter of an Array
    of Person objects rather than a parameter of an Array of Strings. The code within
    the text file comes from the Greeting.jws file (the Greeting Web Service).
    [multiple.txt]

    So you are saying that the recovery discs I made do include the copy of windows that was originally installed?
    Absolutely! They will restore the hard disk to its original out-of-the-box contents. Follow the instructions in the section Restoring from recovery DVDs/media, which begins on p. 73 of the User's Guide.
       Satellite A660 Series User’s Guide
    maybe i can make a deal with wd to have them swap this drive out for the BEKT instead...
    That would be a good idea in any case.
    As I said, the 10-fc12-045d error would not be due to the drive's being AFT, but more likely the discs are not being read properly. New discs can be obtained from Toshiba. Scroll down to Get Recovery Media here
    -Jerry

  • Can we include ArrayList into a array

    HI,
    i am newer to java.
    Can we include ArrayList element into an array,
    give the sample code.
    Regards,
    kumar

    Fine. But Here, all of my ArrayList elements are
    string.
    I have to assign all the ArrayList elements into the
    the array.
    Is it possible. give the sample code.Yes say your array list has all string elements here is how you do it...
    ArrayList<String> alist = new ArrayList<String>();
    alist.add("1");
    alist.add("2");
    alist.add("3");
    alist.add("4");
    alist.add("5");
    String arrayStrings[] = alist.toArray(new String[alist.size()]);
    NOTE: Works with J2SE 5.0 or above
    and for 5.0 below the below could be a solution.
    public static void main(String[] args){
    Test test = new Test();
    // Syntatically incorrect
    String[] s1 = new String(lst.size());
    // Would get a Type Cast Exception as ArrayList.toArray() returns Object[] not String[]
    s1 =lst.toArray();
    // and btb what test.toArray() do ??
    //s1 = test.toArray();
    }you may have to restructure it to
    public static void main(String[] args)
      Test test = new Test();
       int size = lst.size();
       String ArrayString[] = new String[size];
       Object k[] = list.toArray();
       for(int i=0 ; i < size; i++)
         ArrayString[i] = (String)k;
    Hope that might be the one...
    REGARDS,
    RaHuL

  • Can 2 locks be in 1 object?

    We learn that every object has one lock associated with it. But with J2SE 5, we seem to be able to define as many Lock objects from class Lock as we like.
    so
    Can 2 locks be in 1 object? with one lock guards some block of code, and the other guards another block of code?
    If it can be, what if Theard A is owning lock 1, and Thread B at the same time wants to acquire lock 2?
    Can Thread B acquire lock 2 if no other thread(including Thread A) compete with it?
    Please enlighten me, thanks!
    Edited by: zuimeng on Jan 10, 2009 4:10 AM
    Edited by: zuimeng on Jan 10, 2009 4:42 AM

    Hi,
    as the previous post states, each java object has one associated monitor. Thus, you can use code like
       public synchronized void foo() {
          // some stuff
       public void bar() {
          //this is equivalent
          synchronized(this) {
             // some more stuff
    ...At the same time, nothing prevents the use of multiple class member variables for the sole purpose of having multiple monitors/locks available:
       private Object myMonitor1 = new Object();
       private Object myMonitor2 = new Object();
       public void foo() {
          synchronized(this.myMonitor2) {
             // some more stuff
       public void bar() {
          synchronized(this.myMonitor1) {
             // some more stuff
    ...And this can also be achieved using java.util.concurrent.Locks:
       private Lock myLock1 = new ReentrantLock();
       private Lock myLock2 = new ReentrantLock();
       public void foo() {
          this.myMonitor2.lock();
          try {
             // some more stuff
          } finally {
             this.myMonitor2.unlock();
       public void bar() {
          this.myMonitor1.lock();
          try {
             // some more stuff
          } finally {
             this.myMonitor1.unlock();
    ...So, if this is what your question was about: yes, there can be multiple monitors/locks associated to one object instance.
    Bye.

  • How can I insert values from table object into a regular table

    I have a table named "ITEM", an object "T_ITEM_OBJ", a table object "ITEM_TBL" and a stored procedure as below.
    CREATE TABLE ITEM
    ITEMID VARCHAR2(10) NOT NULL,
    PRODUCTID VARCHAR2(10) NOT NULL,
    LISTPRICE NUMBER(10,2),
    UNITCOST NUMBER(10,2),
    SUPPLIER INTEGER,
    STATUS VARCHAR2(2),
    ATTR1 VARCHAR2(80),
    ATTR2 VARCHAR2(80),
    ATTR3 VARCHAR2(80),
    ATTR4 VARCHAR2(80),
    ATTR5 VARCHAR2(80)
    TYPE T_ITEM_OBJ AS OBJECT
    ITEMID VARCHAR2(10),
    PRODUCTID VARCHAR2(10),
    LISTPRICE NUMBER(10,2),
    UNITCOST NUMBER(10,2),
    SUPPLIER INTEGER,
    STATUS VARCHAR2(2),
    ATTR1 VARCHAR2(80),
    ATTR2 VARCHAR2(80),
    ATTR3 VARCHAR2(80),
    ATTR4 VARCHAR2(80),
    ATTR5 VARCHAR2(80)
    TYPE ITEM_TBL AS TABLE OF T_ITEM_OBJ;
    PROCEDURE InsertItemByObj(p_item_tbl IN ITEM_TBL, p_Count OUT PLS_INTEGER);
    When I pass values from my java code through JDBC to this store procedure, how can I insert values from the "p_item_tbl" table object into ITEM table?
    In the stored procedure, I wrote the code as below but it doesn't work at all even I can see values if I use something like p_item_tbl(1).itemid. How can I fix the problem?
    INSERT INTO ITEM
    ITEMID,
    PRODUCTID,
    LISTPRICE,
    UNITCOST,
    STATUS,
    SUPPLIER,
    ATTR1
    ) SELECT ITEMID, PRODUCTID, LISTPRICE,
    UNITCOST, STATUS, SUPPLIER, ATTR1
    FROM TABLE( CAST(p_item_tbl AS ITEM_TBL) ) it
    WHERE it.ITEMID != NULL;
    COMMIT;
    Also, how can I count the number of objects in the table object p_item_tbl? and how can I use whole-loop or for-loop to retrieve values from the table object?
    Thanks.

    Sigh. I answered this in your other How can I convert table object into table record format?.
    Please do not open multiple threads. It just confuses people and makes the trreads hard to follow. Also, please remember we are not Oracle employees, we are all volunteers here. We answer questions if we can, when we can. There is no SLA so please be patient.
    Thank you for your future co-operation.
    Cheers, APC

  • How can I include a success message in a drag and drop interaction - I don't see this option in the Actions on success options, and cannot figure it out?

    How can I include a success message in a drag and drop interaction - I don't see this option in the Actions on success options, and cannot figure it out?

    I suspected you used the eye icon on the timeline to hide the message, but that one has no impact whatsoever on the published version. It is only meant to be used for editing reasons on the stage, to hide objects temporarily on a crowded stage. It is confusing, certainly in CP8 where for both instances the same eye icon is used. In previous versions the Properties panel had a checkbox for 'Show in Output', which was IMO much clearer than this eye icon. But of course, that is only my personal opinion.

Maybe you are looking for