# MakeFile Help



## Drawmack (Jul 29, 2005)

nmake is giving me an error I cannot correct. The error is:
LINK : fatal error LNK1117: syntax error in option "opt:ref,icf"
NMAKE : fatal error U1077: 'link' : return code '0x16'

and then it stops. I cannot get this to make. I have tried all of the following (to no avail):
-opt:ref.icf
-opt:ref:icf
and just deleting this 

None of these has corrected the problem. The first two resulted in the same error (but with the minor change you would expect). The third resulted in telling me my disk was full (which it is not any where near).

If anyone can help it would be greatly appreciated.


----------



## AGCurry (Jun 15, 2005)

Drawmack said:


> nmake is giving me an error I cannot correct. The error is:
> LINK : fatal error LNK1117: syntax error in option "opt:ref,icf"
> NMAKE : fatal error U1077: 'link' : return code '0x16'
> 
> ...


It's tough without being able to see the whole thing.

Is your purpose to indicate that "opt" depends on "ref" and "icf"? If so, the syntax would be:

opt: ref icf

hope this helps.


----------



## Drawmack (Jul 29, 2005)

I am guessing that your suggestiong fixed the problem I was having because now I get another error. My new error is:


> link -out:blib\arch\auto\DBI\DBI.dll -dll -nologo -nodefaultlib -debug -
> \lib\CORE\perl58.lib oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
> .lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib
> LINK : warning LNK4044: unrecognized option "libpath:C:\Perl\lib\CORE"; ignored
> ...


I am attaching the makefile and the MakeFile.pl script (which generates the makefile) to this post in a zip file for completeness.

Thank you for you help.


----------



## AGCurry (Jun 15, 2005)

Drawmack, that is one heck of a make file.

From the error messages, looking at the make file, I'd say your problems are here:

LDDLFLAGS = -dll -nologo -nodefaultlib -debug -opt:ref icf -libpath:"C:\Perl\lib\CORE" -machine:x86



LDFLAGS = -nologo -nodefaultlib -debug -opt:ref icf -libpath:"C:\Perl\lib\CORE" -machine:x86

The "-opt:ref icf" doesn't look kosher. In your first post, I was thinking that you were MAKEing "opt". Now I see you're not.

Obviously, the linker simply does not like the -libpath and -opt options, or the syntax is incorrect for those options. You need to consult the documentation for your linker.


----------



## Drawmack (Jul 29, 2005)

Thank you very much, I'll dig around and see what I can find in the docs.


----------



## Drawmack (Jul 29, 2005)

I went into the make file and did a global search and replace with ,icf to '' then namke made and installed the file with no problem.


----------

