So I'm attempting to build something:
1>------ Build started: Project: some_project, Configuration: Release Win32 ------
1>Linking...
1>LINK : fatal error LNK1104: cannot open file 'CGAL-vc90-mt.lib'
1>Build log was saved at "file://c:\Users\Whoever\Documents\some_project\some_project.dir\Release\BuildLog.htm"
1>some_project - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
I have a CGAL-vc90-mt.lib but I don't know where in the directory tree to drop it in so the build process above can find it. I don't even know where to look to find out where it expects to find it presently.
Thanks for any help.
In the project settings, then "Configuration Properties" then "Linker" then "General" and add the directory where your lib file is in the "additionnal library directories".
This is from visual c++ 2010, but I am quite confident it similar in vc 2008.
Related
I'm trying to build libvpx 1.3.0 under Visual Studio 2012 (vs11) under windows 8.1 (x64).
I read the build prerequisites (http://www.webmproject.org/code/build-prerequisites/) and configured libvpx as following:
./configure --target=x86-win32-vs11 --disable-examples --disable-docs --disable-unit-tests
After the configure i do a make, without errors. But when i lauch the solution under Visual Studio and try to build, i get those path error:
1>------ Build started: Project: obj_int_extract, Configuration: Release Win32 ------
1> obj_int_extract.c
1>c1 : fatal error C1083: Cannot open source file: '.\\home\Thomas\libvpx-v1.3.0\build\make\obj_int_extract.c': No such file or directory
2>------ Build started: Project: vpx, Configuration: Release Win32 ------
2>cl : Command line warning D9002: ignoring unknown option '/home/Thomas/libvpx-v1.3.0/vp8/encoder/vp8_asm_enc_offsets.c'
2>cl : Command line error D8003: missing source filename
2> 'obj_int_extract.exe' is not recognized as an internal or external command,
2> operable program or batch file.
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(124,5): error MSB3073: The command "call obj_int_extract.bat /home/Thomas/libvpx-v1.3.0
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(124,5): error MSB3073: :VCEnd" exited with code 1.
========== Build: 0 succeeded, 2 failed, 0 up-to-date, 0 skipped ==========
I tryed both MSYS and Cygwin, same result.
Any idea ?
Ok, problem fixed:
The 1.3.0 snapshot seems to be faulty, cloning the git was the solution, it will probably be gone in the next snapshot.
Configured with Cygwin, MSYS was missing a perl module.
1>------ Build started: Project: Setup, Configuration: Debug Win32 ------
1>BoxDemo.obj : error LNK2019: unresolved external symbol _D3DX11CreateEffectFromMemory#24 referenced in function "private: void __thiscall BoxApp::BuildFX(void)" (?BuildFX#BoxApp##AAEXXZ)
1>C:\Users\Josh\Documents\Game Institute\DirectX\Chapter 1\Projects\Setup\Debug\Setup.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I'm using VS2012 and trying to setup DX11 using a sample program from Frank D Lunas DX11 book. I have no idea what this error message means, any help would be appreciated.
1>------ Build started: Project: Setup, Configuration: Debug Win32 ------
1>Effects11d.lib(EffectAPI.obj) : error LNK2019: unresolved external symbol _D3DCompileFromFile#36 referenced in function _D3DX11CompileEffectFromFile
1>C:\Users\Josh\Documents\Game Institute\DirectX\Chapter 1\Projects\Setup\Debug\Setup.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Linker cannot find definition of D3DX11CreateEffectFromMemory function. This function is a part of Effects11 framework. And you need to link Effects11.lib to build this program.
Previously, to develop DirectX apps, you must have been DirectX SDK installed.
Now that stand-alone DirectX SDK concerned legacy and now it is a part of Windows SDK (since version 8.0). You`ve got it when installed Visual Studio 2012.
The problem is now this SDK version doesn't include Effect11 framework, among other things.
There are several ways to fix this problems:
Download and install legacy DirectX SDK. When compiling you will get some warnings, because of conflicting old DirectX SDK and new Windows SDK. To solve this you can switch to your project to v110xp toolset or install Windows 7 SDK and switch to v100 in project's options.
In case of this sample program, Mr. Luna included compiled libs in Common folder of source code archive. But I'm not sure if it will work with Win8 SDK.
Correct source code and strip out Effect11 stuff. If you just learning DirectX, it is not easy way.
Some more explanation from Chuck Walbourn - MSFT:
Where is the DirectX SDK?
Effects for Direct3D 11 Update
I am working a project that uses the Discrete Gaussian Image Filter within ITK. I am using CMake to automate the build process but it seems that CMake is leaving out certain ITK libraries during the configuration/generate step. I am currently using other headers in the ITK library without any issue. There are no configuration error messages in CMake for the project.
The CMakeLists.txt for my project:
#PROJECT(REGISTRATION)
#
# List of source files
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
# Top of file: the name of the program
PROJECT(MultiObjModelToUSReg)
INCLUDE_REGULAR_EXPRESSION("^.*$")
FIND_PACKAGE( ITK REQUIRED)
IF( ITK_FOUND )
INCLUDE( ${USE_ITK_FILE} )
ENDIF( ITK_FOUND )
# Directories to search for #include (add more if needed)
# (ITK is already included through the use of INCLUDE(${ITK_USE_FILE})
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
src
)
# Name of the executable
#SET(MultiObjModelToUSReg MultiObjModelToUSReg_EXE)
# All source files (only .cxx, not .h or .txx)
SET(MultiObjModelToUSReg_SRCS
src/Utilities.cpp
src/MultiObjModel.cpp
src/USVolume.cpp
src/Registration.cpp
src/BoneProbabilityMap.cpp
#src/MultiObjModelToUSRegistration.cpp
#src/USRegistrationDialog.cpp
#src/MainPanel.cpp
#src/ModelRegistration.cxx
)
#only .h files that use QT_ macros!
#SET(MultiObjModelToUSReg_HEADERS
#src/USRegistrationDialog.h
#src/MainPanel.h
#src/ModelRegistration.h)
#SET(MultiObjModelToUSReg_FORMS
##ui/USRegistrationDialog.ui
##ui/MainPanel.ui
#ui/ModelRegistration.ui)
#SET(MultiObjModelToUSReg_RESOURCES)
# These two lines will compile and link your executable
#ADD_EXECUTABLE(MultiObjModelToUSReg
#${MultiObjModelToUSReg_EXE}
#${MultiObjModelToUSReg_SRCS}
#${MultiObjModelToUSReg_HEADERS_MOC}
#${MultiObjModelToUSReg_FORMS_HEADERS}
#${MultiObjModelToUSReg_RESOURCES_RCC}
#)
ADD_LIBRARY(MultiObjModelToUSReg STATIC ${MultiObjModelToUSReg_SRCS})
TARGET_LINK_LIBRARIES(MultiObjModelToUSReg ${ITK_LIBRARIES} )
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
ENABLE_TESTING()
INCLUDE(CTEST)
IF (BUILD_TESTING)
ADD_SUBDIRECTORY (Test)
ENDIF (BUILD_TESTING)
CMake's error-free output:
Check for working C compiler using: Visual Studio 9 2008
Check for working C compiler using: Visual Studio 9 2008 -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler using: Visual Studio 9 2008
Check for working CXX compiler using: Visual Studio 9 2008 -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Configuring done
Generating done
However, when I compile in Visual C++ 2008:
1>------ Build started: Project: MultiObjModelToUSReg, Configuration: Debug Win32 ------
1>Compiling...
1>BoneProbabilityMap.cpp
1>..\src\BoneProbabilityMap.cpp(8) : fatal error C1083: Cannot open include file: 'itkDiscreteGaussianImageFilter.h': No such file or directory
1>Build log was saved at "file://c:\MultiObjModelToUSReg\bin\MultiObjModelToUSReg.dir\Debug\BuildLog.htm"
1>MultiObjModelToUSReg - 1 error(s), 0 warning(s)
2>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug Win32 ------
2>Project not selected to build for this solution configuration
========== Build: 0 succeeded, 1 failed, 12 up-to-date, 1 skipped ==========
While there is a workaround to manually it into the project's configuration, I will need to collaborate with others so it would be ideal to have the build process automated.
Any help would be greatly appreciated! (I am quite new to Stackoverflow, please let me know if I made anything unclear).
You need to build ITK with ITK_BUILD_ALL_MODULES=ON.
I just finished my project and tried building it in Release for the first time. I've had previous issues with the Windows 7 SDK and the Common7 stuff located in program files(ie they were missing and I had to install them from msdn).
The build is complaining :
1>LINK : fatal error C1350: error loading dll 'msobj110.dll': dll not found
1>Block.obj : fatal error LNK1000: unknown error at 00A14372; consult documentation for technical support options
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Yet I looked at :
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE
I have the same folder under C:\Program Files..., and IDE is almost empty; doesn't have the ms libraries.
How can I know where Visual Studio picks these dll from? I'm using VS2012.
I have a solution consisting of 3 projects. One is a static library, and two are console-based .exe files that depend on and link against this library. Their settings seem to be identical. I build one of them:
1>------ Build started: Project: masksample, Configuration: Debug Win32 ------
1>Compiling...
1>stdafx.cpp
1>Compiling...
1>masksample.cpp
1>Compiling manifest to resources...
1>Linking...
1>LINK : C:\Users\DarekSz\Praca\cci\Debug\masksample.exe not found or not built by the last incremental link; performing full link
1>Embedding manifest...
1>masksample - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
Then I go on to building the other:
1>------ Build started: Project: calibsample, Configuration: Debug Win32 ------
1>Compiling...
1>stdafx.cpp
1>Compiling...
1>calibsample.cpp
1>Compiling manifest to resources...
1>Linking...
1>LINK : C:\Users\DarekSz\Praca\cci\Debug\calibsample.exe not found or not built by the last incremental link; performing full link
1> Creating library C:\Users\DarekSz\Praca\cci\Debug\calibsample.lib and object C:\Users\DarekSz\Praca\cci\Debug\calibsample.exp
1>Embedding manifest...
1>calibsample - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========
Why does the linker create the .lib and .exp files this time? Is there some option to turn this on and off that I activated without knowing about it?
It's a bit late but, maybe someone else could find useful this hint.
BTW I'm not a c++ guru...
In my solution i have 3 projects. One is a dll project, the others are two Win32 app projects referencing the dll project.
Usually, with your dll built, you have also some others file generated (.exp, .lib) also for the NON dll projects. This can occour when you include a .h file of the dll project, into the app project, which contains a class marked with __declspec(dllexport).
To avoid the linker think your are trying to include some .h files to "export" use a conditional expression to define your _declspec macro.
Example:
#if defined(_DO_NOT_EXPORT)
#define DllExport
#else
#define DllExport __declspec(dllexport)
#endif
Ok, let's say you have a MyClass.h in your dll project.
in your .h file you could have now:
class DllExport MyClass {
...
}
When you want to include this .h file into a NON dll project, you have simply to define the _DO_NOT_EXPORT condition
#define _DO_NOT_EXPORT
#include "MyClass.h"
This is normal if one or more functions is/are exported from your executable.