Targets may link only to libraries.CMake is dropping the item. error: undefined reference to 'tgoto'

mysql c connector 编译时出现的错误

使用cmake生成Makefile时出现了这样两句警告,以为是没有问题,直接忽略掉了。警告信息如下:

WARNING: Target "edit" requests linking to directory "/home/leq/tools/install/ncurse/usr/lib".  Targets may link only to libraries.  CMake is dropping the item.
WARNING: Target "mysql" requests linking to directory "/home/leq/tools/install/ncurse/usr/lib".  Targets may link only to libraries.  CMake is dropping the item.
执行make 命令时,出错信息如下:

/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:726: error: undefined reference to 'tgoto'
/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:1235: error: undefined reference to 'tputs'
/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:1235: error: undefined reference to 'tputs'
/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:1235: error: undefined reference to 'tputs'
/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:893: error: undefined reference to 'tgetent'
/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:911: error: undefined reference to 'tgetflag'
/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:912: error: undefined reference to 'tgetflag'
/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:914: error: undefined reference to 'tgetflag'
/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:915: error: undefined reference to 'tgetflag'
/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:920: error: undefined reference to 'tgetnum'
/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:921: error: undefined reference to 'tgetnum'
/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:924: error: undefined reference to 'tgetstr'
/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:572: error: undefined reference to 'tgoto'
/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:1235: error: undefined reference to 'tputs'
/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:615: error: undefined reference to 'tgoto'
/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:576: error: undefined reference to 'tgoto'
/home/lvenqiang/tools/mysql/mysql-8.0.17/extra/libedit/terminal.c:1542: error: undefined reference to 'tgetstr'

最终定位到原因是因为 cmake 命令中有宏定义执行动态库,确错误的指向了动态库路径,导致程序没有连接到库

例子如下:

cmake .. -DCURSES_LIBRARY=/home/lvenqiang/tools/install/ncurse/usr/lib/libncurses.so

被错误的写为

cmake .. -DCURSES_LIBRARY=/home/lvenqiang/tools/install/ncurse/usr/lib/

  • 7
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Create and animate stunning 3D graphics using the open source Three.js JavaScript library Overview Create and animate beautiful 3D graphics directly in the browser using JavaScript without the need to learn WebGL Learn how to enhance your 3D graphics with light sources, shadows, and advanced materials and textures Each subject is explained using extensive examples that you can directly use and adapt for your own purposes In Detail Three.js is a JavaScript 3D library that offers a wide range of features for creating and displaying stunning 3D computer graphics on a web browser in an intuitive manner using JavaScript without having to deal with the complexity of a WebGL low-level API. Even though WebGL makes it possible to create 3D graphics in the browser without having to use plugins, programming WebGL, however, is hard and complex. This book shows you how Three.js allows you to be independent of browser plugins. If you are an experienced web designer who wants to set the tone for an immersive design environment in your applications then this book is for you. "Learning Three.js: The JavaScript 3D Library for WebGL" is a practical, example-rich book that will help you to master all the features of Three.js. With this book, you’ll learn how to create and animate gorgeous looking 3D scenes directly in your browser utilizing the full potential of WebGL and modern browsers without having to learn WebGL. "Learning Three.js: The JavaScript 3D Library for WebGL" starts by going over the basic concepts and building blocks used in Three.js. From there on, it will expand on these subjects using extensive examples and code samples. This will allow you to learn everything you need to know about Three.js in an easy and interactive manner. Besides the basic concepts, this book will show you how you can create realistic looking 3D objects using materials and textures as well as how to load them from externally created models. You’ll learn how to easily control the camera using the Three.js build-in camera controls so you can fly or walk around the 3D scene you have created. You will also learn how to use morph and bones-based animation and how to add physics to your scene. What you will learn from this book Create standard HTML skeleton and render loops for your Three.js projects Learn how to use the different geometries that are provided by Three.js Apply realistic lighting and shadows to the 3D objects you have created Learn how the different types of materials in Three.js work and how they interact with your 3D objects and the rest of the environment Use the different camera controls provided by Three.js to effortlessly navigate around your 3D scene Work with a particle system to create snow, rain, and galaxy-like effects Import and animate models from external formats such as OBJ, STL, Collada, and much more Create and run animations using either morph targets or bones animations Use advanced textures on materials to create realistic looking 3D objects using bump maps, normal maps, specular maps, and light maps Change the output of Three.js rendered using one of its post processing options Interact directly with WebGL by creating custom vertex and fragment shaders Apply physics to your 3D objects using the Physijs JavaScript library

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值