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

C++ project with an asm file

(1/1)

FrankCade:
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.

oBFusCATed:
Try this http://wiki.codeblocks.org/index.php/Adding_support_for_non_C/C%2B%2B_files_to_the_build_system

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

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

BlueHazzard:
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...

Navigation

[0] Message Index

Go to full version