DEF file syntax error in visual studio 2012
Asked Answered
P

2

8

I have a vs project which wouldn't compile once I upgraded to visual studio 2012. Its a win32 dll project and it complains about the def file. This is the def file,

LIBRARY test.dll
VERSION 3.1.4.1
EXPORTS
addNumbers @1

and this is the error I get when I compile the project in visual studio 2012 ultimate.

Source.def(2): fatal error LNK1118: syntax error in 'VERSION' statement

What is confusing me is that, this works perfectly fine with visual studio 2008 & 2010.

Any idea what is going wrong here?

Thanks Sunil

Poindexter answered 16/11, 2013 at 18:13 Comment(0)
A
16

VERSION 3.1.4.1

DEF files are old. Back in ye goode olde days, programmers only ever needed two version numbers, major and minor. The idea of adding a revision and build number was conjured by a manager, not a programmer. A build number, wtf?

You'll have to settle for VERSION 3.1. And yes, that mistake got silently ignored for a very long time. Not anymore, the manager finally found out :)

Use a version resource instead.

Above answered 16/11, 2013 at 18:41 Comment(0)
D
0

Link takes only major.minor versions

Dimitri answered 31/1, 2021 at 6:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.