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

Offline FrankCade

  • Single posting newcomer
  • *
  • Posts: 1
C++ project with an asm file
« on: April 06, 2020, 09:42:37 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: 13439
    • 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 vicycleeight

  • Single posting newcomer
  • *
  • Posts: 1
Re: C++ project with an asm file
« Reply #2 on: February 21, 2021, 02:08:04 pm »
I have copied your simple sample and I have tried to compile it from Visual Studio Code. When I run my "gcc build active file" tasks, I receive this error:

/root/C-foro/so.c:1:8: error: expected identifier or ‘(’ before string constant extern "C" int fun (void);

Offline fozivid

  • Single posting newcomer
  • *
  • Posts: 1
Re: C++ project with an asm file
« Reply #3 on: June 30, 2022, 02:41:59 pm »
I would like to compile a simple C project that has some externals functions defined in a ASM file. My main file is a C++ that calls some "extern "C"" functions that are defined in a assembly file.

When I run task "g++ build active file", I receive some warnings about the "extern" and some errors about functions defined in asm file telling "reference to my_funcions not defined".

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3235
Re: C++ project with an asm file
« Reply #4 on: June 30, 2022, 03:27:58 pm »
Hi,
please create a new topic and do not resurect old topics older than a year.
If you have compilation problems, always state the full build log:
https://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F
or else we would not be able to help you. Error descriptions with the word "some" are never usefull...