Unresolved symbol ___arg_reduce_

I got an unresolved symbol error. It seems to occur on Win32 when the ___mth_i_dsincosx symbol is pulled in (not exactly sure where this occurs). During regular linking it fails, but explicitly putting -lpgc on the end of the link line seems to help. I don’t see much differences in the link commands though. Any ideas?

bash-3.2$ cat test_dll.c
#include <stdlib.h>

void f(void)
{
__mth_i_dsincosx();
}
bash-3.2$ pgcc -V

pgcc 6.2-3 32-bit target on x86 Windows
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2006, STMicroelectronics, Inc. All Rights Reserved.
bash-3.2$ pgcc -O4 -fastsse -c -o test_dll.o -Mmakedll test_dll.c
bash-3.2$ pgcc -v -O4 -fastsse -o test_dll.dll -Mmakedll test_dll.o
Microsoft ® Incremental Linker Version 8.00.50727.42
Copyright © Microsoft Corporation. All rights reserved.

libpgsse2.lib(dsincosx.obj) : error LNK2001: unresolved external symbol __arg_reduce
test_dll.dll : fatal error LNK1120: 1 unresolved externals

‘C:/Program Files/PGI/Microsoft Open Tools 8/bin/link.EXE’ -DLL ‘-libpath:C:/Program Files/PGI/Microsoft Open Tools 8/lib’ ‘-libpath:C:/Program Files/PGI/Microsoft Open Tools 8/PlatformSDK/lib’ -incremental:no -stack:2097152,2097152 test_dll.o -out:test_dll.dll -libpath:c:\PROGRA~1\PGI/win32/6.2-3/lib -defaultlib:libpgsse1 -defaultlib:libpgsse2 -nodefaultlib:libcmt -defaultlib:msvcrt -defaultlib:pgc -defaultlib:libnspgc -defaultlib:pg -defaultlib:oldnames
pgcc-Fatal-dlllink completed with exit code 1120

bash-3.2$ pgcc -v -O4 -fastsse -o test_dll.dll -Mmakedll test_dll.o -lpgc
Microsoft ® Incremental Linker Version 8.00.50727.42
Copyright © Microsoft Corporation. All rights reserved.

Microsoft ® Manifest Tool version 6.0.4071.0
Copyright © Microsoft Corporation 2004.
All rights reserved.

‘C:/Program Files/PGI/Microsoft Open Tools 8/bin/link.EXE’ -DLL ‘-libpath:C:/Program Files/PGI/Microsoft Open Tools 8/lib’ ‘-libpath:C:/Program Files/PGI/Microsoft Open Tools 8/PlatformSDK/lib’ -incremental:no -stack:2097152,2097152 test_dll.o -defaultlib:libpgc -out:test_dll.dll -libpath:c:\PROGRA~1\PGI/win32/6.2-3/lib -defaultlib:libpgsse1 -defaultlib:libpgsse2 -nodefaultlib:libcmt -defaultlib:msvcrt -defaultlib:pgc -defaultlib:libnspgc -defaultlib:pg -defaultlib:oldnames

‘C:/Program Files/PGI/Microsoft Open Tools 8/bin/mt.EXE’ -manifest test_dll.dll.manifest -outputresource:test_dll.dll;2

c:\PROGRA~1\PGI/win32/6.2-3/bin/pgstrp.EXE ./test_dll.dlf test_dll.dll ./test_dll.dwf
Unlinking ./test_dll.dlf
Unlinking test_dll.dll.manifest

Nevermind. Should have updated to 6.2-5 before testing as this seems to have been fixed.

Hi Chris,

Yes, this was fixed in the 6.2-4 release.

  • Mat