compatibility between the masm32 lib and c++ project

Started by ToutEnMasm, August 24, 2011, 11:59:21 AM

Previous topic - Next topic

ToutEnMasm

Hello,
There is problem when i try to use the masm32 lib with c++ code using the crt.
The linker say  that the masm32 want this crt lib and the c++ want this other lib and the two cannot be mixed.
There is only two prog in the masm32 who use the crt.
wait_key.asm and retkey.asm are this two files who use the getch (crt_getch) function.
Is it possible in the future to put this files in another lib to keep the compatibilty ?.


hutch--

Yves,

the problem is you cannot use 2 libraries with the same name so if you need to link MASM code that uses the CRT with C++ code that uses the CRT you need to call the same library. Now this would mean creating an include file for the C++ version of the CRT and see if that works.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

dedndave

you could create a second library by replacing getch with cin.get

ToutEnMasm


MichaelW

Since the MASM32 library is created from separately assembled procedures, linking with the MASM32 library will not pull in any procedures that are not specifically referenced.
eschew obfuscation

ToutEnMasm


What i have done to simplify the problem:
Put out the two files of the masm32 lib and use getch ( proto c) with the include files who are already made .