This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
comfilepi:create_a_linux_project:index [2023/01/25 14:41] COMFILE Technology [Specify the Include Paths in the Project's Properties] |
comfilepi:create_a_linux_project:index [2023/03/13 13:27] (current) COMFILE Technology [Specify the Library Depenencies in the Project's Properties] |
||
---|---|---|---|
Line 4: | Line 4: | ||
This method can be used for much more than console applications, including Qt, GTK+, and even OpenGL to name a few. The demonstration that follows illustrates that development process for very simple GTK+ GUI application. | This method can be used for much more than console applications, including Qt, GTK+, and even OpenGL to name a few. The demonstration that follows illustrates that development process for very simple GTK+ GUI application. | ||
+ | |||
+ | To utilize this example, please be sure to install the GTK development tooling to the ComfilePi panel PC using the command ''sudo apt install libgtk-3-dev''. | ||
{{:comfilepi:create_a_linux_project:helloworld.zip|Download the source code}} for this demonstration. | {{:comfilepi:create_a_linux_project:helloworld.zip|Download the source code}} for this demonstration. | ||
Line 74: | Line 76: | ||
Those library dependencies can be obtained by running <html><code>pkg-config --libs gtk+-3.0</code></html> on the ComfilePi. | Those library dependencies can be obtained by running <html><code>pkg-config --libs gtk+-3.0</code></html> on the ComfilePi. | ||
+ | If you encounter any Intellisense errors, try synchronizing Visual Studio's copy of the ComfilePi's header files in //Tools-->Options-->Cross Platform-->Connection Manager-->Remote Headers Intellisense Manager// by selecting the appropriate connection and pressing the //Download// or //Update// button. | ||
+ | {{ :comfilepi:create_a_linux_project:intellisense.png }} | ||
===== Deploy, Build, and Degug ===== | ===== Deploy, Build, and Degug ===== | ||
- Add ''export DISPLAY=:0.0'' to the //Configuration Properties-->Debugging-->Pre-Launch Command// setting so the ComfilePi knows which display to show the window on. \\ {{ :comfilepi:create_a_linux_project:export_display.png |}}\\ | - Add ''export DISPLAY=:0.0'' to the //Configuration Properties-->Debugging-->Pre-Launch Command// setting so the ComfilePi knows which display to show the window on. \\ {{ :comfilepi:create_a_linux_project:export_display.png |}}\\ | ||
- | - Start the //Remote GDB Debugger//. The source code will be uploaded to the ComfilePi to be built. \\ {{ :comfilepi:create_a_linux_project:deploy_build_debug.png |}} \\ \\ The first time, a //Connect to Remote System// dialog window may appear. Enter the IP address of the ComfilePi in the //Host name// field and enter the ComfilePi's user credentials. \\ {{ :comfilepi:create_a_linux_project:connect_dialog.png |}} \\ \\ The settings can be changed in the //Configuration Properties-->General-->Remote Build Machine// setting. \\ {{ :comfilepi:create_a_linux_project:remote_build_settings.png? |}} \\ | + | - Start debugging. The source code will be uploaded to the ComfilePi to be built. \\ {{ :comfilepi:create_a_linux_project:start_debug.png |}} \\ |
- | - If no build errors are encountered, the program will execute on the ComfilePi, and the Visual Studio Remote GDB Debugger will attach to it. Go to //Debug-->Linux Console// to display the Linux Console Window and view any messages from ''printf'' statements. \\ {{ :comfilepi:create_a_linux_project:debugging.png |}} | + | - If no build errors are encountered, the program will execute on the ComfilePi, and the Visual Studio Remote GDB Debugger will attach to it. Go to //Debug-->Linux Console// to display the Linux Console Window and view any messages from ''printf'' and/or ''gprint'' statements. \\ {{ :comfilepi:create_a_linux_project:debugging.png |}} |
{{ :comfilepi:create_a_linux_project:gtk_window.png |}} | {{ :comfilepi:create_a_linux_project:gtk_window.png |}} | ||
+ | |||
+ | ===== Additional Resources ===== | ||
+ | * [[https://www.gtk.org/docs/|GTK Documentation]] | ||
+ | * Install GTK examples with `sudo apt install gtk-3-examples`. The examples will be installed to ///usr/share/doc/gtk-3-examples/examples// | ||
+ | * Use the [[https://glade.gnome.org/|Glade]] on a Linux PC to create a GUI using a WYSIWYG designer. \\ {{ :comfilepi:create_a_linux_project:glade-main-page.png }} | ||
+ |