Здравствуйте!!!
Начал разбираться с SystemC, подключил библиотеку systemC v. 2.3.0 в Visual Studio 2010
Решил проверить работоспособность на простом примере сумматора
вот исходник:
CODE
#include "systemc.h"
SC_MODULE(adder)
{
sc_in<int> a, b;
sc_out<int> sum;
void do_add()
{
sum.write(a.read() + b.read());
}
SC_CTOR(adder)
{
SC_METHOD(do_add);
sensitive << a << b;
}
};
на что компилятор при сборке проекта выдал мне вот что:
CODE
1>------ Build started: Project: First_Project, Configuration: Debug Win32 ------
1>Build started 28.12.2013 23:22:39.
1>InitializeBuildStatus:
1> Touching "Debug\First_Project.unsuccessfulbuild".
1>ClCompile:
1> All outputs are up-to-date.
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>First.obj : error LNK2001: unresolved external symbol "class sc_core::sc_simcontext * sc_core::sc_default_global_context" (?sc_default_global_context@sc_core@@3PAVsc_simcontext@1@A)
1>First.obj : error LNK2019: unresolved external symbol "public: __thiscall sc_core::sc_simcontext::sc_simcontext(void)" (??0sc_simcontext@sc_core@@QAE@XZ) referenced in function "class sc_core::sc_simcontext * __cdecl sc_core::sc_get_curr_simcontext(void)" (?sc_get_curr_simcontext@sc_core@@YAPAVsc_simcontext@1@XZ)
1>First.obj : error LNK2001: unresolved external symbol "class sc_core::sc_simcontext * sc_core::sc_curr_simcontext" (?sc_curr_simcontext@sc_core@@3PAVsc_simcontext@1@A)
1>First.obj : error LNK2019: unresolved external symbol "public: __thiscall sc_core::sc_api_version_2_3_0::sc_api_version_2_3_0(void)" (??0sc_api_version_2_3_0@sc_core@@QAE@XZ) referenced in function "void __cdecl sc_core::`dynamic initializer for 'api_version_check''(void)" (??__Eapi_version_check@sc_core@@YAXXZ)
1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
1>G:\Source Code\SystemC\First_Progect\Debug\First_Project.exe : fatal error LNK1120: 5 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.15
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
подскажите что не так?
Сообщение отредактировал Ivan55 - Dec 28 2013, 16:27