Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Member

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 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`.
Copy link
Member

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?

Copy link
Author

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.

Copy link
Member

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.