I have built the WebRTC library by using this tutorial:
https://webrtc.org/native-code/development/
Then I try to run this simple program on both Visual Studio 2013 Community and Visual Studio 2017 Professional:
image here
However in both cases I have the same error:
Error LNK1107 invalid or corrupt file: cannot read at 0x159BE command_line_parser.lib
I have tried to link to any possible webrtc *.lib files, but the problem still remains.
What is the correct way to link webrtc library to visual C++?
You need cl.exe as compiler. Default by gn build prosess for generating the ninja files is set 'is_clang = true' and the clang.exe compiler is used.
please set in 'gn args --lists out/debug ' the parameter 'is_clang = false'.
The problem is with the linker, not with the compiler. you can link the webrtc .obj files but you can't link the webrtc .lib files.
I solve it with the GN build option "use_lld=false".
Related
I'm trying build wxwidgets Hello World sample program in visual studio and i'm using prebuilt wxwidgets instead download that and build it myself.
and after configuring visual studio project for wxwidgets i always facing with this error:
Error C1083 Cannot open include file: '../../../lib/vc142_x64_dll/mswud/wx/setup.h': No such file or directory wxwidgets_programming_cpp C:\wxwidgets\include\msvc\wx\setup.h 140
where is the problem. I think i configured visual studio project in a wrong way. can you help me how to configure visual studio project for a regular wxwidgets app?
You need to define wxMSVC_VERSION_ABI_COMPAT in the preprocessor definitions to use these binaries, which will result in using the correct vc14x prefix instead of vc142 used by default. This is already supposed to be done by wxwidgets.props, at least for the DLL configuration which you seem to use, so I am not sure why it doesn't work for you if you do use this file, but at any rate this symbol must be defined and it isn't in your case.
I generated a Visual Studio 15 2017 project with CMake to compile LLVM and Clang myself. I've tried to build the ALL_BUILD project from Visual Studio (as the getting started page suggested).
But the build failed with a linking error due to (I assume) the linker did not have permission to open a file. This specific file was LLVM-C.def.
The error message:
Cannot Open File '<path_to_build_folder>/build/tools/llvm-shlib/LLVM-C.def
I've tried to give full permission to the user, also tried as admin but did not work.
edit:
The file did not get created because the gen-msvc-exports.py script fails to locate a libllvm-c.args file. It searches the Debug directory for this file but I found it in the $(Configuration) directory. Could this be some Visual Studio configuration/macro problem?
edit2:
Also is there any workaround to get the Clang Tooling library to work on Windows? The precompiled package doesn't contain any headers or static libraries to work with (but for some reason the Linux one does).
I am trying to compile a library for 2D localization called libdots which can be found on this website with Visual Studio 2015 on Windows for x86 or x64.
The following is stated in the readme file of the lib:
It is written in pure c and has no external library dependencies other
than 'libc'.
What I have done so far:
Installed OpenCV 3.0.0 to C:/opencv
Installed CMake for Windows
Installed MinGW
Set the following System Environment Variable:
OPENCV_DIR C:\opencv\build\x86\vc12
Added the following to the Path variable in Windows settings:
%OPENCV_DIR%;
C:\opencv\build\x86\vc12\lib;
C:\opencv\build\include;
C:\opencv\build\include\opencv;
C:\opencv\build\include\opencv2
Then I configured and generated the Makefile with cmake-gui and selected Visual Studio 14 2015 generator with "Use default native compilers":
This produced a Visual Studio Solution file (*.sln). Opening this file shows me the complete C project in the IDE. But when trying to build the project, I get the following errors:
Does somebody have a hint how to proceed and/or solve these issues?
I'm trying to compile a release version of love2d on windows. I got all the dependencies downloaded / compiled. However, I have one last problem that I cannot fix:
The object or library file
'lib\libmodplug.lib' was created with
an older compiler than other objects;
rebuild old objects and libraries
I had similar issues with other dependencies, however I was able to compile those dependencies. The libmodplug source does not provide a Visual Studio solution or project file, and I couldn't find any hints on how to compile this under windows.
By the way, I'm using Visual Studio C++ Express 2010.
Thanks in advance!
I am using visual studio 2008 SP1.
And I am creating a desktop application using MFC.
I have a library I want to link with my application. However, the library was written in WIN32 visual studio 2005.
I am been having a trouble linking:
fatal error LNK1104: cannot open file 'AgentLib.lib'
I am wondering if it is because I am using MFC 2008 and the library was written and compiled with 2005?
Many thanks for any advice,
Make sure you have added the path where your lib files are under project settings in Linker>General>Additional Library Directories
There should be no problem to do that.
You can either
Add the directory where AgentLib.lib is to the library directories of your project.
Add AgentLib.lib to your project (you may get a message box from Visual Studio asking for a rule, but there is no need for one, and it works)
Yes it is possible. f you have issues please Check this links for some help. Also check for any dependent file which is being used by the lib created using VS 2005.