Cris Stringfellow
Cris Stringfellow

Reputation: 3808

How to fix Visual Studio linker frustration

I am pretty experienced writing my own code, but not in C++. I am used to adding .NET assembly references, and I want to get into using C++.

I downloaded a VC++ 6 project presenting a graph algorithm, opened it in Visual Studio 2010 Ultimate and downloaded the required libraries (LEDA .NET assemblies) however, they came with both DLLs and LIB so I thought I would have no problems with the .NET and C++ connection. Also, the LEDA project comes with C++ style .header files, and static libraries, yet frustration persists.

I put my LEDA header files in a directory visible to the project, since I can "Go to definition" of all the custom LEDA data types and see where they are defined in the LEDA include files.

But, I can not compile/link these data types in. The VS finds their very existence repulsive, and refuses to acknowledge they could possibly be found in leda.lib.

Steps I have already taken:

  1. Added additional /LIBPATH path under Properties ->Linker->General
  2. Added explicit lib references under Properties->Linker->Input
  3. Added all the paths containing LEDA header files and libraries to every path location I can find, like include path, reference path, library path.
  4. Copied the DLLs and LIBs to the release folder as well as the base folder of the project.
  5. Added a #pragma comment( lib, "leda" )

Still no joy.

It's quite bad since none of the custom typedefs are recognised the errors balloon to 646 errors.

If anyone is kind enough to offer assistance, thank you.

Upvotes: 0

Views: 1045

Answers (1)

ScarletAmaranth
ScarletAmaranth

Reputation: 5101

I can't guarantee this will work but try the following steps (therefore using it's default predefined paths instead of setting your own ones) :

1) Copy *.dll into Windows/System32 or / and (there is some confusion about x64 and x32 default checking in my head :)) Windows/SysWOW64.

2) Copy *.h files into x:\PathToVC2010\include\

3) Copy *.lib files into x:\PathToVC2010\lib\

Upvotes: 0

Related Questions