Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

nmake IFDEF

Posted on 2008-06-16
9
Medium Priority
?
1,898 Views
Last Modified: 2012-05-05
i have a make file which contains following lines

fndef CFLAGS
CFLAGS = -MMD -O2 -Wall
endif

when i used nmake (on windows platform )  to run this makefile  , it shows error
***********************
makefile(17) : fatal error U1034: syntax error : separator missing
Stop.
***************************




0
Comment
Question by:karana
  • 5
  • 3
9 Comments
 
LVL 53

Expert Comment

by:Infinity08
ID: 21793119
I assume that fndef is a typo, and that it actually says ifndef ?
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 21793121
>> makefile(17) : fatal error U1034: syntax error : separator missing

Which line is that ?
0
 
LVL 53

Accepted Solution

by:
Infinity08 earned 500 total points
ID: 21793136
>> nmake

Ah. If I'm not mistaken, you have to use this instead :

!IFNDEF CFLAGS
CFLAGS = -MMD -O2 -Wall
!ENDIF
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 7

Expert Comment

by:cybrexus
ID: 21793166
depends on the version of nmake but sometimes you'll need two !! with endif - so !!endif
0
 

Author Comment

by:karana
ID: 21800144
i tried some trail and error


fndef CFLAGS:
CFLAGS = -MMD -O2 -Wall
endif:

now it shows no error ...is it correct ?


0
 
LVL 53

Expert Comment

by:Infinity08
ID: 21800418
>> now it shows no error

Again fndef instead of ifndef.

Also, can you tell which line exactly the syntax error refers to ? (as I asked earlier)


>>  ...is it correct ?

I would think not, as the :'s at the end of the line signify labels rather than conditionals.


Did you read our suggestions ?
0
 

Author Comment

by:karana
ID: 21810723
we tried the below

!IFNDEF CFLAGS
CFLAGS = -MMD -O2 -Wall
!ENDIF

but , it show the same error on first line .
0
 
LVL 53

Expert Comment

by:Infinity08
ID: 21810749
Are you sure that line is in a position where it is allowed to be ? Can you show the entire makefile ?
0
 

Author Comment

by:karana
ID: 21811876
i was wrong ....
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

927 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question