Code::Blocks Forums
User forums => General (but related to Code::Blocks) => Topic started by: druizm on May 06, 2019, 10:20:40 am
-
Hello,
I have created a new "console" project for a simple C++ test. My cpp file has an ASM extern file where are defined some variables, functions, etc.
My C::B project has, now, two files: one in "Sources" folder and other in "ASM Sources". First, I need to compile my .asm file, but... how? My system has installed "nasm", but there are not any way to compile my asm file from C::B
Could anybody help me?
Thanks.
-
Check this wiki page: http://wiki.codeblocks.org/index.php/Adding_support_for_non_C/C%2B%2B_files_to_the_build_system
-
Here comes a real world example. I recently worked on a side project that required me to use SWIG. What the swig program does, in simple words, is take a special interface file (usually *.i) as input and, based on this input, it generates a C/C++ file to include in your project. This sounds like the perfect scenario to use as an example here :) If you want more practice to make code perfect see the list various tutorial here (https://hackr.io/tutorials/learn-c-plus-plus).
Here's what I did:
Command: Compile single file to object file
Extension: i
Macro: swig -c++ -lua $includes -o $file_dir/$file_name.cpp $file
Generated files: $file_dir/$file_name.cpp