Author Topic: C++ project with an asm file  (Read 5201 times)

Offline druizm

  • Multiple posting newcomer
  • *
  • Posts: 12
C++ project with an asm file
« 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline arjunkumar

  • Single posting newcomer
  • *
  • Posts: 3
Re: C++ project with an asm file
« Reply #2 on: July 16, 2019, 08:40:26 am »
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.

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