Documentation
Compiling and Debugging 4diac FORTE with Eclipse
Get C/C++ support for Eclipse
- Unless you already use Eclipse, for example to build 4diac IDE from source, download Eclipse for C/C++ Developers and unzip the file to a suitable location (e.g., C:\eclipse). Otherwise you can integrate C/C++ functionality into your Eclipse installation by , choosing your Eclipse version (1) and checking (2).
- Restart eclipse.exe
- Choose a workspace directory. This will be the directory where your C/C++ projects will be located. It is recommended to set the workspace folder one level above the entire source code folder. Please avoid any spaces in its names. Otherwise you might get problems when compiling 4diac FORTE.
Compile 4diac FORTE with Eclipse
The build process is described in the installation tutorial. Perform the steps described there but consider the following adaption:
- When generating a project with CMake you must choose the correct project type. You need to direct CMake to creating an Eclipse project. This depends also on the compiler you installed. For MinGW and Cygwin, it is Eclipse CDT 4 - Unix Makefiles.
- Import 4diac FORTE by . If your Workspace is one folder above your source code folder you only have to click on and afterwards to import 4diac FORTE into Eclipse. Otherwise, select the directory where you have extracted your 4diac FORTE and check (otherwise the source will stay at the original place).
- Start Make Targets View by bin/[YOUR_SYSTEM]/all to compile 4diac FORTE to an executable application. If you don't see the targets (all or clean), you can create them in the same window. Make sure that you create them in the correct folder. unless it is open already. Double-click the makefile:
Debug FORTE with Eclipse
For debugging your own Function Blocks, go through the following steps:
- Set a breakpoint in the source code file of the desired Function Block.
- Go to
- Right click on Main tab, you should fill the C/C++ Application: with the binary file you generated (normally FORTE_FOLDER_ROOT/bin/[YOUR_SYSTEM]/src/forte[.exe]). In the Debugger tab, choose your desired debugger. In Windows you normally use Cygwin or MinGW (you have to install them in order for them to appear in the selection box). . In the
- Click .
- Confirm for changing into the Debug view.
- If you don't see the file where the debugger stopped at the beginning, press the main into the search field of the Windows Explorer and select main.cpp. 4diac FORTE is now stopped at the main() function. button (1) and navigate to the Eclipse workspace which contains the extracted 4diac FORTE, type
- Press the button (2) to run 4diac FORTE and observe the behavior of your application.
- Always press the button for stopping a 4diac FORTE launched within Eclipse. This avoids 4diac FORTE running in the background (not always shown in Task Manager).
Where to go from here?
If you want to build a 4diac FORTE, here is a quick link back:
After you installed all required tools, it's time to start using them. Take a look at the following page:
If you want to go back to the Start Here page, we leave you here a fast access
Or Go to top