trouble with creating a new project

This forum deals with BCI2000 configuration issues.
Locked
MRI
Posts: 1
Joined: 10 May 2012, 10:13

trouble with creating a new project

Post by MRI » 10 May 2012, 10:33

Hey everyone,

I'm new at BCI2000 and I'm working through the Quickstart Guide at the moment.
I wanted to create a new project for a Signal Source module, but unfortunately when I want to build all my projects at Visual C++ 2010 Express I get 4 fails. And there are some Errors, that I just can't work on:

19>BCI2000FrameworkSigSrcModule.lib(CoreModuleQT.obj) : error LNK2005: "bool __cdecl ThreadUtils::InMainThread(void)" (?InMainThread@ThreadUtils@@YA_NXZ) already defined in SourceTestADC.obj
19>BCI2000FrameworkSigSrcModule.lib(CoreModuleQT.obj) : error LNK2005: "void __cdecl ThreadUtils::SleepFor(int)" (?SleepFor@ThreadUtils@@YAXH@Z) already defined in SourceTestADC.obj
19>BCI2000FrameworkSigSrcModule.lib(CoreModuleQT.obj) : error LNK2005: "void __cdecl ThreadUtils::PrecisionSleepFor(double)" (?PrecisionSleepFor@ThreadUtils@@YAXN@Z) already defined in SourceTestADC.obj
19>BCI2000FrameworkSigSrcModule.lib(CoreModuleQT.obj) : error LNK2005: "void __cdecl ThreadUtils::PrecisionSleepUntil(class PrecisionTime)" (?PrecisionSleepUntil@ThreadUtils@@YAXVPrecisionTime@@@Z) already defined in SourceTestADC.obj
19>BCI2000FrameworkSigSrcModule.lib(CoreModuleQT.obj) : error LNK2005: "int __cdecl ThreadUtils::NumberOfProcessors(void)" (?NumberOfProcessors@ThreadUtils@@YAHXZ) already defined in SourceTestADC.obj
19>BCI2000FrameworkSigSrcModule.lib(CoreModuleQT.obj) : error LNK2005: "bool __cdecl ThreadUtils::IsMainThread(void)" (?IsMainThread@ThreadUtils@@YA_NXZ) already defined in SourceTestADC.obj

I hope someone can help me with this.

Thanks,
MRI

mellinger
Posts: 1210
Joined: 12 Feb 2003, 11:06

Re: trouble with creating a new project

Post by mellinger » 11 May 2012, 05:27

Hi,

it seems that there is some inconsistency between existing .obj files (compiled code), and updated source files. VS often does not recognize dependencies between .cpp files and header files which are not explicitly part of a project (e.g., because they belong to a static library). As a result, changes in such a header file do not prompt recompilation of all dependent .cpp files into .obj files, and consequently linking will fail.

Doing a "rebuild" on the project in question will fix the problem.

Regards,
Juergen

Locked

Who is online

Users browsing this forum: Bing [Bot] and 23 guests