문제

I am trying to create a makefile through GYP. I had errors saying that ld cannot find the necessary libraries so I included them in ldflags in the gyp file. The code I have is:

'link_settings': {
        'ldflags': [
          '-L/path/to/lib1' , '-L/path/to/lib2', ...
        ],
        'libraries': [
          '-llib1',
          '-llib2', ...
        ],
      },

The previous errors dissappeared, but now I am getting a new one

group ended before it began (--help for usage)
collect2: ld returned 1 exit status

I tried adding the libraries in the 'libraries' list with an absolute path but the result is the same. I saw this question but I don't thing it helps me (or I can't understand how). I would really appreciate your help!

도움이 되었습니까?

해결책

I solved this error by specifying the exact libraries that I wanted to include from each directory:

'ldflags': [
      '-L/path/to/lib1 -llib1' , '-L/path/to/lib2 -llib2', ...
    ],
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top