Windows build error with p3dwrapper.c

Hi everyone,

Just ran into this error building the latest CVS source. I’m using VS 2008. Heres the error:

1>[ 99%] Linking executable built/bin/p3dWrapper.exe
1>direct/src/p3d/p3dWrapper.c : fatal error LNK1107: invalid or corrupt file: cannot read at 0xB78

I was able to rebuild by commenting out the p3dwrapper (lines 4537 thru 4550 in makepanda.bat)
which read as follows:

if (not RUNTIME and not RTDIST):
if (sys.platform.startswith(“win”)):
OPTS=[‘DIR:direct/src/p3d’]
TargetAdd(‘p3dWrapper.exe’, opts=OPTS, input=‘p3dWrapper.c’)

for g in glob.glob(“direct/src/p3d/*.p3d”):
base = os.path.basename(g)
base = base.split(".", 1)[0]

if (sys.platform.startswith("win")):
  TargetAdd(base+".exe", input='p3dWrapper.exe')
  CopyFile(GetOutputDir()+"/bin/"+base+".p3d", g)
else:
  CopyFile(GetOutputDir()+"/bin/"+base, g)

Any thoughts?

-Andrew

Ignore it for now. I’m working on it.

Will do, thanks for getting back to me.
-Andrew

I actually just checked in a fix for the problem.

Just ran the latest as of 11am EST…got a different error.

1>[ 99%] Building C object built/tmp/p3dWrapper.obj
1>p3dWrapper.c
1>[ 99%] Linking executable built/bin/p3dWrapper.exe
1>p3dWrapper.obj : error LNK2019: unresolved external symbol __imp__RegCloseKey@4 referenced in function _main
1>p3dWrapper.obj : error LNK2019: unresolved external symbol __imp__RegQueryValueExA@24 referenced in function _main
1>p3dWrapper.obj : error LNK2019: unresolved external symbol __imp__RegOpenKeyA@12 referenced in function _main
1>built/bin/p3dWrapper.exe : fatal error LNK1120: 3 unresolved externals

any suggestions?

Oops, forgot to check in one change. Fixed.

Rebuilding with latest version now…will let you know if it succeeds.