I had many experiences around mixing languages
e.g.
qbasic <-> assembly
qbasic <-> pascal
c++ -> qbasic
c++ <-> assembly
but i failed to make mix between qbasic & C++ ( C++ <- qbasic )
i think there is one method to do that,
declare qbasic function as pascal in c++
in qbasic
Code: Select all
function addone%(n as integer)
addone%= n + 1
end function
in C++
Code: Select all
extern "C"{
int pascal addone(int);
}
main(){
int foo;
foo=addone(3);//foo must be 4
}
and compiler say:
Linker Error: Undefined symbol addone in module F:\mix.CPP
need your comments
ThankX
Cheers,
Ahmad T. Dajani