[physfs] linking problem

Dave mewse at despayre.org
Thu Feb 24 23:04:02 EST 2005

Daniel Dadush wrote:

>Hi, I'm terribly new at this so I'm sorry if my question is rather dumb.
>I was desperately trying to built the physfs.dll from both within
>cygwin and ms visual studio 8 (beta) and I kept getting linker errors.
>This is the error I get from visual studio 8:
>------ Build started: Project: physfs, Configuration: Release
>Multithreaded DLL Win32 ------
>   Creating library .\Release/physfs.lib and object .\Release/physfs.exp
>win32.obj : error LNK2001: unresolved external symbol __imp__OpenProcessToken at 12
>win32.obj : error LNK2001: unresolved external symbol __imp__GetUserNameA at 8
>.\Release/physfs.dll : fatal error LNK1120: 2 unresolved externals
>Build log was saved at
>physfs - 3 error(s), 0 warning(s)
>I would really like to get this built but I really have no idea what's
>going wrong. If anyone has any idea what I'm doing wrong I would
>really appreciate it.
Hi Daniel,

I'm successfully using PhysFS 1.0.0 with Visual C++ 6.0, and I believe 
the linking problem you're facing might be because the library 
"advapi32" isn't being linked.

advapi32 seems to provide the OpenProcessToken *and* the GetUserNameA 

Hope this helps.

  __| | __ ___   _____ 
 / _` |/ _` \ \ / / _ \
| (_| | (_| |\ V /  __/
 \__,_|\__,_| \_/ \___|

More information about the physfs mailing list