Solved

nmake IFDEF

Posted on 2008-06-16
9
1,723 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 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
Backup Your Microsoft Windows Server®

Backup 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.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

If your system is showing symptoms of browser hijacks or 'google search redirects' check out my other article (http://rdsrc.us/u3GP7A) first and run the tool TDSSKiller (http://rdsrc.us/GDBBs4) to get rid of the infection. Once done, and if the …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them 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…

785 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