1

I am trying to build GYP in node js for Windows and linux version. There are separate library for both the version which is used for building. The binding.gyp has the below info.

{
    'targets': [
        {
            'target_name': 'tibcoems_win32',
            'sources': [ 'enqueue.cpp' ],
            'libraries': [ 
                '..\\lib\\win32\\tibems.lib',
                '..\\lib\\win32\\libtibems.lib',
            ]
        },
        {
            'target_name': 'copy_tibcoems_win32',
            'type':'none',
            'dependencies' : [ 'tibcoems_win32' ],
            'copies': [
                {
                    'destination': '<(module_root_dir)\dist\dll',
                    'files': [
                        '<(module_root_dir)/build/Release/tibcoems_win32.exp',
                        '<(module_root_dir)/build/Release/tibcoems_win32.node'
                    ]
                }
            ]
        },
        {
            'target_name': 'tibcoems_linux32',
            'dependencies' : [ 'copy_tibcoems_win32' ],
            'sources': [ 'enqueue.cpp' ],
            'libraries': [ 
                '..\\lib\\linux32\\libtibems.a',
            ]
        },
        {
            'target_name': 'copy_tibcoems_linux32',
            'type':'none',
            'dependencies' : [ 'tibcoems_linux32' ],
            'copies': [
                {
                    'destination': '<(module_root_dir)\dist\linux32',
                    'files': [
                        '<(module_root_dir)/build/Release/tibcoems_linux32.exp',
                        '<(module_root_dir)/build/Release/tibcoems_linux32.node'
                    ]
                }
            ]
        }
    ]
}

When i execute the command npm install, i get the below error.

..\lib\linux32\libtibems.a : fatal error LNK1107: invalid or corrupt file: cannot read at 0xF06B0.

Please help on this.

Muthuraman
  • 23
  • 1
  • 5

0 Answers0