저는 Visual C++에서 정적 라이브러리로 Botan을 컴파일하는 데있어 극도로 실패했습니다.VC++에서 Botan 암호화 라이브러리를 정적 라이브러리로 컴파일하는 방법은 무엇입니까?
#ifndef BOTAN_DLL
#define BOTAN_DLL __declspec(dllexport)
#endif
이 다음이처럼 모란 코드베이스에 거의 모든 곳에서 나타 매크로 : :이 build.h 파일에는 다음 코드가 포함
class BOTAN_DLL AutoSeeded_RNG : public RandomNumberGenerator
previous question에서 나의 이해는 당신이 모두 필요하다 해야 할 일은 값없이 BOTAN_DLL을 정의하는 것입니다. 정적 라이브러리로 잘 컴파일해야합니다. 그러나 그렇게하면 "누락 된 태그 이름"과 같은 빌드 오류의 거대한 목록이 생성됩니다. 누구든지이 작업을 수행하는 방법을 알고 있습니까?
편집 : 당신이 얻을 처음 몇 오류 메시지가 무엇
cl.exe /Ibuild\include /O2 /EHsc /GR /D_CONSOLE /D "BOTAN_DLL" /nologo
/c src\checksum\adler32\adler32.cpp /Fobuild\lib\adler32.obj
adler32.cpp
build\include\botan/allocate.h(19) : error C2332: 'class' : missing tag name
build\include\botan/allocate.h(19) : error C2143: syntax error : missing ';' bef
ore 'constant'
build\include\botan/allocate.h(19) : error C2059: syntax error : 'constant'
build\include\botan/allocate.h(20) : error C2143: syntax error : missing ';' bef
ore '{'
build\include\botan/allocate.h(20) : error C2447: '{' : missing function header
(old-style formal list?)
build\include\botan/secmem.h(229) : error C2143: syntax error : missing ';' befo
re '*'
build\include\botan/secmem.h(230) : see reference to class template inst
antiation 'Botan::MemoryRegion<T>' being compiled
build\include\botan/secmem.h(229) : error C4430: missing type specifier - int as
sumed. Note: C++ does not support default-int
빈 문자열로 정의 된 BOTAN_DLL로 컴파일에 실패한 소스를 인용 해주십시오. – sharptooth