More complicated -D in MSCV++ IDE? 
Author Message
 More complicated -D in MSCV++ IDE?

Basically, I'm having trouble making an equivalent -D define in MSVC++
of the following gcc/unix/anything-else

-Dmalloc(X)=mymalloc(X,__LINE__,__FILE__)

It interprets the "," as a new define and gets confused, or if I put it
in "" then it ignores the "=". Does anyone know a simple way around this
bar #include'ing a .h in every .c file (which is bad coding standard:))

Sincerely,

Lund

--

Programmer & Unix Administrator
http://www.*-*-*.com/
"It is easy to be wise in hindsight"



Sun, 01 Jul 2001 03:00:00 GMT  
 More complicated -D in MSCV++ IDE?

Quote:

> Basically, I'm having trouble making an equivalent -D define in MSVC++
> of the following gcc/unix/anything-else

> -Dmalloc(X)=mymalloc(X,__LINE__,__FILE__)

> It interprets the "," as a new define and gets confused, or if I put it
> in "" then it ignores the "=". Does anyone know a simple way around this
> bar #include'ing a .h in every .c file (which is bad coding standard:))

The -D compiler switch is not intended to define anything other than
simple defines of the form var=value.  I'm afraid you will need to place
this macro definition in your source somewhere (which IMHO, is not a bad
coding standard).

--
*------------------------------------------------------------
| J. Keith Wedinger
| Technical Specialist - The Limited, Inc.

| http://www.serve.com/uccats
|



Mon, 02 Jul 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. DS==SS vs DS!=SS in a DLL

2. MSCV 5.0 Ifstream CREATES files?

3. Complicated DataGrid?

4. Extremely short -extremely complicated

5. reading complicated c declarations !!

6. #defining a "complicated" debug macro

7. Saving a complicated linked list

8. Complicated Function Declarations

9. abstraction too complicated

10. Creating complicated DevStudio macros

11. complicated void-malloc-struct-assign combination

12. Class Wizard: Very complicated

 

 
Powered by phpBB® Forum Software