-
-
Notifications
You must be signed in to change notification settings - Fork 88
Update 03.creating-cppia-host.md : add info about dll_import and dll_export #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Add informations about dll_import and dll_export
@@ -39,3 +39,8 @@ When we run the following command... | |||
|
|||
...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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The plural is "information" too.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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