摘要: step 2 向项目中添加库 在这一步中,我们实现自己到sqrt函数,并用CMakeLists.txt添加到我们到项目中.首先,我们在项目目录中增加一个子目录 : MathFunctions,用来放置我们的sqrt的实现. 我们在MathFunctions目录下创建两个文件: mysqrt.c 和 mysqrt.h内容分别为mysqrt.h:1 float mysqrt(float) ;mysqrt.c:1 #include "mysqrt.h"2 float mysqrt(float x) {3 return x*x;4 }然后向在MathFunctions目录下创建 C 阅读全文
posted @ 2013-12-05 00:00 mayer21548 阅读(425) 评论(0) 推荐(0) 编辑