linker-errors

Visual Studio error: LNK1104: cannot open file 'kernel32.lib' - only in WP8 projects / Win32 builds

限于喜欢 提交于 2019-11-29 07:27:47
I ran into this problem recently (few days ago everything was working fine): Visual Studio 2012 started to refuse to build native WP8 projects. Today, I created new solution from template 'Windows Phone Direct3D App (Native Only)' to check if my newly created DLLs will be properly supported on WP. I tried to compile this project, first without any changes or additional references - pure code generated by VS. However, it failed with given error. I know very well what does it mean and what could be the possible reason, but I can't understand, hovewer, where does it come from in this case. Weird

How to dllimport in Microsoft Visual C++

五迷三道 提交于 2019-11-29 07:20:15
I have a DLL and I would like to use some of its functions. #include <iostream> using namespace std; extern "C" __declspec(dllimport) int Initialize(char* localPort, char* adminServerName, int rpcTimeout); int main() { int res = Initialize("7864", "6000@kabc", 10000); return 0; } I don't have the DLL's .lib file, so is there anyway I can link to it. One thing that comes to my mind is to use the LoadLibrary function and then use the GetProcAddress(). Is there any other way? When I compile the following code error LNK2019: unresolved external symbol _ imp _Initialize referenced in function _main

Visual Studio 2013 (vs120) asks for wrong boost libraries

非 Y 不嫁゛ 提交于 2019-11-29 05:49:12
I'm trying to compile one of my projects on Windows 7, using Visual Studio 2013. I've installed Boost 1.53 and setup the solution using cmake. What happens is that now the compiled libraries of boost are in the form libboost_*-vc120-mt(-gd)-1_53.lib . In the linker project options, under the input tab, I have verified that the libraries that I need are there, and in fact the compiler is able to correctly read them. However, for some reason that I absolutely can't understand, the linker is also trying to find libraries compiled as vc110 . For example: error LNK1104: cannot open file 'libboost

Penalty of the MSVS compiler flag /bigobj

点点圈 提交于 2019-11-29 04:34:56
问题 The basic Google search bigobj issue shows that a lot of people are experiencing the Fatal Error C1128: " number of sections exceeded object file format limit : compile with /bigobj ". The error has more chance to occur if one heavily uses a library of C++ templates, like Boost libraries or CGAL libraries. That error is strange, because it gives the solution to itself: set the compiler flag /bigobj! So here is my question: why is not that flag set by default? There must be a penalty of using

Xcode 5 - -bundle_loader can only be used with -bundle XCTest

末鹿安然 提交于 2019-11-29 04:07:54
I am working on unit tests with XCTest and Xcode 5. Everything was working just fine, but then a colleague made a push, and it seems to have broken it. I have done the following: BUNDLE_LOADER = $(BUILT_PRODUCTS_DIR)/app name.app/app TEST_HOST = $(BUNDLE_LOADER) and I have played around with the build paths endlessly. Here is the error I am getting, which is tied to a Linker-O error. -bundle_loader can only be used with -bundle Anyone know how to fix this? The Mach-O Linker flag in the test target was set to "executable" instead of "bundle". 来源: https://stackoverflow.com/questions/19321771

MPI - error loading shared libraries

余生长醉 提交于 2019-11-29 03:22:47
问题 The problem I faced has been solved here: Loading shared library in open-mpi/ mpi-run I know not how, setting LD_LIBRARY_PATH or specifying -x LD_LIBRARY_PATH fixes the problem, when my installation itself specifies the necessary -L arguments. My installation is in ~/mpi/ I have also included my compile-link configs. $ mpic++ -showme:version mpic++: Open MPI 1.6.3 (Language: C++) $ mpic++ -showme g++ -I/home/vigneshwaren/mpi/include -pthread -L/home/vigneshwaren/mpi/lib -lmpi_cxx -lmpi -ldl

Undefined symbols for architecture error when deployment target is 7.0

给你一囗甜甜゛ 提交于 2019-11-29 02:28:37
问题 I am using third party frameworks in my native iOS application (bunch of .a libraries). My application is developed with XCode 5 base SDK 7.0. The libraries compile and link fine when the deployment target is 6.1 (library and header search paths are good). However, when I change the deployment target to be 7.0, I get the following linker error: Undefined symbols for architecture i386: "std::string::find_last_of(char const*, unsigned long) const", referenced from: GetExecutionDir

Unable to compile Rust hello world on Windows: linker link.exe not found

别说谁变了你拦得住时间么 提交于 2019-11-29 02:16:23
问题 I have installed Rust on windows from Rust installation page. After installation I tried running the "hello world" program but got the following error. >cargo run Error Compiling helloworld v0.1.0 (C:\Users\DELL\helloworld) error: linker `link.exe` not found note: The system cannot find the file specified. (os error 2) note: the msvc targets depend on the msvc linker but `link.exe` was not found note: please ensure that VS 2013, VS 2015 or VS 2017 was installed with the Visual C++ option

Linking Boost Library in Linux

人走茶凉 提交于 2019-11-28 23:48:08
问题 I am trying to build a project using Boost's Asio and I am having some trouble. Initially, I tried to build the project without any additional libraries since everything is supposedly in the header files. The program I am trying to build looks like this: #include <iostream> #include <boost/asio.hpp> #include <boost/date_time/posix_time/posix_time.hpp> int main() { boost::asio::io_service io; boost::asio::deadline_timer t(io, boost::posix_time::seconds(5)); t.wait(); std::cout << "Hello, world

visual studio 2010 express + win sdk = cannot open input file 'kernel32.lib'

三世轮回 提交于 2019-11-28 22:35:01
问题 I used to compile for x64 using VS2008 express and win SDK. Recently rebuilt my machine (upgraded to 64bit Windows 7) and got latest express installed. Followed the same procedure to allow x64 targets and my sources don't link any more. no matter what I do I always get: LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' funny enough 32bit compilation works fine. Is this some well know problem? Google didn't give me any clues how to tackle it just a couple of mentions of the