Size: 546
Comment:
|
Size: 1471
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
## page was renamed from ModularSimulation/Help | |
Line 2: | Line 3: |
== Matlab does not compile (Windows only) == Under Windows, if the BCVTB is compiled using the Microsoft compiler, then the Matlab libraries also need to be compiled with the Microsoft compiler. Otherwise, the you may get a compilation error like: {{{ Writing library for establishBSDSocket.mexw32 c:\docume~1\mwetter\locals~1\temp\mex_ae679\simulinksocket.obj .text: undefined reference to '_establishclientsocket' c:\docume~1\mwetter\locals~1\temp\mex_ae679\simulinksocket.obj .text: undefined reference to '_exchangewithsocket' c:\docume~1\mwetter\locals~1\temp\mex_ae679\simulinksocket.obj .text: undefined reference to '_closeipc' }}} To fix this problem, open Matlab, run {{{ mex -setup }}} and select the Microsoft Visual C++ compiler from the menu. This need to be done only once as it updates your Matlab settings. |
|
Line 7: | Line 24: |
They contain log messages that may indicate what went wrong. | They contain log messages that may indicate the cause of the problem. |
Line 9: | Line 26: |
open the file {{{defines.h}}} and make sure you have a line | open the file {{{defines.h}}} and add the line |
Line 13: | Line 30: |
Then, compile the libraries using | Then, from the directory {{{bcvtb/lib}}} compile the libraries using |
Help
1. Matlab does not compile (Windows only)
Under Windows, if the BCVTB is compiled using the Microsoft compiler, then the Matlab libraries also need to be compiled with the Microsoft compiler. Otherwise, the you may get a compilation error like:
Writing library for establishBSDSocket.mexw32 c:\docume~1\mwetter\locals~1\temp\mex_ae679\simulinksocket.obj .text: undefined reference to '_establishclientsocket' c:\docume~1\mwetter\locals~1\temp\mex_ae679\simulinksocket.obj .text: undefined reference to '_exchangewithsocket' c:\docume~1\mwetter\locals~1\temp\mex_ae679\simulinksocket.obj .text: undefined reference to '_closeipc'
To fix this problem, open Matlab, run
mex -setup
and select the Microsoft Visual C++ compiler from the menu. This need to be done only once as it updates your Matlab settings.
2. Runtime problems
If something goes wrong during the simulation, check the files utilSocket.log and utilClient.log. They contain log messages that may indicate the cause of the problem. If these files do not exist, go to the directory bcvtb/lib, open the file defines.h and add the line
#define NDEBUG
Then, from the directory bcvtb/lib compile the libraries using
make clean make
and rerun the simulation. Now the log files should be written to the directory from which you started the BCVTB.