I compile a 'cpp' file with the g++ (or gcc with -x c++ option) to obtain a .obj file, then I compile the remaining with VC and I have this linking error:
main.obj : error LNK2019: simbolo externo "void __cdecl fmulGCC(float *,float *)" ( fmulGCC@@YAXPAM0@Z) sin resolver al que se hace referencia en la funcion _main
fmul_GCC.obj : error LNK2019: simbolo externo __ZdlPv sin resolver al que se hace referencia en la funcion __Z7fmulGCCPfS_
fmul_GCC.obj : error LNK2019: simbolo externo __Znaj sin resolver al que se hace referencia en la funcion __Z7fmulGCCPfS_
Debug/mulfloat.exe : fatal error LNK1120: 3 externos sin resolver
With 'c' code it works, so I think that is for c++ function naming problem, the fmulGCC@@YAXPAM0@Z that generates VC is not equal in g++ (GCC).
The problem is that I can't be limited to C code if I want to mix, because it haven't Classes.
I have tried the option '-std=xxx' with the c++ options, and it don't work yet. Anyone knows a solution to this .
Thanks.

I can't mix VC & GCC
pedromc
Thanks,
Ayman Shoukry
VC++ Team
Ian Bell
Name decorations will be different in such cases.
Thanks,
Ayman Shoukry
VC++ Team
Gerd71
GCC has a secondary use for its __asm__ keyword: overriding the linker-level symbol for an identifier. For example,
void myfunction(void) __asm__("@realname@");
Unfortunately, you can't use GCC's __asm__ to do what you need as GCC's assembler backend rejects the character used on Visual C++'s name mangling. Considering that this assembler is targeted at Win32, where has always been a legal identifier character at the linker level, this can be considered a bug.
It is a shame that Visual C++ does not have a comparable feature to this particular use of __asm__. Something like __declspec(symbol, "name") would be really nice. At work we have an .obj parser that basically hex-edits the compiler-chosen name in an already-compiled file to get around this Visual C++ limitation.
Steve Wang 2006
For that my interest in mixing them. Maybe it would be a god idea that MS and the GNU community do the compilers compatible at this level, for C++ because for C are compatible now.
Compiling an entire project with GCC can be bad for stress :)
Storm Devil
Thanks,
Ayman Shoukry
VC++ Team
bmyersbook
-Kev