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".
My C++ file contains a "extern" like this:
[...]
extern "C" {
// Subrutines en ASM
void posCurScreenP1();
void moveCursorP1();
void openP1();
void getMoveP1();
void movContinuoP1();
void openContinuousP1();
void printChar_C(char c);
int clearscreen_C();
int printMenu_C();
int gotoxy_C(int row_num, int col_num);
char getch_C();
int printBoard_C(int tries);
void continue_C();
}
[...]
and my asm file contains this:
.586
.MODEL FLAT, C
; Funcions definides en C
printChar_C PROTO C, value:SDWORD
printInt_C PROTO C, value:SDWORD
clearscreen_C PROTO C
clearArea_C PROTO C, value:SDWORD, value1: SDWORD
printMenu_C PROTO C
gotoxy_C PROTO C, value:SDWORD, value1: SDWORD
getch_C PROTO C
printBoard_C PROTO C, value: DWORD
initialPosition_C PROTO C
.code
[...]
Sure I'm doing some things wrong. Could you help me?
Thanks.