Re: object file

From: Prawit Chaivong (prawit.c_at_gmail.com)
Date: 03/16/05

  • Next message: Prawit Chaivong: "Re: allocating array in function"
    Date: 15 Mar 2005 23:26:17 -0800
    
    

    "gouqizi.lvcha@gmail.com" <gouqizi.lvcha@gmail.com> wrote in message news:<1110939699.765006.126320@l41g2000cwc.googlegroups.com>...
    > Hi, All:
    >
    > I have an Linux object file, for example, foobar.o. Can I know which
    > version
    > of gcc build it?
    >
    > Rick

    Hi,

    you may need this line in your header file or cpp (up to you)

    extern "C"
    {
       void your_asm_func();
       ....
       ....
       ....
    }

    I would add above in header file.
    If you don't add you will have a problem when you link it.
    Why? because c++ compiler mangle name difference from c compiler.

    Regards,


  • Next message: Prawit Chaivong: "Re: allocating array in function"

    Relevant Pages

    • Re: Buildworld Fails RELENG_7
      ... header file be in the same directory as the source file. ... The problem is that gcc is *not* finding the file in the directory ... compiler or version of the compiler is being found and used in place of ...
      (freebsd-stable)
    • Re: GCC 4.x random code generator for x86_64 ?
      ... to a header file results in something which is beyond me. ... uids and there is a bunch of places in gcc where hash tables are traversed ... of tables hashed by decl uids are far less severe - gcc makes no promises ...
      (Linux-Kernel)
    • Re: extern int pthread_mutex_init (pthread_mutex_t *__restrict __mutex,__const pthread_mutexattr_t *
      ... These are not from the C standard, ... specific header file tricks. ... This looks like some gcc or glibc thing, ... This allows the compiler to do some optimizations. ...
      (comp.lang.c)
    • Re: regarding header files
      ... > I was eager to know, if there's a way to tell gcc to display the full path ... > of header file that's getting included while compiling a code. ... int f ... Look at the "Preprocessor options" from the GCC documentation to have more ...
      (comp.lang.c)
    • Re: Pedants
      ... and the gcc compiler + header files achieve exactly that. ... It is _not_ a bug if a file that is part of the implementation cannot ... if including a standard header file defines ...
      (comp.lang.c)