linker-errors

error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' [duplicate]

心不动则不痛 提交于 2019-12-11 04:30:37
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: linking problem: fatal error LNK1112: module machine type ‘x64’ conflicts with target machine type ‘X86’ I try to compile a project, let say Project_A, for x64 and receive an LNK1112 error like this .\x64\Debug\Project_B.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' Project_A depends on Project_B and uses its interfaces etc. My question is what of both projects is

Xcode Build Error after updating to Swift 4.2 - Undefined symbols for architecture arm64

半城伤御伤魂 提交于 2019-12-11 04:27:24
问题 I am trying to build an Xcode iOS project I haven't touched since last June. I know there have been some updates with packages and something with Swift 4.2 but I got a multitude of errors. Firstly I got a library not loaded error similar to this but for RestKit. I added it to my pods file and included it into Link Binary with Libraries . Then I got this error message. Ld /Users/arkwl/Library/Developer/Xcode/DerivedData/BuddyV2-gubyodomquayvxabpgpfpalrnftx/Build/Products/Debug-iphoneos/BuddyV2

Linking issues using OpenSSL in Ubuntu

断了今生、忘了曾经 提交于 2019-12-11 04:17:10
问题 I have installed OpenSSL using sudo apt-get install openssl-dev . When I try to compile it using Netbeans it gives following errors. How can I fix this problem? g++ -lssl -o dist/Debug/GNU-Linux-x86/cppapplication_2 build/Debug/GNU-Linux-x86/main.o -L/home/sercan/Desktop/openssl-0.9.8h-1-lib/lib build/Debug/GNU-Linux-x86/main.o: In function `main': /home/sercan/NetBeansProjects/CppApplication_2/main.cpp:46: undefined reference to `OPENSSL_add_all_algorithms_noconf' /home/sercan

Undefined reference to static member of class template referenced from static instance

安稳与你 提交于 2019-12-11 04:15:24
问题 Please take a look at the following: #include <string> #include <unordered_map> template <int N> class Object; template <int N> class Thing; template <int N> class Factory { private: using FuncPtr = Object<N>*(*)(Thing<N>*); static std::unordered_map<std::string, FuncPtr> map; public: static void insertInMap (const std::string& tag, FuncPtr funcPtr) { map.emplace (tag, funcPtr); } }; template <int N> std::unordered_map<std::string, typename Factory<N>::FuncPtr> Factory<N>::map; // won't

g++ can't find ncurses.h despite it being installed

房东的猫 提交于 2019-12-11 04:14:51
问题 I'm trying to experiment around in ncurses for the first time, but I'm having problems compiling my source code. As far as I can tell, ncurses is installed and in the proper directories. My makefile is super simple: .cpp : g++ -Wall -g -o $* $*.cpp -std=c++11 -lncurses and here's my output when I try to locate ncurses.h $ locate ncurses.h /usr/include/ncursesw/ncurses.h and when I check to see if it's installed $ dpkg -l | grep ncurses ii libncurses5:amd64 5.9+20140118-1ubuntu1 amd64 shared

Linking to stdc++ with CMake and GCC 4.1.2

旧街凉风 提交于 2019-12-11 03:55:50
问题 I am developing a library and need to make sure it compiles with 4.1.2(I know, it brings me no pleasure). So on a Fedora 14 Machine I downloaded, compiled and installed GCC41. Now in CMake I only change the following to variables CMAKE_CXX_COMPILER=/opt/gcc41/bin/c++41 CMAKE_C_COMPILER=/opt/gcc41/bin/gcc41 It compiles fine, but it seems to use the wrong version of the standard library. The error(s) I get look like this: /opt/gcc41/bin/c++41 -Wall -Wold-style-cast -Wsign-compare -Wnon-virtual

LNK1104: cannot open file 'kernel32.lib'

风流意气都作罢 提交于 2019-12-11 02:28:28
问题 I Had VS2010 installed but found that intellisense wasn't working. I looked on the web and found that I wasn't the only one who had that issue. So, I installed VS2008 and everything was fine. Then I decided to clean up my computer and removed VS2010 and immediately started getting this error on my programs (new and old). Even a simple test program that has one cout command. I tried repairing VS2008 and that didn't work so I tried to uninstall and then reinstall and still I am getting the same

What lib in the gecko 1.9.3 SDK do I link against to use moz_xmalloc()?

穿精又带淫゛_ 提交于 2019-12-11 02:08:34
问题 I'm trying to link my XPCOM extension against the 1.9.3a3pre SDK and I get the following: error LNK2001: unresolved external symbol _moz_xmalloc So, what lib do I need to link to? The documentation doesn't say. This is on Windows right now, but I'll need it to build on Mac and Linux (32bit/64bit) as well. Edit: Now with bounty. Edit: Update: Turns out FF3.7 was cancelled. So I don't have to worry about this until FF4. 回答1: define ' XPCOM_GLUE ' in C++ Preprocessor Definition property. It will

Boost linker errors when using header-only libraries

感情迁移 提交于 2019-12-11 00:37:50
问题 I am using the following components of Boost 1.53.0 in conjunction with C++11 libraries... boost::signals2::scoped_connection boost::signals2::signal boost::signals2::connection boost::math::constants boost::circular_buffer boost::lexical_cast According to this answer, I do not need to link against libraries to use these parts of Boost. According to this answer, signals2 should be header-only also. However, I still receive linker errors... Undefined symbols for architecture i386: "boost:

C++/CLR managed unit test has linker errors

白昼怎懂夜的黑 提交于 2019-12-10 23:35:25
问题 When including any managed class to my managed unit test the compile spits out these errors: 1>UnitTest.obj : error LNK2020: unresolved token (0A000360) "extern "C" int __cdecl _CrtDbgReportW(int,wchar_t const *,int,wchar_t const *,wchar_t const *,...)" (?_CrtDbgReportW@@$$J0YAHHPB_WH00ZZ) 1>UnitTest.obj : error LNK2020: unresolved token (0A000361) "extern "C" int __cdecl _CrtDbgReportW(int,wchar_t const *,int,wchar_t const *,wchar_t const *,...)" (?_CrtDbgReportW@@$$J0YAHHPB_WH00ZZ) 1