Skip to main content
Add how to show brackets
Source Link
cup
  • 8.5k
  • 4
  • 23
  • 48

The macro should be defined without parameters.

gcc -DHASH=hash_fcn1 program.c -o program 

If you wish to pass parameters, the brackets need to be escaped

gcc -DHASH\(X\)=hash_fcn1\(X,55u,33u\) program.c -o program 

The macro should be defined without parameters.

gcc -DHASH=hash_fcn1 program.c -o program 

If you wish to pass parameters, the brackets need to be escaped

gcc -DHASH\(X\)=hash_fcn1\(X,55u,33u\) 

The macro should be defined without parameters.

gcc -DHASH=hash_fcn1 program.c -o program 

If you wish to pass parameters, the brackets need to be escaped

gcc -DHASH\(X\)=hash_fcn1\(X,55u,33u\) program.c -o program 
added 115 characters in body
Source Link
cup
  • 8.5k
  • 4
  • 23
  • 48

The macro should be defined without parameters.

gcc -DHASH=hash_fcn1 program.c -o program 

If you wish to pass parameters, the brackets need to be escaped

gcc -DHASH\(X\)=hash_fcn1\(X,55u,33u\) 

The macro should be defined without parameters.

gcc -DHASH=hash_fcn1 program.c -o program 

The macro should be defined without parameters.

gcc -DHASH=hash_fcn1 program.c -o program 

If you wish to pass parameters, the brackets need to be escaped

gcc -DHASH\(X\)=hash_fcn1\(X,55u,33u\) 
Source Link
cup
  • 8.5k
  • 4
  • 23
  • 48

The macro should be defined without parameters.

gcc -DHASH=hash_fcn1 program.c -o program