library 설치시 LNK 1181 에러 발생하는 경우

조회수 420회
from setuptools import setup
from distutils.extension import Extension
from Cython.Build import cythonize
import os.path
import numpy as np

extensions = [
    Extension("*", ["pyrirgen.pyx"],
        include_dirs=[
            os.path.abspath("."),
        ],
        library_dirs=[os.path.abspath(".")],
        libraries=["rirgen"], #지우니 설치됨. but other error LNK1120 발생
        language='c++'
    ),
]

setup(
    name = 'pyrirgen',
    ata_files = [('', ['librirgen.so'])],
    ext_modules=cythonize(extensions, compiler_directives = {
        'language_level': 3, # Python 3
        'embedsignature': True, # add method signature to docstrings, thus tools can display it after compilation
        'c_string_encoding': 'default',
        'c_string_type': 'str',
    }),
)

위의 라이브러리를 설치하려고 하는데, 아나콘다 프롬프트에서 python3 setup.py build_ext --inplace를 실행하니 LNK 1181 error라 하여 'rirgen.lib'을 열 수 없습니다고 합니다... 이것저것 찾아보니 libraries=["rirgen"]를 지워보라길래 그리하니 이번엔 LNK1120 error라고 외부참조를 확인 할 수 없습니다고 합니다... 어떻게 해결 할 수 있을까요?

  • (•́ ✖ •̀)
    알 수 없는 사용자
  • pyx 파일을 cython 으로 실행하면 c파일이 나옵니다. c 파일을 컴파일해보세요. 정영훈 2020.9.2 13:10
  • 답변 감사합니다. 말씀해주신대로 cython으로pyx를 컴파일 하기 위해 "python3 setup.py build_ext --inplace"를 입력한 것인데 LNK 1118 에러가 발생했습니다.. 제가 초보라 그런데 말씀하신 방법이 이것이 맞나요? 알 수 없는 사용자 2020.9.10 22:15

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)