SignalSource created with NewBCI2000Module linker error

Forum for software developers to discuss BCI2000 software development
Locked
hyperspasm
Posts: 4
Joined: 27 Jan 2013, 14:22

SignalSource created with NewBCI2000Module linker error

Post by hyperspasm » 05 Mar 2013, 02:31

Hello,
I'm just getting started with BCI2000. I have an ADC device that I'd like to write a SignalSource module for.
When I try to build the template generated with NewBCI2000Module I get a linker error:
Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found for architecture x86_64
I did some poking around, looked at the SignalGenerator module and figured out that it links with CoreMain.cpp.o. I copied that file to my desktop and edited the build/custom/MyADC/CMakeFiles/MyADC.dir/link.txt to link with the copied CoreMain.cpp.o. This did the trick and now my module builds.

I haven't used cmake that much before and this of course is a hack. Could someone tell me the proper way to resolve this problem, and if I should report a bug somewhere? Or maybe I'm missing something.

I'm running on MacOS.

Thanks!

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

Re: SignalSource created with NewBCI2000Module linker error

Post by mellinger » 05 Mar 2013, 09:27

Hi,

this should not happen with the current SVN version, unless you accidentally have a source file in your project that shares its base name with the project's name (e.g., your source module project is named "MyAmp", and you added a file "MyAmp.cpp" to the project, or you renamed your source module project to "MyAmpADC"). I'll change the NewBCI2000Module tool in order to avoid that possibility in the future.

If you are using the 3.0.5 source code, the problem is due to a bug that has been fixed since. Sorry for the inconvenience.

Thanks for reporting the bug,
Juergen

hyperspasm
Posts: 4
Joined: 27 Jan 2013, 14:22

Re: SignalSource created with NewBCI2000Module linker error

Post by hyperspasm » 05 Mar 2013, 10:26

Hi,
I am using the latest SVN and that was my problem (the sourcefile had the same name as the project).
I fixed that and now it builds fine.

Thanks so much for your help!!!

Locked

Who is online

Users browsing this forum: No registered users and 0 guests