Single file compiling |
Top Previous Next |
While projects may be useful for larger programs they are a bit cumbersome if your program only consists of one source file and you want to quickly make and test changes to your code. The Emergence BASIC IDE is dual mode in that it allows compiling a single file directly to an executable or DLL. Steps to use single file mode
Executing your program After a successful build of the program you can test the resulting executable, if any, by selecting the Build menu and choosing Execute ... . Alternately the program can be executed by clicking the green 'Go' button on the tool bar. Notes The only resource available for use in single file mode is the programs icon selected with the Executable Options dialog. It is not necessary to use $main in single file mode. The compiler automatically determines the point of execution as there is only one file. The $main keyword will be silently ignored. Any options selected in the Executable Options dialog will be remembered for the next compile. The options are stored in a separate file with the source file name and a ".opts" extension in the same directory as the source file. If this file is deleted, or doesn't yet exist, the Executable Options dialog will display default values. Be sure to choose the proper output type. If you select a Console type for a Windows program you will get an error message about a missing _window_list variable from the linker. This error is normal and means you need to change the output type to Windows. You can still use the $include command in your single file. Use this to bring in additional source files. See Also: Using Projects |