-5

ライブラリをコンパイルしようとしていますが、これらのエラーが発生し続けます。C にあまり詳しくなく、これを回避する方法がわかりません。dll を作成しません。

c:\>C:\tcc\tcc.exe C:\tcc\examples\hello_dll.c -o C:\tcc\examples\test_win.dll
tcc: error: undefined symbol 'hello_data'
tcc: error: undefined symbol 'hello_func'
//+---------------------------------------------------------------------------
//
//  HELLO_DLL.C - Windows DLL example - main application part
//

#include <windows.h>

void hello_func (void);
__declspec(dllimport) extern const char *hello_data;

int WINAPI WinMain(
    HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPSTR     lpCmdLine,
    int       nCmdShow)
{
hello_data = "Hello World!";
hello_func();
return 0;
}
4

1 に答える 1