Update 03.creating-cppia-host.md : add info about dll_import and dll_export#182
Update 03.creating-cppia-host.md : add info about dll_import and dll_export#182Pign wants to merge 1 commit intoHaxeFoundation:masterfrom
Conversation
Add informations about dll_import and dll_export
| ...the c++ compiler will start the two step compilation process (1. generate the c++ source files, and 2. kick off the c++ compiler to create the executable). | ||
| The result will be a host executable called **bin/Host** on Linux/Mac and **bin/Host.exe** on Windows. | ||
|
|
||
| You will notice that an additional file will be created : `export_classes.info`. This file contains informations about classes and other components included in the host you have just generated. |
| You will notice that an additional file will be created : `export_classes.info`. This file contains informations about classes and other components included in the host you have just generated. | ||
| You can specify a path for this file by using `-D dll_export=my/path/export_class.info`. | ||
|
|
||
| Moreover, when compiling your CPPIA script, you'll want to add its counterpart: `-D dll_import=my/path/export_class.info`. |
There was a problem hiding this comment.
It might be because I'm lacking context but I don't understand what this sentence means. What are we adding where and why?
There was a problem hiding this comment.
Given it's a -D I thought it was pretty obvious that it was added to the command line used to start compilation.
However, since compiling the host creates a file that should be used to compile the guest, I think it's the whole tutorial that needs to be updated to start with the host creation…
I didn't want to change too much at first but the more I think about it, the more it seems necessary.
I'm going to head that way and update the PR.
There was a problem hiding this comment.
I think it's the whole tutorial that needs to be updated to start with the host creation…
@Pign I think there is some benefit to having the simple script creation page first, to show how easy it is to get running with the builtin host.
I was about to make a PR because I also found this set of pages to be a bit lacking, but I didn't think to check first and completely missed your PR 😅...
Here is my version, where I took the approach of just adding a new page: https://github.com/tobil4sk/code-cookbook/blob/553adbcd10abaad8eed02083599d6fa07fe59bac/assets/content/cookbook/Other/Working-with-cppia/05.host-vs-script-classes.md. I think it is helpful to see an example of why export_classes.info might be needed, rather than just mentioning it and how to change the path. Let me know if you have any thoughts or improvements.
Add basic explanation about dll_import and dll_export