User forums > General (but related to Code::Blocks)

C++ project with an asm file



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?


Try this

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);

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".

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:
or else we would not be able to help you. Error descriptions with the word "some" are never usefull...


[0] Message Index

Go to full version