2010-12-13 3 views
0

내가 C++VS (10)을 포함, 나는

내 프로그램의 첫번째 부분에서 프로그램 비주얼 스튜디오 (10)를 사용하고 링커 오류를 가지고 가 //

//#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 사용자 환경을 지정하여 사용하는 도서관 지정을 시도 이 디렉토리 및 라이브러리 디렉토리의 속성에

을 포함 pecifying 내 프로젝트

어디 선가 실수를 한

,하지만 여기서 그것을

답변

0

이 프로그램에서 몇 가지 실수가 있습니다

  1. LEDA \ numbers는 분명히 디렉토리가 아니며 포함 파일이 아닙니다. 그래서 그것을 포함 시키려고해서는 안됩니다.
  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에 같습니다. <> 대신 ""을 사용하고 오류가 수정되었는지 확인하십시오.

관련 문제