DeBesten / opentx

Automatically exported from code.google.com/p/opentx
0 stars 0 forks source link

Error in simu build #56

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Which board (stock / gruvin9x / sky9x / Taranis) are you using?

stock (not important)

What is your openTx FW version?

r2588

What is your openTx EEPROM version?

not important

What steps will reproduce the problem?
1. svn checkout https://openTx.googlecode.com/svn/trunk/@2588 
~/openTx-read-only-r2588-bad
2. make clean
3. make all
4. make simu

What is the expected output? 

Created simu without errors

What do you see instead?

/tmp/cc0MyHPO.o: In function `StartMainThread(bool)':
/root/openTx-read-only-r2588-bad/src/simpgmspace.cpp:339: undefined reference 
to `simuSdDirectory'
/root/openTx-read-only-r2588-bad/src/simpgmspace.cpp:340: undefined reference 
to `simuSdDirectory'
collect2: ld returned 1 exit status
make: *** [simu] Error 1

Please provide any additional information below.

I fixed it for myself by adding a few self-help temporarily conditional 
translations into files simpgmspace.h, and simpgmspace.cpp:

simpgmspace.h:

#if defined(SDCARD)
extern "C" {
extern char simuSdDirectory[1024];
}
#endif

simpgmspace.cpp:

#if defined(SDCARD)
char simuSdDirectory[1024] = "";
#endif

pthread_t main_thread_pid;
void StartMainThread(bool tests)
{
#if defined(SDCARD)
  if (strlen(simuSdDirectory) == 0)
    getcwd(simuSdDirectory, 1024);
#endif 
  main_thread_running = (tests ? 1 : 2);
  pthread_create(&main_thread_pid, NULL, &main_thread, NULL);
}

Original issue reported on code.google.com by ztrojanek on 10 Jul 2013 at 12:11

GoogleCodeExporter commented 8 years ago
same issue here.

Original comment by gbir...@gmail.com on 12 Jul 2013 at 8:03

GoogleCodeExporter commented 8 years ago
Fixed

Original comment by bson...@gmail.com on 16 Jul 2013 at 9:25