精华内容
下载资源
问答
  • user32.lib

    2015-09-16 22:24:37
    安装vs2013 express版本后,新建一个工程,编译后提示错误:fatal error LNK1104: cannot open file 'user32.lib'。多方寻找,找到了一个user32.lib,供需要的同学下载使用。
  • json-lib-2.4和相应的依赖包

    千次下载 热门讨论 2016-05-10 00:28:37
    json的核心包:json-lib-2.4-jdk15.jar;json-2.4所依赖的jar包:commons-beanutils-1.8.0.jar,commons-collections-3.2.1.jar,commons-lang-2.5.jar,commons-logging-1.1.1.jar,ezmorph-1.0.6.jar;以及和...
  • json-lib-2.3-jdk15开发包和所有依赖包
  • net.sf.json使用的lib(包括依赖lib

    千次下载 热门讨论 2014-09-19 17:35:55
    net.sf.json使用的lib(包括依赖lib) 1.commons-lang.jar 2.commons-beanutils.jar 3.commons-collections.jar 4.commons-logging.jar 5.ezmorph.jar 6.json-lib-2.2.2-jdk15.jar
  • tesseract_dll_lib_vs2010编译好的dll库和lib文件,包含以下8个文件:liblept168.dll,liblept168.lib,liblept168d.dll,liblept168d.lib libtesseract302.dll,libtesseract302.lib,libtesseract302d.dll ...
  • 使用PDFLIB库实现对pdf文件的读取

    热门讨论 2015-06-13 16:42:22
    在VS2010的开发环境下,使用PDFLIB TET库实现对pdf文件的读取
  • libcurl.lib下载(32bit和64bit)

    热门讨论 2015-09-17 10:09:25
    http://blog.csdn.net/laoyang360/article/details/48517865 64bit libcurl.lib生成步骤及注意事项详解
  • openssl 静态 链接库 libeay32.lib ssleay32.lib

    千次下载 热门讨论 2012-01-12 13:27:50
    openssl 1.0.0b 的静态链接库 libeay32.lib ssleay32.lib,用他编译无需dll就可以运行。 网上找不到,自己动手弄的,需要的同学你懂的。 编译参数: /MT /Ox /O2 /Ob2 -O -DOPENSSL_NO_RC5 -DOPENSSL_NO_MD2 -...
  • MFC42U.LIB MFC42UD.LIB MFCS42U.LIB MFCS42UD.LIB

    千次下载 热门讨论 2012-06-11 10:27:38
    VC++6.0安装包里的四个文件: MFC42U.LIB MFC42UD.LIB MFCS42U.LIB MFCS42UD.LIB
  • stm32f10x_lib.h

    千次下载 热门讨论 2014-01-15 11:24:29
    原来偶是使用keil 3.80的编译器系统,能正常的将#include <stm32f10x_lib.h>头信息正常编译,后来升级到了keil 4.60之后就出现在can not open source input file 'stm32f10x_lib.h' 导致编译不能通过了,为了解决这个...
  • OpenGL库文件工具包(opengl32.lib glu32.lib glaux.lib glew32.lib
  • json-lib的jar包

    千次下载 热门讨论 2012-07-11 16:33:00
    son-lib的jar包和5个参照包。commons-beanutils-1.8.0.jar,commons-collections-3.2.1.jar,commons-lang-2.5.jar,commons-logging-1.1.1.jar,ezmorph-1.0.6.jar,json-lib-2.4-jdk15.jar
  • LibTools-Viewer1.0 windows lib dll库函数查看器

    千次下载 热门讨论 2015-05-22 14:05:02
    LibTools-Viewer1.0 windows lib dll库函数查看器,只能查看函数名
  • PDFLib中文开发文档

    热门讨论 2013-08-29 11:24:37
    PDFlib-API-reference-7.0.1-中文.pdf PDFlib-API-reference-8.0.2.pdf PDFlib-tutorial-7.0.1-中文.pdf PDFlib-tutorial-8.0.2.pdf http://blog.csdn.net/usister/article/details/10499457
  • freeglut预编译版(头文件+lib+dll)

    千次下载 热门讨论 2015-12-03 22:04:51
    因为freeglut3.0之后没有再直接提供预编译版本的lib和dll,这是一个已经经过cmake编译好的windows平台下的freeglut的预编译内容,包含头文件,lib和dll,有debug版本和release版本两种
  • 32位libmysql.dll和32位libmysql.lib

    千次下载 热门讨论 2014-08-01 19:23:18
    在用mfc进行编程与数据库进行连接的时候 ,往往vc6.0编译不了win7 64位的文件,这时候就需要32位操作文件了。
  • JSON-lib包json-lib-0.8.jar和json-lib-0.9.jar包
  • 32/64位MySql(lib、dll)资源

    千次下载 热门讨论 2015-02-21 20:07:53
    32和64位MySql(lib、dll),资源包括32位和64位的libmysql.lib和libmysql.dll文件
  • json-lib-2.4-jdk15及其全部依赖jar包

    千次下载 热门讨论 2014-04-18 10:23:15
    json-lib-2.4-jdk15及其全部依赖jar包 commons-beanutils-1.8.0.jar、commons-collections-3.2.1.jar、commons-lang-2.6.jar、commons-logging-1.1.1.jar、ezmorph-1.0.6.jar、json-lib-2.4-jdk15.jar、xom-1.2.6....
  • PDFlib 8.0.2 C++ 破解版

    千次下载 热门讨论 2011-02-21 13:24:32
    PDFLib是用于创建PDF文档的开发库,提供了简单易用的API,隐藏了创建PDF的复杂细节且不需要第3方软件的支持。 破解内容: 1、删除未注册时生成PDF文件中的水印; 2、删除生成PDF文件属性中的制作者未授权信息 个人...
  • ws2_32.lib.zip

    千次下载 热门讨论 2013-06-08 21:49:11
    ws2_32.lib.zip 包含ws2_32.dll和ws2_32.lib 所在路径; C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib
  • json-lib 2.3,

    千次下载 热门讨论 2010-04-03 22:34:09
    最新json-lib包以及依赖包全下载,以下是官方提供的描述,我这里只下载了至少用到的包,如果项目中要用到working with XML, Groovy and JRuby.这些还得须要另外的包,大家自己去找,我们一般人用不到,我就不找了。 ...
  • MFC42U.LIB 和 MFCS42U.LIB 下载

    热门讨论 2011-10-28 14:52:26
    vc6.0安装盘里面 *\VC98\lib\ MFC42U.LIB 和 MFCS42U.LIB 下载
  • hid.lib setupapi.lib 等HID开发相关的库和头文件

    千次下载 热门讨论 2010-09-26 14:38:51
    在Jan Axelson的版本上修改,VC6开发HID上位软件的相关库和头文件,包括XP前的版本和XP后的版本。XP后的版本增加了HidD_SetOutputReport, HidD_GetInputReport等...hid.lib hidsdi.h hidpi.h setupapi.lib setupapi.h
  • Keil对lib封装库反汇编成C语言.pdf

    热门讨论 2013-05-06 21:02:50
    Keil对lib封装库反汇编成C语言.pdf
  • (dm) hellopython@ubuntu:~$ pip install TA-Lib Collecting TA-Lib Using cached ...

    Ubuntu18.04
    正常的可以Building wheels for collected packages: TA-Lib,所以问题原因:没有wheel for TA-Lib ,网上的大部分都是介绍Windows的wheel,可能是Windows容易出现这问题,但我的是自己找的Linux新版本,可能缺很多包,包括wheel。如果你觉得某些步骤不需要请能告诉我,因为有些步骤可能是没必要,是为应对当时情况做测试。反正没坏处。

    (dm) hellopython@ubuntu:~$ pip install TA-Lib
    Collecting TA-Lib
      Using cached https://files.pythonhosted.org/packages/90/05/d4c6a778d7a7de0be366bc4a850b4ffaeac2abad927f95fa8ba6f355a082/TA-Lib-0.4.17.tar.gz
    Requirement already satisfied: numpy in ./.virtualenvs/dm/lib/python3.6/site-packages (from TA-Lib) (1.14.2)
    Building wheels for collected packages: TA-Lib
      Building wheel for TA-Lib (setup.py) ... error
      ERROR: Command errored out with exit status 1:
       command: /home/hellopython/.virtualenvs/dm/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2wb288y3/TA-Lib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2wb288y3/TA-Lib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-tu131bdx --python-tag cp36
           cwd: /tmp/pip-install-2wb288y3/TA-Lib/
      Complete output (25 lines):
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.6
      creating build/lib.linux-x86_64-3.6/talib
      copying talib/abstract.py -> build/lib.linux-x86_64-3.6/talib
      copying talib/test_data.py -> build/lib.linux-x86_64-3.6/talib
      copying talib/deprecated.py -> build/lib.linux-x86_64-3.6/talib
      copying talib/stream.py -> build/lib.linux-x86_64-3.6/talib
      copying talib/test_abstract.py -> build/lib.linux-x86_64-3.6/talib
      copying talib/test_pandas.py -> build/lib.linux-x86_64-3.6/talib
      copying talib/__init__.py -> build/lib.linux-x86_64-3.6/talib
      copying talib/test_func.py -> build/lib.linux-x86_64-3.6/talib
      copying talib/test_stream.py -> build/lib.linux-x86_64-3.6/talib
      running build_ext
      building 'talib._ta_lib' extension
      creating build/temp.linux-x86_64-3.6
      creating build/temp.linux-x86_64-3.6/talib
      x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/hellopython/.virtualenvs/dm/lib/python3.6/site-packages/numpy/core/include -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/usr/include/python3.6m -I/home/hellopython/.virtualenvs/dm/include/python3.6m -c talib/_ta_lib.c -o build/temp.linux-x86_64-3.6/talib/_ta_lib.o
      talib/_ta_lib.c:4:10: fatal error: Python.h: No such file or directory
       #include "Python.h"
                ^~~~~~~~~~
      compilation terminated.
      error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
      ----------------------------------------
      ERROR: Failed building wheel for TA-Lib
      Running setup.py clean for TA-Lib
    Failed to build TA-Lib
    Installing collected packages: TA-Lib
        Running setup.py install for TA-Lib ... error
        ERROR: Command errored out with exit status 1:
         command: /home/hellopython/.virtualenvs/dm/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2wb288y3/TA-Lib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2wb288y3/TA-Lib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-aibubswe/install-record.txt --single-version-externally-managed --compile --install-headers /home/hellopython/.virtualenvs/dm/include/site/python3.6/TA-Lib
             cwd: /tmp/pip-install-2wb288y3/TA-Lib/
        Complete output (25 lines):
        running install
        running build
        running build_py
        creating build
        creating build/lib.linux-x86_64-3.6
        creating build/lib.linux-x86_64-3.6/talib
        copying talib/abstract.py -> build/lib.linux-x86_64-3.6/talib
        copying talib/test_data.py -> build/lib.linux-x86_64-3.6/talib
        copying talib/deprecated.py -> build/lib.linux-x86_64-3.6/talib
        copying talib/stream.py -> build/lib.linux-x86_64-3.6/talib
        copying talib/test_abstract.py -> build/lib.linux-x86_64-3.6/talib
        copying talib/test_pandas.py -> build/lib.linux-x86_64-3.6/talib
        copying talib/__init__.py -> build/lib.linux-x86_64-3.6/talib
        copying talib/test_func.py -> build/lib.linux-x86_64-3.6/talib
        copying talib/test_stream.py -> build/lib.linux-x86_64-3.6/talib
        running build_ext
        building 'talib._ta_lib' extension
        creating build/temp.linux-x86_64-3.6
        creating build/temp.linux-x86_64-3.6/talib
        x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/hellopython/.virtualenvs/dm/lib/python3.6/site-packages/numpy/core/include -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/usr/include/python3.6m -I/home/hellopython/.virtualenvs/dm/include/python3.6m -c talib/_ta_lib.c -o build/temp.linux-x86_64-3.6/talib/_ta_lib.o
        talib/_ta_lib.c:4:10: fatal error: Python.h: No such file or directory
         #include "Python.h"
                  ^~~~~~~~~~
        compilation terminated.
        error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
        ----------------------------------------
    ERROR: Command errored out with exit status 1: /home/hellopython/.virtualenvs/dm/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2wb288y3/TA-Lib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2wb288y3/TA-Lib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-aibubswe/install-record.txt --single-version-externally-managed --compile --install-headers /home/hellopython/.virtualenvs/dm/include/site/python3.6/TA-Lib Check the logs for full command output.
    
    

    参考:https://blog.csdn.net/qq_41672744/article/details/87774853
    我已经把 sudo apt-get install libssl-dev libffi-dev python-dev build-essential libxml2-dev libxslt1-dev 搞定后再做如下:

    (dm) hellopython@ubuntu:~$ sudo apt-get install libssl-dev libffi-dev python-dev build-essential libxml2-dev libxslt1-dev
    .......省略。
    
    (dm) hellopython@ubuntu:~$ sudo pip install TA-Lib
    Traceback (most recent call last):
      File "/usr/bin/pip", line 9, in <module>
        from pip import main
    ImportError: cannot import name main
    
    (dm) hellopython@ubuntu:~$ sudo gedit /usr/bin/pip
    

    在打开的文本中把原本的3行代码注释掉,粘贴上新的3行内容后关闭文本,如下:

    #from pip import main
    #if __name__ == '__main__':
    #   sys.exit(main())
    
    from pip import __main__
    if __name__ == '__main__':
        sys.exit(__main__._main())
    

    参考:http://www.mamicode.com/info-detail-2669962.html

    (dm) hellopython@ubuntu:~$ sudo pip install TA-Lib
    DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
    WARNING: The directory '/home/hellopython/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    WARNING: The directory '/home/hellopython/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    Collecting TA-Lib
      Downloading https://files.pythonhosted.org/packages/90/05/d4c6a778d7a7de0be366bc4a850b4ffaeac2abad927f95fa8ba6f355a082/TA-Lib-0.4.17.tar.gz (717kB)
         |████████████████████████████████| 727kB 405kB/s 
    Collecting numpy
      Downloading https://files.pythonhosted.org/packages/d7/b1/3367ea1f372957f97a6752ec725b87886e12af1415216feec9067e31df70/numpy-1.16.5-cp27-cp27mu-manylinux1_x86_64.whl (17.0MB)
         |████████████████████████████████| 17.0MB 4.6MB/s 
    Building wheels for collected packages: TA-Lib
      Building wheel for TA-Lib (setup.py) ... error
      ERROR: Command errored out with exit status 1:
       command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-HwVNMe/TA-Lib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-HwVNMe/TA-Lib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-VYFZsS --python-tag cp27
           cwd: /tmp/pip-install-HwVNMe/TA-Lib/
      Complete output (5 lines):
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/tmp/pip-install-HwVNMe/TA-Lib/setup.py", line 62, in <module>
          import numpy
      ImportError: No module named numpy
      ----------------------------------------
      ERROR: Failed building wheel for TA-Lib
      Running setup.py clean for TA-Lib
      ERROR: Command errored out with exit status 1:
       command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-HwVNMe/TA-Lib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-HwVNMe/TA-Lib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
           cwd: /tmp/pip-install-HwVNMe/TA-Lib
      Complete output (5 lines):
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/tmp/pip-install-HwVNMe/TA-Lib/setup.py", line 62, in <module>
          import numpy
      ImportError: No module named numpy
      ----------------------------------------
      ERROR: Failed cleaning build dir for TA-Lib
    Failed to build TA-Lib
    Installing collected packages: numpy, TA-Lib
        Running setup.py install for TA-Lib ... done
    Successfully installed TA-Lib-0.4.17 numpy-1.16.5
    
    hellopython@ubuntu:/usr/local/bin$ pip3 install wheel
    Collecting wheel
      Using cached https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl
    Installing collected packages: wheel
    Successfully installed wheel-0.33.6
    
    hellopython@ubuntu:/usr/local/bin$ pip3 install TA-Lib
    Collecting TA-Lib
      Using cached https://files.pythonhosted.org/packages/90/05/d4c6a778d7a7de0be366bc4a850b4ffaeac2abad927f95fa8ba6f355a082/TA-Lib-0.4.17.tar.gz
    Collecting numpy (from TA-Lib)
      Using cached https://files.pythonhosted.org/packages/d2/ab/43e678759326f728de861edbef34b8e2ad1b1490505f20e0d1f0716c3bf4/numpy-1.17.4-cp36-cp36m-manylinux1_x86_64.whl
    Building wheels for collected packages: TA-Lib
      Running setup.py bdist_wheel for TA-Lib ... done
      Stored in directory: /home/hellopython/.cache/pip/wheels/2a/2e/ec/71c565b2e0091e03a2b56abfbfd062f14a01a8d7b20ffe8bd5
    Successfully built TA-Lib
    Installing collected packages: numpy, TA-Lib
    Successfully installed TA-Lib-0.4.17 numpy-1.17.4
    
    hellopython@ubuntu:/usr/local/bin$ sudo apt-get install python3-pip python3-setuptools python3-dev python3-wheel
    [sudo] password for hellopython: 
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    python3-setuptools is already the newest version (39.0.1-2).
    python3-wheel is already the newest version (0.30.0-0.2).
    python3-wheel set to manually installed.
    python3-dev is already the newest version (3.6.7-1~18.04).
    python3-pip is already the newest version (9.0.1-2.3~ubuntu1.18.04.1).
    0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
    hellopython@ubuntu:/usr/local/bin$ pip install TA-Lib
    Collecting TA-Lib
    Collecting numpy (from TA-Lib)
      Using cached https://files.pythonhosted.org/packages/d2/ab/43e678759326f728de861edbef34b8e2ad1b1490505f20e0d1f0716c3bf4/numpy-1.17.4-cp36-cp36m-manylinux1_x86_64.whl
    Installing collected packages: numpy, TA-Lib
    Successfully installed TA-Lib-0.4.17 numpy-1.17.4
    
    hellopython@ubuntu:~$ ls -a
    Documents         .profile                         .virtualenvs
    ......
    hellopython@ubuntu:~$ cd .virtualenvs/
    hellopython@ubuntu:~/.virtualenvs$ ls
    dm               postdeactivate    preactivate      prermvirtualenv
    get_env_details  postmkproject     predeactivate
    initialize       postmkvirtualenv  premkproject
    postactivate     postrmvirtualenv  premkvirtualenv
    hellopython@ubuntu:~/.virtualenvs$ source dm/bin/activate
    (dm) hellopython@ubuntu:~/.virtualenvs/dm/bin$ pip3 install TA-Lib
    Processing /home/hellopython/.cache/pip/wheels/2a/2e/ec/71c565b2e0091e03a2b56abfbfd062f14a01a8d7b20ffe8bd5/TA_Lib-0.4.17-cp36-cp36m-linux_x86_64.whl
    Requirement already satisfied: numpy in /home/hellopython/.virtualenvs/dm/lib/python3.6/site-packages (from TA-Lib) (1.14.2)
    Installing collected packages: TA-Lib
    Successfully installed TA-Lib-0.4.17
    

    我在物理机中安装了TA-Lib,所以dm虚拟机里pip3 install TA-Lib 就不需安装,引用就好,才可在pip3 freeze中看到TA-Lib。

    (dm) hellopython@ubuntu:~/.virtualenvs$ pip3 freeze
    TA-Lib==0.4.17
    ......
    

    sudo pip install TA-Lib 相比 pip install TA-Lib是有root权限来安装的,即使报错也会忽略,直到安装成功,但是问题还在。我这系统默认用python2来安装TA-Lib。pip3就用python3解释器。

    总结:该问题可能是因为缺少wheel,所以pip3 install wheel,再不行sudo apt-get install python3-pip python3-setuptools python3-dev python3-wheel,期间遇到的其它问题参考上面,建议用pip3 install xxx而先别sudo pip3 install xxx, 毕竟最好把问题都修复好才安装嘛,但是急用就选后者。

    展开全文
  • http://blog.csdn.net/zm_li_share/article/details/17934735 详见此博客介绍。
  • json-lib-2.4-jdk15包含依赖JAR包和简单示例

    千次下载 热门讨论 2012-04-18 19:14:55
    json-lib-2.4-jdk15.jar|commons-beanutils-1.8.3.jar|commons-collections-3.2.1.jar|commons-lang-2.6.jar|commons-logging-1.1.1.jar|ezmorph-1.0.6.jar|简单json-lib示例工程,真心分享,希望能够帮到你!
  • pip3 install ta-lib报错,安装失败,后来用brew install ta-lib同样安装失败 Collecting ta-lib Using cached ...

    pip3 install ta-lib报错,安装失败,后来用brew install ta-lib同样安装失败
    Collecting ta-lib
      Using cached https://files.pythonhosted.org/packages/90/05/d4c6a778d7a7de0be366bc4a850b4ffaeac2abad927f95fa8ba6f355a082/TA-Lib-0.4.17.tar.gz
    Requirement already satisfied: numpy in /usr/local/lib/python3.7/site-packages (from ta-lib) (1.16.4)
    Building wheels for collected packages: ta-lib
      Building wheel for ta-lib (setup.py) ... error
      ERROR: Complete output from command /usr/local/opt/python/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/tp/2w6c9_rd1sd7r49r8tytbn540000gn/T/pip-install-1vrmhvnc/ta-lib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/tp/2w6c9_rd1sd7r49r8tytbn540000gn/T/pip-wheel-6nilswsw --python-tag cp37:
      ERROR: /private/var/folders/tp/2w6c9_rd1sd7r49r8tytbn540000gn/T/pip-install-1vrmhvnc/ta-lib/setup.py:79: UserWarning: Cannot find ta-lib library, installation may fail.
        warnings.warn('Cannot find ta-lib library, installation may fail.')
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.14-x86_64-3.7
      creating build/lib.macosx-10.14-x86_64-3.7/talib
      copying talib/abstract.py -> build/lib.macosx-10.14-x86_64-3.7/talib
      copying talib/test_abstract.py -> build/lib.macosx-10.14-x86_64-3.7/talib
      copying talib/deprecated.py -> build/lib.macosx-10.14-x86_64-3.7/talib
      copying talib/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/talib
      copying talib/stream.py -> build/lib.macosx-10.14-x86_64-3.7/talib
      copying talib/test_pandas.py -> build/lib.macosx-10.14-x86_64-3.7/talib
      copying talib/test_data.py -> build/lib.macosx-10.14-x86_64-3.7/talib
      copying talib/test_func.py -> build/lib.macosx-10.14-x86_64-3.7/talib
      copying talib/test_stream.py -> build/lib.macosx-10.14-x86_64-3.7/talib
      running build_ext
      building 'talib._ta_lib' extension
      creating build/temp.macosx-10.14-x86_64-3.7
      creating build/temp.macosx-10.14-x86_64-3.7/talib
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/lib/python3.7/site-packages/numpy/core/include -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c talib/_ta_lib.c -o build/temp.macosx-10.14-x86_64-3.7/talib/_ta_lib.o
      talib/_ta_lib.c:526:10: fatal error: 'ta-lib/ta_defs.h' file not found
      #include "ta-lib/ta_defs.h"
               ^~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command 'clang' failed with exit status 1
      ----------------------------------------
      ERROR: Failed building wheel for ta-lib
      Running setup.py clean for ta-lib
    Failed to build ta-lib
    Installing collected packages: ta-lib
      Running setup.py install for ta-lib ... error
        ERROR: Complete output from command /usr/local/opt/python/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/tp/2w6c9_rd1sd7r49r8tytbn540000gn/T/pip-install-1vrmhvnc/ta-lib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/tp/2w6c9_rd1sd7r49r8tytbn540000gn/T/pip-record-qk33kmwg/install-record.txt --single-version-externally-managed --compile:
        ERROR: /private/var/folders/tp/2w6c9_rd1sd7r49r8tytbn540000gn/T/pip-install-1vrmhvnc/ta-lib/setup.py:79: UserWarning: Cannot find ta-lib library, installation may fail.
          warnings.warn('Cannot find ta-lib library, installation may fail.')
        running install
        running build
        running build_py
        creating build
        creating build/lib.macosx-10.14-x86_64-3.7
        creating build/lib.macosx-10.14-x86_64-3.7/talib
        copying talib/abstract.py -> build/lib.macosx-10.14-x86_64-3.7/talib
        copying talib/test_abstract.py -> build/lib.macosx-10.14-x86_64-3.7/talib
        copying talib/deprecated.py -> build/lib.macosx-10.14-x86_64-3.7/talib
        copying talib/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/talib
        copying talib/stream.py -> build/lib.macosx-10.14-x86_64-3.7/talib
        copying talib/test_pandas.py -> build/lib.macosx-10.14-x86_64-3.7/talib
        copying talib/test_data.py -> build/lib.macosx-10.14-x86_64-3.7/talib
        copying talib/test_func.py -> build/lib.macosx-10.14-x86_64-3.7/talib
        copying talib/test_stream.py -> build/lib.macosx-10.14-x86_64-3.7/talib
        running build_ext
        building 'talib._ta_lib' extension
        creating build/temp.macosx-10.14-x86_64-3.7
        creating build/temp.macosx-10.14-x86_64-3.7/talib
        clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/lib/python3.7/site-packages/numpy/core/include -I/usr/include -I/usr/local/include -I/opt/include -I/opt/local/include -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c talib/_ta_lib.c -o build/temp.macosx-10.14-x86_64-3.7/talib/_ta_lib.o
        talib/_ta_lib.c:526:10: fatal error: 'ta-lib/ta_defs.h' file not found
        #include "ta-lib/ta_defs.h"
                 ^~~~~~~~~~~~~~~~~~
        1 error generated.
        error: command 'clang' failed with exit status 1
        ----------------------------------------
    ERROR: Command "/usr/local/opt/python/bin/python3.7 -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/tp/2w6c9_rd1sd7r49r8tytbn540000gn/T/pip-install-1vrmhvnc/ta-lib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/tp/2w6c9_rd1sd7r49r8tytbn540000gn/T/pip-record-qk33kmwg/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/tp/2w6c9_rd1sd7r49r8tytbn540000gn/T/pip-install-1vrmhvnc/ta-lib/

    Mac电脑,使用python3,安装talib报错如上,请大神解决一下

    展开全文
  • 有些时候我们需要将部分...1.使用cmake构建及使用lib库 构建lib库 使用lib库 2.被测项目编译成库文件,结合gtest框架在测试项目中调用函数并输出 1.使用cmake构建及使用lib库 构建lib库 最终目录展示 下面给...

    有些时候我们需要将部分代码编译成单独的一个库,然后在另一个项目中去使用这个库

    大部分是linux环境下的指令,但是也差不是很多

    记录一下构建的经过

     

    目录

    1.使用cmake构建及使用lib库

    构建lib库

    使用lib库 

    2.被测项目编译成库文件,结合gtest框架在测试项目中调用函数并输出


    1.使用cmake构建及使用lib库

    构建lib库

    • 最终目录展示

    • 下面给出libhello目录下的源代码

    头文件hello.h

    #ifndef HELLO_H
    #define HELLO_H
    void hello();
    #endif

    源文件hello.cpp

    #include<stdio.h>
    #include"hello.h"
    
    void hello()
    {
          printf("hello world!\n");
    }
    

    cmakelists.txt

    cmake_minimum_required (VERSION 2.6)
    project(hello)
    
    #//生成动态库(SHARED)
    add_library(hello  ${PROJECT_SOURCE_DIR}/libhello/hello.cpp)
    #add_library(hello SHARED ${PROJECT_SOURCE_DIR}/libhello/hello.cpp)
    
    #//安装文件到目录下
    #install(TARGETS hello RUNTIME DESTINATION ${PROJECT_SOURCE_DIR}/lib)
    #install(FILES "${PROJECT_SOURCE_DIR}/libhello/hello.h" DESTINATION "${PROJECT_SOURCE_DIR}/include")
    
    

    注释掉的那一行是动态库,因为我后面引入动态库有点问题,所以就引入的是静态库

     

    如果不知道怎么生成编译项目,见下面这个链接 

    https://blog.csdn.net/yysave/article/details/96434908 

    编译生成后,在debug目录下 

    dll是动态库,lib是静态库,后面使用的时候我用的是静态库

    理论上使用动态库就可以,占内存也小。lib是编译时用到的,dll是运行时用到的。下面这篇文章是windows下dll与lib的区别

    https://www.cnblogs.com/alantu2018/p/8470976.html

     我两个库都生成保存了

    使用lib库 

    先给出最后的目录图(因为我怕中间某个链接找不到出问题,所以把ilk pdb文件都拷过来了)

    首先先说lib文件夹,里面放的是

     

    然后是cmakelists.txt

     

    cmake_minimum_required (VERSION 2.6)
    project(usehellolib)
    
    # 需包含的库文件
    link_directories(
       D:/Test-my/gtest/demo5/Use_lib/lib
    )
    #//生成可执行文件
    add_executable(usehellolib usehellolib.cpp)
    
    #//链接库到可执行文件
    target_link_libraries(usehellolib hello)
    

    然后是hello.h,和前面生成lib中的一模一样,为什么需要这个头文件呢,因为在后面的cpp文件中要使用到头文件,因为库里面是函数的实现,函数的定义还在头文件中(网上是这么说的)

     usehellolib.cpp

    # include <iostream>
    #include "hello.h"
    int main()
    {
      hello();
      system("PAUSE");
      return 0;
    }
    

     生成项目,编译之后,在debug目录下会有执行文件

     

     点击运行就可以了。至此,我们实现了在一个项目中编译成库文件,在另一个项目中调用库文件中的函数并输出的功能

     

    2.被测项目编译成库文件,结合gtest框架在测试项目中调用函数并输出

    首先,不是很清楚gtest项目的先看前面我写过的两篇文章

    gtest单元测试配置+vs 2015+OpenCppCoverage输出测试覆盖率 || cmake命令构建项目以及编译以及命令行测试

    Cmakelists配置多级目录的gtest项目(项目代码和测试代码分离)

    •  首先,新建一个项目,将原先libhello文件夹中的内容换成下面这两个文件,代码见上面链接中

    生成项目,编译,同样得到lib库(适当改写cmakelists.txt,就是改改cpp名字)

    标题

     

     将库文件拷到下面目录中

     适当改写

     因为cmakelists.txt改动比较大,所以给出修改后版本

    cmake_minimum_required (VERSION 3.6)
    
    include_directories(D:/Test-my/gtest/demo5-2/Use_lib/googletest-release-1.7.0/googletest-release-1.7.0/include)
    project(gtestusemyAddlib)
    
    # 需包含的库文件
    link_directories(
       D:/Test-my/gtest/demo5-2/Use_lib/lib
    D:/Test-my/gtest/demo5-2/Use_lib/googletest-release-1.7.0/googletest-release-1.7.0/lib
    )
    
    ADD_SUBDIRECTORY(D:/Test-my/gtest/demo5-2/Use_lib/googletest-release-1.7.0/googletest-release-1.7.0)
    find_package(Threads)
    #//生成可执行文件
    add_executable(gtestusemyAddlib test_calc.cpp)
    
    #//链接库到可执行文件
    TARGET_LINK_LIBRARIES(gtestusemyAddlib gtest gtest_main)
    TARGET_LINK_LIBRARIES(gtestusemyAddlib hello)
    
    #这个必须放在project的后面
    IF(MSVC)
       message("run here")
       set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
       set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
    endif()

    经常出现的问题是,静态动态不匹配的问题,那么就需要将if(msvc)这一块加到每一个cmake文件中

    注意,是每一个,也就是说,前面编译的lib就需要重新编译

    否则不能用,各种报错

    还有一个经常出现的问题,比如gtest/gtest.h找不到,那就是说你没有加入add_subdirectory这个指令 

    最后执行结果

     

    至此,就可以将此项目作为一个单纯的gtest项目

    将被测代码编译成lib库文件,只用将库文件lib和头文件.h引入,就可以实现对代码函数的调用 

     

    展开全文

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 1,979,388
精华内容 791,755
关键字:

lib