|
Re: Compiled new type, but type not found [message #1753586 is a reply to message #1753529] |
Tue, 07 February 2017 22:00 |
|
Hi,
after a first look it seems that you are adding to much or the wrong parts to your module's CMakeList.txt.
FORTE's cmake infrastructure is automatically scanning all the module directories and sees whats in there to add them to your cmake configuration. While your code adds your directory it violates some rules for modules. The original intention from the guy (was not me) who added this approach was that modules is something you can activate and deactivate in your CMake configuration for your build target.
For that the only thing you need to add to your CMakeLists.txt should be:
forte_add_module(ProcessingStation "FBs for the processing station") # the first param is the name of your module will turn into the cmake option FORTE_MODULE_ProcessingStation the second name is some additional description
forte_add_sourcefile_hcpp(AddandSub)
With that when you rerun cmake gui you should have an additional option (i.e., FORTE_MODULE_ProcessingStation) which you can enable and disable. As with the initial setup you need to run configure until no further red options are present and the generate.
If you are compiling under windows with VS I noticed that when you later on add more FBs to your module VS not always correctly recognizes the change in the cmakelist.txt and you need to run cmake gui. Therefe have a look in the compile output if your FB's cpp file is listed there.
I hope this helps,
Alois
P.S.: I thought that there was a documentation page dedicated to describe the steps above. Somehow I can not find it anymore. But I always talk the utils or convert module as reference when I make my own module.
P.P.S.: With FORTE 1.8.4 you can also specifiy an external directory outside of the FORTE source tree where you can place module directories. this can be helpfull if you don't want to mix your code with original forte code. See this bug for details.
|
|
|
|
Re: Compiled new type, but type not found [message #1753618 is a reply to message #1753616] |
Wed, 08 February 2017 08:44 |
|
Great that it works. The documentation is part of the 4diac-ide code. Currently still in the mercurial repository at sourceforge (but we are heavily working on finally moving it to Eclipse's git). You can find it there in the plugins/org.fordiac.ide/html directory. We will also look on where we lost this part of the tutorial. But having more tutorials would be great. Thanks for the offer.
Having the possibility to put fbs and extension libraries (e.g. also communication protocols, new architectures, IO access) into different repositories was the main reason for having this external directory option. I think it is even possible to have several repositories in the external directory as, as far as I understood, the directories will be recursively searched. So your CMake List.txt could also be in sub directory further down the tree. But I haven't tested this yet.
|
|
|
Powered by
FUDForum. Page generated in 0.02286 seconds