2014-09-15 2 views
0

SFML 라이브러리를 사용하여 프로젝트를 컴파일하는 데 문제가 있습니다. 전에는 Cmake로 직접 libs 소스를 컴파일하려고 시도했지만 다른 문제가 있었고 모든 libs 파일은 컴파일되지 않았습니다. 그 원인에 이미 컴파일 된 libs와 VC11, 64에 대한 SFML2.1 다운로드 속성을 프로젝트에 추가하지만, 내가 좋아하는 이상한 오류받을 :SFML Visual Studio 2013 - 프로젝트가 컴파일되지 않습니다

#include <SFML/Network/Http.hpp> 
    #include <string.h> 

using namespace std; 

int main() 
{ 
    string www = "http://www.gunfire.pl/"; 
    sf::Http site("http://www.gunfire.pl/"); 

    sf::Http::Request request(www); 
    //request.setUri(www); 
    request.Get; 

    return 0; 
} 

I을 : 내가 컴파일 tryed

Error 5 error LNK1120: 4 unresolved externals C:\Users\Konrad\Documents\Visual Studio     2013\Projects\Komparator cen ASG\Debug\Komparator cen ASG.exe Komparator cen ASG 
Error 4 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Http::~Http(void)" ([email protected]@@[email protected]) referenced in function _main C:\Users\Konrad\Documents\Visual Studio 2013\Projects\Komparator cen ASG\Komparator cen ASG\Main.obj Komparator cen ASG 
Error 3 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Http::Http(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned short)" ([email protected]@@[email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]) referenced in function _main C:\Users\Konrad\Documents\Visual Studio 2013\Projects\Komparator cen ASG\Komparator cen ASG\Main.obj Komparator cen ASG 
Error 2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Http::Request::~Request(void)" ([email protected]@[email protected]@[email protected]) referenced in function _main C:\Users\Konrad\Documents\Visual Studio 2013\Projects\Komparator cen ASG\Komparator cen ASG\Main.obj Komparator cen ASG 
Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Http::Request::Request(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,enum sf::Http::Request::Method,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" ([email protected]@[email protected]@[email protected][email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]) referenced in function _main C:\Users\Konrad\Documents\Visual Studio 2013\Projects\Komparator cen ASG\Komparator cen ASG\Main.obj Komparator cen ASG 

코드 이상하게 들릴지도 모르지만 VSML 라이브러리에서 SFML 라이브러리를 실행하려고 시도했지만 이미 많은 시간을 낭비했습니다.

+1

링크 오류입니다. 컴파일 오류가 아닙니다. 이게 너를 도와주지 않는다고 확신 할 수 있니? http://stackoverflow.com/questions/9788619/working-with-sfml-getting-unresolved-external-symbol-output?rq=1 –

+0

프로젝트의 링커 입력 파일에 SFML 라이브러리 파일을 추가 했습니까? 링커가 SFML을 사용하려고한다는 것을 모르는 것처럼 들립니다 ... – Cameron

+0

또한 vc12 (VS2013)와 함께 vc11 라이브러리를 사용하는 것은 위험합니다 - ABI가 버전간에 변경된 경우 미묘하거나 프로젝트에서 컴파일 된 코드와 이미 라이브러리에 컴파일 된 코드 간의 불일치로 인해 발생하는 버그) – Cameron

답변

0

VS2012 (VC11) 용으로 컴파일 된 라이브러리를 사용하여 VS2013에서 프로젝트를 컴파일 할 수 있습니다. 하지만 당신이 Graphics.draw의 점()을 SFML 버전은 2013 년

은 "확인되지 않은 외부 기호"나는 직면 증상 중 하나입니다 위해 만들어진되지 않기 때문에 당신이 바로 문제로 머리 것에 도착하면, 너무.

불행히도 그처럼 간단합니다. VS2013 용으로 사용하려면 원하는대로 컴파일해야합니다.

불행히도 2013 년에 정적 라이브러리를 만들지 못하게하는 몇 가지 버그가 있습니다.

내가 아는 한, 아직 VS2013 용 SFML 2.1을 빌드 할 수있는 솔루션이 없습니다. 있다면, 나는 매우 흥미가있을 것이다.

+0

http://sfml.my-gate.net/nightly/, 야간 비공식적으로 착취 자에 의한 빌드 (SFML 팀원)를 찾을 수 있습니다. 나를 위해 그것은 효과가 있었다. – 20InchMovement

관련 문제