Solved

nmake IFDEF

Posted on 2008-06-16
9
1,778 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 125 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
delete-remove 14 117
OneNote cannot connect to OneDrive 6 205
C++ Code Issue 4 48
windows 10 pin current folder to quick access not working 12 47
Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

759 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