2010-12-13 62 views
0

我使用Visual Studio 10中的程序C++VS 10包括,和我有一个链接错误

我的程序的第1部分是 //包括

//#include <LEDA\numbers>    //fatal error C1083: Cannot open include file: 'LEDA\numbers': No such file or directory 

#include <LEDA/numbers/real.h>  
//Why do I get a linker error here 
//All.obj : error LNK2001: unresolved external symbol "class leda::memory_manager leda::std_memory_mgr" ([email protected]@@[email protected]@A) 
#include <LEDA\numbers\integer.h>  //Here I used the system to write most of it for me 
#include <LEDA/numbers/integer.h>   //Include LEDA. So 2 things 
     //1. including the same file twice does not matter 
     //2. forward slashes and backward slashes are the same 
     //I tried to use a wild card and said #include <LEDA/numbers/*> 
     //But that did not work 

#include <LEDA/numbers/rational.h> 
#include <LEDA/core/string.h> 
#include <LEDA/core/array.h> 
#include <LEDA/numbers/bigfloat.h> 

     //The sqrt does not work 


#include <iostream>       //include ordinary C++ 
#include <math.h> 

,我有一个链接器错误

我试图指定哪些库通过指定LIB用户环境符号

我试图指定哪些库由s用用pecifying的 包含目录和 库目录

中的属性我的项目

我犯了一个错误的地方,但它从哪儿

回答

0

有几个失误在这个方案:

  1. LEDA \数字显然是一个目录,而不是包含文件。所以你不应该试图包含它。
  2. (概念性)#include语句根本无助于解决链接器错误。相反,您需要指定要链接到链接器的库;库是以.lib结尾的文件。转到项目设置,并添加包含缺少符号的库。
0
#include <abcd.h> // looks for the include abcd.h in the INCLUDES path. 

#include "abcd.h" // looks for the include abcd.h in the current path and then INCLUDES path. 

从你的描述,它看起来像你的LEDA当前目录下的lib英寸尝试使用“”代替<>并查看它是否修复了您的错误。