ExecutionProcedure - Codeblock
ExecutionProcedure - Codeblock
1. Open Code::Blocks.
3. Select Console Application (for a simple C++ project) and click Go.
5. Name your project (e.g., "GTFS_Network") and specify the location for the project files.
1. Right-click on the project in the Project pane on the left and select Add Files....
o main.cpp
o CSVReader.cpp (assuming you’ve created this file based on the earlier description)
o Network.cpp
4. Repeat this process to add the header files (CSVReader.h, Network.h, types.h).
1. Right-click on the project in the Project pane and select Build Options....
2. Under Compiler Settings > Compiler Flags, ensure that any required flags for C++ (such as C+
+11 or later) are enabled.
o If using C++11 or later, check Have g++ follow the C++11 ISO C++ language standard
(or C++17/C++20 if needed).
3. Click OK.
If you are using a Makefile instead of the default build system, do the following:
2. Check This is a custom Makefile and specify the path to your Makefile.
3. Make sure your Makefile is set up to compile all .cpp files and link them.
Example Makefile:
TARGET = GTFS_Network
clean:
rm -f $(TARGET)
4. Run the make command by opening a Terminal and navigating to the project directory, then
typing:
make
Or, you can build directly from Code::Blocks using Build > Build Project.
The output should appear in the Code::Blocks console window and should display all the
GTFS data as described in the sample output.
This setup will allow you to compile, build, and execute the program in Code::Blocks with the
appropriate structure for handling GTFS data files. Make sure that the GTFS .txt files are present in
the specified directory (d:\\Datafiles), or adjust the path as needed.