Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

Errors building vc12/nvtt.sln with Visual Studio 2013 Community (Update 5) - CUDA #242

Open
JustAndreww opened this issue Aug 21, 2016 · 3 comments

Comments

@JustAndreww
Copy link

JustAndreww commented Aug 21, 2016

Hi,

I'm using Windows 7 x64 + Visual Studio 2013.5 + CUDA 7.5.

  • git clone repo
  • install cuda runtime and includes
  • open project/vc12/nvtt.sln in vs2013
  • change configuration to Relese-CUDA x64
  • hit nvcompress -> set as start project in solution explorer
  • hit build (f5)

First error will appear:

Error   1   error C2065: 'uint8_t' : undeclared identifier  src\nvimage\ImageIO.cpp 327 1   nvimage

Can be fixed via adding to ImageIO.cpp:

#include <stdint.h>

After fixing that and adding CUDA Include directory to nvtt solution additional directories I've met following errors in CudaUtils.cpp:

Error   1   error C2065: 'Library' : undeclared identifier  src\nvtt\cuda\CudaUtils.cpp 80  1   nvtt
Error   2   error C2146: syntax error : missing ';' before identifier 'nvcuda'  src\nvtt\cuda\CudaUtils.cpp 80  1   nvtt
Error   3   error C3861: 'nvcuda': identifier not found src\nvtt\cuda\CudaUtils.cpp 80  1   nvtt
Error   4   error C2065: 'nvcuda' : undeclared identifier   src\nvtt\cuda\CudaUtils.cpp 85  1   nvtt
Error   5   error C2228: left of '.isValid' must have class/struct/union    src\nvtt\cuda\CudaUtils.cpp 85  1   nvtt
Error   6   error C2065: 'nvcuda' : undeclared identifier   src\nvtt\cuda\CudaUtils.cpp 93  1   nvtt
Error   7   error C2228: left of '.bindSymbol' must have class/struct/union src\nvtt\cuda\CudaUtils.cpp 93  1   nvtt
Error   8   error C2065: 'nvcuda' : undeclared identifier   src\nvtt\cuda\CudaUtils.cpp 102 1   nvtt
Error   9   error C2228: left of '.bindSymbol' must have class/struct/union src\nvtt\cuda\CudaUtils.cpp 102 1   nvtt
Error   10  error C2065: 'nvcuda' : undeclared identifier   src\nvtt\cuda\CudaUtils.cpp 113 1   nvtt
Error   11  error C2228: left of '.bindSymbol' must have class/struct/union src\nvtt\cuda\CudaUtils.cpp 113 1   nvtt

That code in CudaUtils.cpp is causing such error:

#if NV_OS_WIN32
    Library nvcuda("nvcuda.dll");
#else
    Library nvcuda(NV_LIBRARY_NAME(cuda));
#endif

It seems that is somehow relates to: #230

Returning Library.h and Library.cpp will produce different set of errors:

Error   1   error LNK2001: unresolved external symbol compressKernelDXT3    vc12\nvtt\CudaCompressorDXT.obj nvtt
Error   2   error LNK2001: unresolved external symbol setupOMatchTables vc12\nvtt\CudaCompressorDXT.obj nvtt
Error   3   error LNK2001: unresolved external symbol setupCompressKernel   vc12\nvtt\CudaCompressorDXT.obj nvtt
Error   4   error LNK2001: unresolved external symbol compressKernelDXT1    vc12\nvtt\CudaCompressorDXT.obj nvtt
Error   5   error LNK2001: unresolved external symbol bindTextureToArray    c12\nvtt\CudaCompressorDXT.obj  nvtt

So, I'm really stuck. Can't even build this tool to test how it works.

Is there any latest binaries with CUDA available?

Thanks!

@JustAndreww JustAndreww changed the title Erros building nvtt with Visual Studio 2013 Community (Update 5) - CUDA Errors building vc12/nvtt.sln with Visual Studio 2013 Community (Update 5) - CUDA Aug 21, 2016
@zenoengine
Copy link

I have same problem. anyone help me please. 😢

@charlietangora
Copy link

Try adding the Cuda library to "Build Customizations" (in the project right-click menu.)

@chidea
Copy link

chidea commented Jan 14, 2018

These files are missing in nvcore.
https://github.com/casseveritt/nvidia-texture-tools/blob/master/src/nvcore/Library.h
https://github.com/casseveritt/nvidia-texture-tools/blob/master/src/nvcore/Library.cpp
Their include macros should have "nvcore/" before them like below.
#include "nvcore/nvcore.h"
#include "nvcore/Debug.h"

This line has to be in the top of CudaUtils.cpp in nvtt.
#include "nvcore/Library.h"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants