Gcc | header files

I'm trying to compile my rf driver (8139D chipset).
I did install SWFgcc.
But when i'm trying to make the rf module, it says that mac.h isn't available.
So i did download it from the opensolaris project, and put it into the /usr/include/sys/ directory.
But i got errors like:
gem.h:170: error: syntax error before "mac_t"
gem.h:170: warning: no semicolon at end of struct or union
gem.h:246: error: syntax error before ':' token
gem.h:247: error: syntax error before ':' token
gem.h:248: error: syntax error before ':' token
gem.h:249: error: syntax error before ':' token
.....Other people who are running solaris on x86 didn't have any problems with it?
Is the support really that bad, or did i something wrong?
//edit: Sorry that i posted it in the wrong area

gem.h:170: error: syntax error before "mac_t"
gem.h:170: warning: no semicolon at end of struct or
union
gem.h:246: error: syntax error before ':' token
gem.h:247: error: syntax error before ':' token
gem.h:248: error: syntax error before ':' token
gem.h:249: error: syntax error before ':' token
.....Yeah, read it. It's telling you what's wrong!
First, it says there is a syntax error PRIOR to the "mac_t" - that means your INCLUDE ot whatever command is formed wrong, missing, etc.
Obviously, everything after that error is going to be an error due to the chain effect. Fix that first syntax error and anything else will reveal itself. Just double check your syntax.

Similar Messages

  • Compile error |gcc|header files

    I'm trying to compile my rf driver (8139D chipset).
    I did install SWFgcc.
    But when i'm trying to make the rf module, it says that mac.h isn't available.
    So i did download it from the opensolaris project, and put it into the /usr/include/sys/ directory.
    But i got errors like:
    gem.h:170: error: syntax error before "mac_t"
    gem.h:170: warning: no semicolon at end of struct or union
    gem.h:246: error: syntax error before ':' token
    gem.h:247: error: syntax error before ':' token
    gem.h:248: error: syntax error before ':' token
    gem.h:249: error: syntax error before ':' token
    .....Other people who are running solaris on x86 didn't have any problems with it?
    Is the support really that bad, or did i something wrong?
    //edit: Sorry that i posted it in the wrong area

    gem.h:170: error: syntax error before "mac_t"
    gem.h:170: warning: no semicolon at end of struct or
    union
    gem.h:246: error: syntax error before ':' token
    gem.h:247: error: syntax error before ':' token
    gem.h:248: error: syntax error before ':' token
    gem.h:249: error: syntax error before ':' token
    .....Yeah, read it. It's telling you what's wrong!
    First, it says there is a syntax error PRIOR to the "mac_t" - that means your INCLUDE ot whatever command is formed wrong, missing, etc.
    Obviously, everything after that error is going to be an error due to the chain effect. Fix that first syntax error and anything else will reveal itself. Just double check your syntax.

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

  • Error in header files on DMA using SDK

    I followed procedure as like as simple Hello_world mention in zedboard and chosen "OS Platform as Linux".check out this link i followed the procedure as
    http://zedboard.org/content/zedboard-create-planahead-project-embedded-p....
    Then replaced that Hello_world code by My program.I attached DMA program.while compling I faced error and post in the zedboard->support->s/w development application and then i added header files in the project explorer window in SDK to the include folder as a path.pls check out link below for header file inclusion as http://s1322.photobucket.com/user/Arunvision/media/sdk_bsp_zps99084a46.j...
    we got the error like as
    **** Build of configuration Debug for project Dma ****
    make all
    Building file: ../src/OCM2PL.c
    Invoking: ARM Linux gcc compiler
    arm-xilinx-linux-gnueabi-gcc -Wall -O0 -g3 -I"C:\Xilinx\14.4\ISE_DS\EDK\sw\XilinxProcessorIPLib\drivers\scutimer_v1_00_a\src\" -I"C:\Xilinx\14.4\ISE_DS\EDK\sw\XilinxProcessorIPLib\drivers\dmaps_v1_00_a\src" -I"C:\Xilinx\14.4\ISE_DS\EDK\sw\XilinxProcessorIPLib\drivers\scugic_v1_00_a\src" -I"C:\Xilinx\14.4\ISE_DS\EDK\sw\XilinxProcessorIPLib\drivers\common_v1_00_a\src" -I"C:\Xilinx\14.4\ISE_DS\EDK\sw\lib\bsp\standalone_v3_07_a\src\cortexa9" -c -fmessage-length=0 -MMD -MP -MF"src/OCM2PL.d" -MT"src/OCM2PL.d" -o"src/OCM2PL.o" "../src/OCM2PL.c"
    arm-xilinx-linux-gnueabi-gcc: fatal error: no input files
    compilation terminated.
    make: *** [src/OCM2PL.o] Error 1
    Pls provide solution as soon as possible.

    Ran into a very similar problem compiling code (on win7/64bit) for the zc702 board.    In our case it was due to the cygwin binaries being on the windows PATH.   You won't have to remove cygwin - just remove from the windows path.   
    Also can't take credit - John Zhao and his team at mathworks uncovered it - while we were tracking down a different issue.
    --Bart

  • Header files not found

    I have a piece of code in C with header files included.
    I run it on Mac OS X Maverick with XCode 4.6.2 installed. GCC is also installed. Note that Command Line Tools in XCode are already installed.
    When I compile it, the error I receive says something like this:
    add.c:1:19: error: stdio.h: No such file or directory
    add.c:2:20: error: stdlib.h: No such file or directory
    add.c:3:20: error: unistd.h: No such file or directory
    However when I run it on Ubuntu, it compiles without a problem.
    what to do?

    fredjefrito wrote:
    I run it on Mac OS X Maverick with XCode 4.6.2 installed. GCC is also installed. Note that Command Line Tools in XCode are already installed.
    That doesn't add up. Doesn't Mavericks require Xcode5? Regardless, you should install Xcode5. Forget GCC. That's obsolete.

  • [SOLVED] Where do header files come from?

    I'm a little confused about which files get included when compiling a program in C.
    I made a file named "screen.h". It's pretty obvious that the compiler is trying to use a different "screen.h" than mine, especially since it compiles fine when I rename my file to "screenblarg.h".
    I am making a video game using the Allegro Game Library. Here is the command I use to compile the source files:
    gcc -O2 -Wall -Wextra -ansi -pedantic -c filename.c -I/usr/include
    I "properly" include the necessary files, using quotes and angled brackets, for example, in "main.c":
    #include <allegro.h> /* System header */
    #include "screen.h" /* Local header */
    I'm especially confused because there is no "screen.h" in "/usr/include".
    Does this behavior make sense to anyone? Please let me know if it would help to see the actual code. Thank you!
    Last edited by drcouzelis (2010-08-11 02:00:11)

    tavianator wrote:
    Use gcc -v to see where it's searching for include files.
    Also, -I/usr/include is unnecessary, as gcc will search there for includes by default.
    Thank you for your response. I don't see anything in the output of "gcc -v" that would say where it is searching for header files. (it's from the standard Arch Linux package, by the way)
    Using built-in specs.
    COLLECT_GCC=gcc
    COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
    Target: x86_64-unknown-linux-gnu
    Configured with: ../configure --prefix=/usr --enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-gnu-unique-object --enable-lto --enable-plugin --disable-multilib --disable-libstdcxx-pch --with-system-zlib --with-ppl --with-cloog --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
    Thread model: posix
    gcc version 4.5.0 20100610 (prerelease) (GCC)
    As for including "-I/usr/include", I understand that it's not necessary. It comes from the Allegro command "allegro-config --cflags" in my makefile, which I added to make compiling my program a bit more portable.
    There are two other files on my computer named "screen.h". I tried renaming them, but my program would still not compile.
    A search on the Internet doesn't say anything about a common "screen.h" file in Linux.
    Does the compiler "see" header files (such as a "screen.h") in the libraries that are in "/usr/lib"? Or something? O_o

  • Self-Made Header Files: C

    I've been having a bit of trouble making my own header files in C.  I have a basic test program along the lines of:
    Main Program:
    #include "header.h"
    int main(void){
      foo();
    Header:
    void foo(void);
    Header.c
    #include "header.h"
    defines foo()
    So basically, the syntax is correct (as far as I know), but I have trouble compiling it.  I get an undefined function error with gcc.  Are there some command line compilation arguments I'm missing?  Could someone give me a basic walkthrough of how to make/use my own header files?
    Thanks.

    It's most likely your compilation strategy. When you begin to break things up into mutliple files, you cannot (always) use the gcc form:
    gcc main.c -o main
    as that actually does 2 things at once.  It compiles main.c and then links it.  That is where the undefined function comes from.  It is a linker error.
    To avoid this there are two things you can do.  The "proper" way is to split these steps manually.
    gcc -c main.c
    gcc -c header.c
    The -c flag tells gcc ONLY to compile the code.  This will produce main.o and header.o.
    Now, you can link manually, and you need to link ALL objects that contain used functions.  "undefined" errors result from not linking in something that contains a function used.
    gcc main.o header.o -o main
    Now ./main should run as expected.
    Now.  There is a shorthand to this... but I would recommend using the above way, just to make you more familiar with the separation of the two steps AND what kind of errors are compiler errors vs what kind of errors are linker errors.
    Shorthand:
    gcc main.c header.c -o main
    As with the initial usage, this combines both compilation and linking steps.

  • Solaris 11,  shot of  system header files, how to get them

    os env:
    solaris 11 & sun studio12 & GNU gcc
    I install solaris 11 with liveCD. but shot of some system header files. for example, modctl.h cred.h...
    I install solaris 10 in my virtualbox, system header files are all there.
    question:
    How to install lost system header files in solaris11?
    of course, I don't want to copy these header files from solaris 10 or opensolaris source code.
    thanks.

    to find the package, run pkg search to find which package your file belongs to:
    # pkg search modctl.h
    INDEX ACTION VALUE PACKAGE
    basename file usr/include/sys/modctl.h pkg:/system/[email protected]
    now that you know the package name (system/header), you can install it with pkg install:
    # pkg install system/header
    .7/M.

  • Session variable and Tracking in Header file

    Is there a way for me to keep track of the session and use a variable in my Header to pass around for this?
    I have a login.jsp, validate_login.jsp and other jsp's that have the same header file. Instead of me using the same code in all of the jsp's I thought it would be easier to put it in the header Please look at the example code below:
    // validate_login.jsp is passed username and password from the login.jsp.
    // validate_login then calls the logIn method in my Session class.
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@page import="uom.edu.rd.session.Session"%>
    <html>
    <head><title>Validate Login</title></head>
    <body>
    <jsp:include page="header.jsp" />
    <%
        String username = request.getParameter("username");
        String password = request.getParameter("password");
        this_session.logIn(username, password);   
        boolean b = this_session.getLoggedIn();
    %>
    ==================================================================
    // The logIn method in Session class
    public void logIn(String userName, String password) {
             Connection con = null;
             Statement stmt = null;
             ResultSet rs = null;
             try{
                con = db.getConnection();
                 stmt = con.createStatement();
                 String sql = "SELECT * FROM RD_USER WHERE USER_NAME = '" + userName +"' AND USER_PASSWORD = '" + password + "'";
                  rs = stmt.executeQuery(sql);
                  if(rs.next()){
                       loggedIn=true;
                  }else{
                       loggedIn=false;
             catch(Exception e){
                  // If something goes wrong, make sure
                  // the user is not logged in.
                  loggedIn=false;
              }finally{
                  try{
                       rs.close();
                       stmt.close();
                       con.close();
              }catch(Exception e){
         * Log the user out.
        public void logOut() {
             loggedIn = false;
         * Get the login status.
         * @return boolean
        public boolean getLoggedIn() {
             return loggedIn;
    ==================================================================
    // and this is part of my header.jsp
    <%@page import="uom.edu.rd.session.Session"%>
    <%
      Session this_session = Session.findSession(request);
      if ( this_session==null ) {
          /* Now, instead of redirecting, create a new Session
           * object and initialize it.
          this_session = new Session();
          this_session.makeSession(request);
          this_session.createQueryBuilder(config);     
    %>
    // This is the part I would like to pass around
    <!-- Session logged_in = new Session(); -->
    <%   
        boolean loggedIn = this_session.getLoggedIn();    
            if (loggedIn == false)
            { %>
                <A STYLE="color:#FFFFFF;text-decoration:none;" HREF="./login.jsp"><FONT COLOR="#FFFFFF">LOG IN</font></a>  <FONT COLOR="#FFFFFF"></font>
        <%  } else { %>
                <A STYLE="color:#FFFFFF;text-decoration:none;" HREF="./logout.jsp"><FONT COLOR="#FFFFFF">LOG OUT</font></a>  <FONT COLOR="#FFFFFF"></font>
         <% }
    %>
    // so if you are logged in  then you are able to view certain things on the jsp's if you are not logged in
    // then of course you cannot. I want to pass around this loggedIn variable to all the jsp's
    // after it checks  loggIn Status for each page I have tried running this but I keep getting an error: cannot resolve symbol this_session

    Use <%@ include file="header.jsp" %> instead

  • How can I use a dll if I dont have a header file

    I'm not sure if I'm even trying the possible here as I have searched and not been able to find much at all.  However I figured it was worth asking here.
    I have access to several dll's used by a program, I need to open a file using the program (for some reason it is completely non responsive unless you open it "within" the program itself) and so decided to browse the .dll files included.  Ive found a few functions which may carry out the function I need.  Is there a way of figuring out the inputs/outputs if I don't have documentation or a header file?
    This is the next stage in a huge project I am working on at the moment and I've been banging my head against the wall all day trying to figure this out.
    Thanks in advance for any help
    Rik
    That glass?
    Thats glass is neither half full or half empty....
    Its twice the size it needs to be

    Yes, that makes sense. It also means that what you are trying to do is not likely to work. You have no way of knowing what the program does when opening the file, so guessing at using the DLLs is purely a shot in the dark without even knowing where the dark is. Even if you could find the function (assuming it's just one) that loads a file, how is the program supposed to use it now? That function has to be called from within the program. When you call it from LabVIEW you are not sitting inside the program's memory space, so it has no way of knowing about the file.
    I would suggest, instead, to see if the program accepts command-line parameters. For example, does it accept a name of a file to open as part of launching it from the command line? If not, then you may need to resort to trying to control it via automation. If it has no built-in automation then you need to resort to using the OS to make pretend you're clicking buttons and typing text. This has come up many times before, and there have been numerous posts on this, so please do a search on controlling an external program from LabVIEW within this forum. You can call the Windows API functions to move the mouse to a specific location and click the button as well as typing text, or you can use third-part automation tools. One that I have used successfully is AutoIt. The search I indicated will yield other suggestions. 

  • 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

  • Header file entry for Text Channel

    I have taken an ASCII Text Data file, read the file, and created a Header File, then saved the data into a binary file. This is my attempt to speed up the loading of the text file. One of the columns is a text column, containing a flag for the state of the test. I can not figure out how to define the column as a Text Column in the Header File. If I define it as a numeric column, it returns an error for every entry in the data file. Normal (one of the states) is not a Numeric Value.
    The script file(s) I am using is a modification of a script listed on this board by Brad Turpin ( TimeSlice DAT Hdr Create.zip ) The only thing I have changed is the Test for the Channel Name to see if it contains on of 3 states. If Date is present in the Channel Name , it changes the field to a Time channel, if the channel contains Relay it changes it to a Text channel (which doesn't work), else the Channel is a Numeric.
    There must be a way to define a Text Channel in a Header File. I hope someone can show me the way.
    Thanks
    Bill Lane
    Test Engineer
    Takata, INC.

    Hello Bill!
    The DAT format was never able to store text channels (TDM is able today). Please refer to the DAT format description on your DIAdem CD or in this post.
    Your idea to convert it to a numeric value is the right way. The error message must come out of the header. Do you convert all properties to numeric values? See page 4-6 and following in the header description or search for the word 'normal' in the created header file.
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

  • 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

  • Create header file based on data in Data file

    Hi,
    For Data File: created an interface to extract data from table to data file.
    1) Now i want to create a header file which contains info like :
    Created On: #Rows Fetched:
    2) I also want to create a footer, which contains info like:
    SUM(AMOUNT) (amount is one of the columns of data file)
    How do i implement this using an interface?
    Thanks.

    Step 1. Create a Variable Header - Call the count using some thing like this SELECT COUNT(*)||CHR(10) FROM TABLE
    Step 2. Call it in OdiOutFile
    Step 3 . Call the Interface to load from table to File using [ IKM SQL to File Append  with create Header option - no ]
    Step 4. Create another Variable Footer - Call the sum in the Refreshing Tab
    Step 5. Call it in OdiOutfile with Append option Checked
    Note - Make sure you use the same File Name for all the three places.
    There are other ways too but this is simple way. Hope this helps.

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

Maybe you are looking for

  • File proxy to poll for a dynamic filename

    I have a requirement to move a file from one folder(A) to another(B) but I do not want to move every file thats created/placed in source folder(A). I get the filename thats dynamically created from a JMS queue and want to copy that particular file al

  • TS1424 bought a song, and it is corrupt and will not download

    iTunes prompted me to check for availabe downloads for support, I did this three times and still the song will not download.  And it is already purchased, so I cannot try a different download.  HELP

  • Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-20001:

    Hi, Using HTMLDB 2.0 we have created several Master Detail forms using wizard. When we have started testing our application recently we are realising that most of the master details forms not working with an error "Error in mru internal routine: ORA-

  • How to use the Portal Connection Service in a standard J2EE application

    Hi, We want to use portal connection service to connection backgend system from a standard j2ee application. But the connection need a connectionProperties object which is created in this way: ConnectionProperties connectionProperties = new Connectio

  • VAT Configuration/ condition technique

    Hello Sapients We have a sales company in Europe, and we are selling goods in multiple european union countries. Now we have just started selling goods in couple of other EU Countries. I need to configure Tax (VAT) for those transactions. I have Tax