2

What is wrong with the following gyp file?

  'targets': [
    {
      'target_name': 'cr',
      'type': 'shared_library',
      'sources': ['cr.cc'],
      'include_dirs': ['.'], 
    },
  ],

When I build this gyp code, it compiles but there is no symbols in the output .so file. When I did

 "nm cr.so" 
I get this following minimal symbols list. It does not contain any of the required symbols.

0000000000001de0 d _DYNAMIC
0000000000001fe8 d _GLOBAL_OFFSET_TABLE_
                 w _Jv_RegisterClasses
0000000000001dc0 d __CTOR_END__
0000000000001db8 d __CTOR_LIST__
0000000000001dd0 d __DTOR_END__
0000000000001dc8 d __DTOR_LIST__
0000000000000ac0 r __FRAME_END__
0000000000001dd8 d __JCR_END__
0000000000001dd8 d __JCR_LIST__
0000000000002010 A __bss_start
                 U __ctype_b_loc
                 w __cxa_finalize
0000000000000a60 t __do_global_ctors_aux
00000000000009b0 t __do_global_dtors_aux
0000000000002008 d __dso_handle
                 w __gmon_start__
                 U __printf_chk
                 U __snprintf_chk
                 U __sprintf_chk
                 U __stack_chk_fail
0000000000002010 A _edata
0000000000002020 A _end
0000000000000a98 T _fini
0000000000000950 T _init
                 U bsearch
0000000000000990 t call_gmon_start
                 U calloc
0000000000002010 b completed.7382
0000000000002018 b dtor_idx.7384
                 U fclose
                 U fopen64
0000000000000a30 t frame_dummy
                 U fread
                 U free
                 U localtime
                 U log10
                 U memcmp
                 U memcpy
                 U memmove
                 U memset
                 U pow
                 U qsort
                 U realloc
                 U strcmp
                 U strlen
                 U strncat
                 U strncmp
                 U strncpy
                 U time

Thanks in advance for your help.

ext.dev
  • 121
  • 6

1 Answers1

0

Try adding your cr.h file into the sources as well.

It'd be helpful if you gave us your full .gyp file as well as what files you were trying to include into the shared library (ie; perhaps some extra header files, some libraries, flags, etc)

Flarex
  • 531
  • 6
  • 16