2010-02-24 4 views
1

본문이없고 코드의 머리글에 선언 된 함수를 호출 할 수 있습니까 ?? 내 상황을 아래에서 읽으십시오.은 본문없이 호출 할 수 있습니다.

저는 C++을 배우기 때문에 제 용어가 불투명하다면 왜 그런지 알 것입니다. 어쨌든, 나는이 책을 "Advanced 2D Game Development"라고 읽었습니다. 누군가가 책을 읽었다면 아마 나를 도울 수있을 것입니다. C++에서 그는 그들에 호출 선 아래로 나중에 Advanced2D.h

extern bool game_preload(); 
extern bool game_init(HWND); 
extern void game_update(); 
extern void game_end(); 

4 개 통근 기능을 설정 수업 시간의 몇 가지 있지만, 결코 그들에게 몸을 제공하지 않습니다. 결국 그는 모든 코드를 lib 파일로 컴파일하여 다른 프로젝트에 포함시키고 실제로 이러한 4 가지 방법을 사용할 수 있습니다.

그는 나를에만이 같은 다른 프로젝트에 위의 이러한 방법을 사용하도록 솔루션 속성/일반/출력 디렉토리로 이동하여 릴리스 및 디버그 구성

$(ProjectDir)..\lib\Advance2D.lib // It didn't work. Still added the libs at default location 

모두이 추가 싶었어요. 이것은 선언적 메서드가 자신의 시체를 얻을 때입니다.

#include <iostream> 
#include "..\Engine\Advanced2D.h" 
bool game_preload() 
{ 
    //display engine version in a message box 
    g_engine->message(g_engine->getVersionText(), "TEST ENGINE"); 
    //return fail to terminate the engine 
    return false; 
} 

bool game_init(HWND hwnd) { return 0;} 
void game_update() {} 
void game_end() {} 

이제 유일한 문제

내가 링커 오류

1>winmain.obj : error LNK2019: unresolved external symbol "bool __cdecl game_preload(void)" ([email protected]@YA_NXZ) referenced in function [email protected] 
1>c:\Engine\msvc8\Advance2D\Advance2D\..\lib\Advance2D.lib\Advance2D.exe : fatal error LNK1120: 1 unresolved externals 

나는 첫 번째 프로젝트에서 사용하는 방법을 언급하지 않는 경우 프로젝트가 결코 컴파일 않겠다을받을 수있다?

그 사람은 내가 컴파일 할 때 링커 오류를받지 말아야한다고 주장한다. 그리고 나는 당신이 어떤 실수없이 지정된 파일에 코드를 입력 한 가정

다음, 당신은 엔진 프로젝트를 컴파일 할 수 있어야 인용. 컴파일러는 으로 링크 시간에 필요한 라이브러리 (엔진 lib를 사용하여 실행 파일을 만들 때)를 제공 할 것이라고 가정하기 때문에 은 엔진과 아무런 관련이 없어야합니다. 새로운 모듈 및 기능을 사용하여 엔진을 향상 시킴에 따라 다음에 나오는 여러 장을 다시 검토해 보겠습니다. 코드에 을 입력하는 동안 실수로 을 입력하면 컴파일러 오류 인 이 표시되지 않아야합니다.

다음

이 advanced2D 헤더

// Advanced2D Engine 
// Main header file 
#ifndef _ADVANCED2D_H 
#define _ADVANCED2D_H 1 
#include <iostream> 
#include <windows.h> 
#include <d3d9.h> 
#include <d3dx9.h> 
#include <dxerr.h> 
#include "Timer.h" 
#define VERSION_MAJOR 1 
#define VERSION_MINOR 0 
#define REVISION 0 

#pragma comment(lib,"d3d9.lib") 
#pragma comment(lib,"d3dx9.lib") 
#pragma comment(lib, "winmm.lib") 

//external variables and functions 
extern bool gameover; 
extern bool game_preload(); 
extern bool game_init(HWND); 
extern void game_update(); 
extern void game_end(); 

namespace Advanced2D 
{ 
    class Engine { 
     private: 
      int p_versionMajor, p_versionMinor, p_revision; 
      HWND p_windowHandle; 
      LPDIRECT3D9 p_d3d; 
      LPDIRECT3DDEVICE9 p_device; 
      LPDIRECT3DSURFACE9 p_backbuffer; 
      LPD3DXSPRITE p_sprite_handler; 
      std::string p_apptitle; 
      bool p_fullscreen; 
      int p_screenwidth; 
      int p_screenheight; 
      int p_colordepth; 
      bool p_pauseMode; 
      D3DCOLOR p_ambientColor; 
      bool p_maximizeProcessor; 
      Timer p_coreTimer; 
      long p_frameCount_core; 
      long p_frameRate_core; 
      Timer p_realTimer; 
      long p_frameCount_real; 
      long p_frameRate_real; 
     public: 
      Engine(); 
      virtual ~Engine(); 
      int Init(int width, int height, int colordepth, bool fullscreen); 
      void Close(); 
      void Update(); 
      void message(std::string message, std::string title = "ADVANCED 2D"); 
      void fatalerror(std::string message, std::string title = "FATAL ERROR"); 
      void Shutdown(); 
      void ClearScene(D3DCOLOR color); 
      void SetDefaultMaterial(); 
      void SetAmbient(D3DCOLOR colorvalue); 
      int RenderStart(); 
      int RenderStop(); 
      int Release(); 
      //accessor/mutator functions expose the private variables 
      bool isPaused() { return this->p_pauseMode; } 
      void setPaused(bool value) { this->p_pauseMode = value; } 
      LPDIRECT3DDEVICE9 getDevice() { return this->p_device; } 
      LPDIRECT3DSURFACE9 getBackBuffer() { return this->p_backbuffer; } 
      LPD3DXSPRITE getSpriteHandler() { return this->p_sprite_handler; } 
      void setWindowHandle(HWND hwnd) { this->p_windowHandle = hwnd; } 
      HWND getWindowHandle() { return this->p_windowHandle; } 
      std::string getAppTitle() { return this->p_apptitle; } 
      void setAppTitle(std::string value) { this->p_apptitle = value; } 
      int getVersionMajor() { return this->p_versionMajor; } 
      int getVersionMinor() { return this->p_versionMinor; } 
      int getRevision() { return this->p_revision; } 
      std::string getVersionText(); 
      long getFrameRate_core() { return this->p_frameRate_core; }; 
      long getFrameRate_real() { return this->p_frameRate_real; }; 
      int getScreenWidth() { return this->p_screenwidth; } 
      void setScreenWidth(int value) { this->p_screenwidth = value; } 
      int getScreenHeight() { return this->p_screenheight; } 
      void setScreenHeight(int value) { this->p_screenheight = value; } 
      int getColorDepth() { return this->p_colordepth; } 
      void setColorDepth(int value) { this->p_colordepth = value; } 
      bool getFullscreen() { return this->p_fullscreen; } 
      void setFullscreen(bool value) { this->p_fullscreen = value; } 
      bool getMaximizeProcessor() { return this->p_maximizeProcessor; } 
      void setMaximizeProcessor(bool value) { this->p_maximizeProcessor = value;} 
    }; //class 
}; //namespace 
//define the global engine object (visible everywhere!) 
extern Advanced2D::Engine *g_engine; 
#endif 

Advanced2d 클래스

// Advanced2D Engine 
// Main source code file 
//includes 
#include "Advanced2D.h" 
#include <cstdlib> 
#include <ctime> 
#include <string> 
#include <sstream> 
#include <list> 
#include "winmain.h" 

namespace Advanced2D 
{ 
    Engine::Engine() 
    { 
     srand((unsigned int)time(NULL)); 
     p_maximizeProcessor = false; 
     p_frameCount_core = 0; 
     p_frameRate_core = 0; 
     p_frameCount_real = 0; 
     p_frameRate_real = 0; 
     p_ambientColor = D3DCOLOR_RGBA(255,255,255, 0); 
     p_windowHandle = 0; 
     p_pauseMode = false; 
     p_versionMajor = VERSION_MAJOR; 
     p_versionMinor = VERSION_MINOR; 
     p_revision = REVISION; 
     //set default values 
     this->setAppTitle("Advanced2D"); 
     this->setScreenWidth(640); 
     this->setScreenHeight(480); 
     this->setColorDepth(32); 
     this->setFullscreen(false); 
     //window handle must be set later on for DirectX! 
     this->setWindowHandle(0); 
    } 

    Engine::~Engine() 
    { 
     if (this->p_device) this->p_device->Release(); 
     if (this->p_d3d) this->p_d3d->Release(); 
    } 

    std::string Engine::getVersionText() 
    { 
     std::ostringstream s; 
     s << "Advanced2D Engine v" << p_versionMajor << "." << p_versionMinor 
     << "." << p_revision; 
     return s.str(); 
    } 

    void Engine::message(std::string message, std::string title) 
    { 
     MessageBox(0, message.c_str(), title.c_str(), 0); 
    } 

    void Engine::fatalerror(std::string message, std::string title) 
    { 
     this->message(message,title); 
     Shutdown(); 
    } 

    int Engine::Init(int width, int height, int colordepth, bool fullscreen) 
    { 
     //initialize Direct3D 

     this->p_d3d = Direct3DCreate9(D3D_SDK_VERSION); 

     if (this->p_d3d == NULL) { 
      return 0; 
     } 

     //get system desktop color depth 
     D3DDISPLAYMODE dm; 
     this->p_d3d->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &dm); 

     //set configuration options for Direct3D 
     D3DPRESENT_PARAMETERS d3dpp; 
     ZeroMemory(&d3dpp, sizeof(d3dpp)); 
     d3dpp.Windowed = (!fullscreen); 
     d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; 
     d3dpp.EnableAutoDepthStencil = TRUE; 
     d3dpp.AutoDepthStencilFormat = D3DFMT_D16; 
     d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; 
     d3dpp.BackBufferFormat = dm.Format; 
     d3dpp.BackBufferCount = 1; 
     d3dpp.BackBufferWidth = width; 
     d3dpp.BackBufferHeight = height; 
     d3dpp.hDeviceWindow = p_windowHandle; 

     //create Direct3D device 
     this->p_d3d->CreateDevice(
     D3DADAPTER_DEFAULT, 
     D3DDEVTYPE_HAL, 
     this->p_windowHandle, 
     D3DCREATE_HARDWARE_VERTEXPROCESSING, 
     &d3dpp, 
     &this->p_device); 
     if (this->p_device == NULL) return 0; 

     //clear the backbuffer to black 
     this->ClearScene(D3DCOLOR_XRGB(0,0,0)); 

     //create pointer to the back buffer 
     this->p_device->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &this->p_backbuffer); 

     //use ambient lighting and z-buffering 
     this->p_device->SetRenderState(D3DRS_ZENABLE, TRUE); 
     this->p_device->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID); 
     this->SetAmbient(this->p_ambientColor); 

     //initialize 2D renderer 
     HRESULT result = D3DXCreateSprite(this->p_device, &this->p_sprite_handler); 
     if (result != D3D_OK) return 0; 
     //call game initialization extern function 
     //if (!game_init(this->getWindowHandle())) return 0; 
     //set a default material 
     SetDefaultMaterial(); 
     return 1; 
    } 


    void Engine::SetDefaultMaterial() 
    { 
     D3DMATERIAL9 mat; 
     memset(&mat, 0, sizeof(mat)); 
     mat.Diffuse.r = 1.0f; 
     mat.Diffuse.g = 1.0f; 
     mat.Diffuse.b = 1.0f; 
     mat.Diffuse.a = 1.0f; 
     p_device->SetMaterial(&mat); 
    } 

    void Engine::ClearScene(D3DCOLOR color) 
    { 
     this->p_device->Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 
     color, 1.0f, 0); 
    } 

    void Engine::SetAmbient(D3DCOLOR colorvalue) 
    { 
     this->p_ambientColor = colorvalue; 
     this->p_device->SetRenderState(D3DRS_AMBIENT, this->p_ambientColor); 
    } 
    int Engine::RenderStart() 
    { 
     if (!this->p_device) return 0; 
     if (this->p_device->BeginScene() != D3D_OK) return 0; 
     return 1; 
    } 
    int Engine::RenderStop() 
    { 
     if (!this->p_device) return 0; 
     if (this->p_device->EndScene() != D3D_OK) return 0; 
     if (p_device->Present(NULL, NULL, NULL, NULL) != D3D_OK) return 0; 
     return 1; 
    } 

    void Engine::Shutdown() 
    { 
     gameover = true; 
    } 

    void Engine::Update() 
    { 
     static Timer timedUpdate; 
     //calculate core framerate 
     p_frameCount_core++; 
     if (p_coreTimer.stopwatch(999)) { 
     p_frameRate_core = p_frameCount_core; 
     p_frameCount_core = 0; 
     } 
     //fast update with no timing 
     game_update(); 

     //update with 60fps timing 
     if (!timedUpdate.stopwatch(14)) { 
      if (!this->getMaximizeProcessor()) 
      { 
       Sleep(1); 
      } 
     } 
     else { 
      //calculate real framerate 
      p_frameCount_real++; 

      if (p_realTimer.stopwatch(999)) { 
       p_frameRate_real = p_frameCount_real; 
       p_frameCount_real = 0; 
      } 
      //begin rendering 
      this->RenderStart(); 
      //done rendering 
      this->RenderStop(); 
     } 
    } 
    void Engine::Close() 
    { 
     game_end(); 
    } 
} //namespace 

입니다 그리고 여기의 WinMain 당신의 묘사에서

#include <sstream> 
#include "winmain.h" 
#include "Advanced2D.h" 
//macro to read the key states 
#define KEY_DOWN(vk) ((GetAsyncKeyState(vk) & 0x8000)?1:0) 
HINSTANCE g_hInstance; 
HWND g_hWnd; 
int g_nCmdShow; 
//declare global engine object 
Advanced2D::Engine *g_engine; 
bool gameover; 


//window event callback function 
LRESULT WINAPI WinProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) 
{ 
    switch(msg) 
    { 
    case WM_QUIT: 
    case WM_CLOSE: 
    case WM_DESTROY: 
    gameover = true; 
    break; 
    } 
    return DefWindowProc(hWnd, msg, wParam, lParam); 
} 
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int 
nCmdShow) 
{ 
    MSG msg; 
    srand((unsigned int)time(NULL)); 
    g_hInstance = hInstance; 
    g_nCmdShow = nCmdShow; 
    DWORD dwStyle, dwExStyle; 
    RECT windowRect; 
    /** 
    * Create engine object first! 
    **/ 
    g_engine = new Advanced2D::Engine(); 
    //let main program have a crack at things before window is created 
    if (!game_preload()) { 
     MessageBox(g_hWnd, "Error in game preload!", "Error", MB_OK); 
     return 0; 
    } 
    //get window caption string from engine 
    char title[255]; 
    sprintf_s(title, "%s", g_engine->getAppTitle().c_str()); 
    //set window dimensions 
    windowRect.left = (long)0; 
    windowRect.right = (long)g_engine->getScreenWidth(); 
    windowRect.top = (long)0; 
    windowRect.bottom = (long)g_engine->getScreenHeight(); 
    //create the window class structure 
    WNDCLASSEX wc; 
    wc.cbSize = sizeof(WNDCLASSEX); 
    //fill the struct with info 
    wc.style = CS_HREDRAW | CS_VREDRAW; 
    wc.lpfnWndProc = (WNDPROC)WinProc; 
    wc.cbClsExtra = 0; 
    wc.cbWndExtra = 0; 
    wc.hInstance = hInstance; 
    wc.hIcon = NULL; 
    wc.hCursor = LoadCursor(NULL, IDC_ARROW); 
    wc.hbrBackground = NULL; 
    wc.lpszMenuName = NULL; 
    wc.lpszClassName = title; 
    wc.hIconSm = NULL; 
    //set up the window with the class info 
    RegisterClassEx(&wc); 
    //set up the screen in windowed or fullscreen mode? 
    if (g_engine->getFullscreen()) 
    { 
     DEVMODE dm; 
     memset(&dm, 0, sizeof(dm)); 
     dm.dmSize = sizeof(dm); 
     dm.dmPelsWidth = g_engine->getScreenWidth(); 
     dm.dmPelsHeight = g_engine->getScreenHeight(); 
     dm.dmBitsPerPel = g_engine->getColorDepth(); 
     dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; 
     if (ChangeDisplaySettings(&dm, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL) { 
     MessageBox(NULL, "Display mode failed", NULL, MB_OK); 
     g_engine->setFullscreen(false); 
     } 
     dwStyle = WS_POPUP; 
     dwExStyle = WS_EX_APPWINDOW; 
     ShowCursor(FALSE); 
     } 
     else { 
     dwStyle = WS_OVERLAPPEDWINDOW; 
     dwExStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; 
     } 
     //adjust window to true requested size 
     AdjustWindowRectEx(&windowRect, dwStyle, FALSE, dwExStyle); 
     //create the program window 
     g_hWnd = CreateWindowEx(0, 
     title, //window class 
     title, //title bar 
     dwStyle | WS_CLIPCHILDREN | WS_CLIPSIBLINGS, 
     0, 0, //x,y coordinate 
     windowRect.right - windowRect.left, //width of the window 
     windowRect.bottom - windowRect.top, //height of the window 
     0, //parent window 
     0, //menu 
     g_hInstance, //application instance 
     0); //window parameters 
     //was there an error creating the window? 
     if (!g_hWnd) { 
     MessageBox(g_hWnd, "Error creating program window!", "Error", MB_OK); 
     return 0; 
    } 
    //display the window 
    ShowWindow(g_hWnd, g_nCmdShow); 
    UpdateWindow(g_hWnd); 
    //initialize the engine 
    g_engine->setWindowHandle(g_hWnd); 
    if (!g_engine->Init(g_engine->getScreenWidth(), g_engine->getScreenHeight(), 
    g_engine->getColorDepth(), g_engine->getFullscreen())) { 
    MessageBox(g_hWnd, "Error initializing the engine", "Error", MB_OK); 
    return 0; 
    } 
    // main message loop 
    gameover = false; 
    while (!gameover) 
    { 
     while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) 
     { 
      TranslateMessage(&msg); 
      DispatchMessage(&msg); 
     } 
     g_engine->Update(); 
    } 

    if (g_engine->getFullscreen()) { 
     ShowCursor(TRUE); 
    } 
    g_engine->Close(); 
    delete g_engine; 
    return 1; 
} 
+0

용어에 'declare'를 사용하는 것이 정확합니다. 누락 된 용어는 '정의'입니다. 함수 또는 메소드를 정의하면 구현 (중괄호로 묶인 본문)이 제공됩니다. –

답변

1

extern 키워드는 일반적으로 lib 또는 다른 객체를 통해 함수가 외부 컴파일 객체로 구현되도록 지정합니다. 하나의 cpp 파일 (함수 본문 외부에 있음)에서 전역 범위의 변수를 선언하려면 다른 cpp 파일에서 external {variable declaration}을 사용하여 참조 할 수만 있습니다. 따라서 컴파일러는 함수/변수가 정의 될 것으로 기대하지 않도록합니다. 그러나 그것이 존재한다는 것을 알아라.

여기에 사물의 소리가 발생하는 이유는 연결하려는 개체가 실제로 연결되어 있지 않다는 것입니다. 위의 대답은 당신에게 방법을 알려줍니다 - 나는 충분히 빠르지 않다! 귀하의 질문에 그것은 당신 이이 두 번째 프로젝트에 대한 소스를 가지고있는 것처럼 보일 수도 있고 아마도 직접 빌드해야 할 수도 있습니다. 물론 모르지만, .lib가 존재하지 않는다면 당신은해야 할 것입니다.

+0

advanced2d 클래스를 살펴보십시오. 하단을 보면 game_update()가 표시됩니다. 및 game_end(); 그들은 advanced2d.h에서 선언되고있는 2 개의 externs 메소드입니다. 그들은 부름을 받고 있지만 시체는 없다. 따라서 lib 파일이 존재하려면 컴파일해야하고 오류가 발생합니다. 나는 그것을 주석 처리 할 수 ​​있었고 작동 할 수있었습니다. 하지만 그 코드 줄이없는 라이브러리를 포함하게 될 것입니다. – numerical25

+0

extern 키워드가 무엇인지 이해합니다. 이해가 안되는 이유는 아서가해야한다고 주장 할 때 컴파일이 안되는 이유입니다. 문제를 그 두 줄로 좁혔습니다. game_end(); 및 game_update(); 본문없이 호출되는 2 개의 함수 및 전체 응용 프로그램에서 오류를 발생시키는 유일한 것입니다. – numerical25

1

, 난 당신이 어떤 버전을 사용하는 가정 MS Visual C++의 ProjectProperties -> Linker-> Input -> Additional Dependencies 필드에 Advance2D.lib가 있는지 확인하십시오. 또한 ProjectProperties -> Linker-> General -> Additional Library Directories에서이 라이브러리의 경로를 추가하십시오.엔진 프로젝트의 기본 출력 경로를 변경할 필요는 없습니다. BTW, C++의 초보자 인 경우 "고급"항목에 들어가기 전에 또는 Thinking In C++과 같은 것을 더 잘 읽으십시오.

+0

잘 문제는 내가 Advanced2D 클래스 내에서 extern 함수를 주석 처리하지 않고 프로젝트를 컴파일 할 수 없다는 것입니다. 왜냐하면 클래스는 함수를 호출하지만 몸은 만들어지지 않기 때문입니다. 그러므로 나는 오류를 받는다. – numerical25

+0

ninefingers에 대한 내 답변보기 – numerical25

1

오류는 컴파일러 오류가 아니라 링커 오류입니다. 코드는 정상적으로 컴파일되지만 링커는 모든 참조 된 함수에 본문이있을 때까지 실행 파일을 생성 할 수 없습니다. 링커는 함수 본문이 들어있는 라이브러리에 대해 알지 못하거나 해당 라이브러리에 포함되어 있지 않습니다.

첫 번째 경우에는 프로젝트 설정을 변경하고 올바른 이름과 위치를 지정해야합니다. 비제이는 이미이를 설명했습니다.

두 번째 경우에는 해당 라이브러리의 내 보낸 기호를 확인해야합니다. 라이브러리가 C++로 컴파일 된 경우 함수 이름이 typesafety (라이브러리에서 내 보내지 않도록 지정해야 함) 또는 다른 서명을 가질 수 있으므로 extern 문을 변경해야합니다. VC는 라이브러리 정보를 표시하는 툴을 가지고 있는데, 나는 dumpbin이라고 생각했다.

+0

그래서 책을 쓴 사람이 제대로 편집하지 못했을 것이라고 생각합니다. 그는 내가 약간의 코드를 컴파일하기를 원하기 때문에, 오직 lib 파일로 바뀌기를 원하기 때문이다. 그러나 문제는 extern 메서드에 대한 정의가 없기 때문에 코드를 컴파일 할 수 없다는 것입니다. 그는 다른 프로젝트에 lib 파일을 포함시키기를 원하고 메서드가 정의 될 것입니다. 하지만 오류가 발생하면 그 시점에 도달 할 수 없습니다. – numerical25

0

고급 2D Game Dev book을 사용하면서 다른 사용자가이 스레드를 발견하고 추가 문제 해결을 원할 경우이 문제에 여전히 걸린 경우에 추가하고 싶었습니다.

엔진의 VS 설정을 수행하는 위치에서 대상 확장명을 .lib로 변경하고 구성 유형이 정적 라이브러리 (.lib)로 설정되어 있는지 확인하십시오. 동적 라이브러리 (.dll).

동적 라이브러리로 구성 유형을 남겨두면 VC++ 링커가 작동하는 DLL 파일을 생성하기 위해 이러한 함수에 정의가 있어야하기 때문에 extern 함수에 대해 LNK2019 오류가 표시됩니다. 정적 라이브러리를 컴파일 할 때, 최종적으로 모든 것을 DLL이나 EXE에 연결하기 전까지는 외부 변수, 함수 등의 실제 정의는 존재하지 않아도됩니다 (책 전체의 후속 프로젝트 에서처럼).

이 주제에 도움이 될 수있는 몇 가지 링크 :

연계를 지정하는 통근을 사용하여 : msdn.microsoft.com/en-us + /library/0603949d.aspx

연습 : 만들기 및 사용 정적 라이브러리 : msdn.microsoft.com/en-us + /library/ms235627%28VS.80%29.aspx

의 Microsoft Visual C++ 정적 및 동적 라이브러리 : http://www.codeproject.com/KB/cpp/libraries1.aspx

이 정보가 유용 희망!

* 참고 : 위의 미친 msdn 링크에 대해 미안하지만, 분명히 StackOverflow cred가 더있을 때까지 둘 이상의 링크를 게시 할 수 없습니다.

관련 문제