linker

Undefined reference to 'glewExperimental', 'glewInit@0', '__glewGenBuffers'

杀马特。学长 韩版系。学妹 提交于 2019-12-25 06:38:26
问题 I'm sorry if this is a duplicate question but I've looked through StackOverflow and Google and haven't come up with an answer yet. I'm using Code::Blocks and SDL and trying to get GLEW working with openGL. The program code is: #include <Windows.h> #include <SDL.h> #define GLEW_STATIC #include <glew.h> int main(int argc, char *argv[]) { //initialize SDL SDL_Init(SDL_INIT_VIDEO); SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); SDL_GL_SetAttribute(SDL_GL_CONTEXT

“_ompi_mpi_int” in Funktion “_main” LNK2019

十年热恋 提交于 2019-12-25 06:27:46
问题 I was trying to compile mpi_prime.c with openmpi on windows. I tried it with the 32bit and 64bit version of OpenMPI_v1.6.2. I got these outputs. Microsoft (R) C/C++-Optimierungscompiler Version 17.00.61030 für x86 Copyright (C) Microsoft Corporation. Alle Rechte vorbehalten. mpi_prime.c Microsoft (R) Incremental Linker Version 11.00.61030.0 Copyright (C) Microsoft Corporation. All rights reserved. /out:mpi_prime.exe /LIBPATH:C:\Entwicklung\OpenMPI_v1.6.2-x64/lib libmpi_cxx.lib libmpi.lib

Conflicting run time libraries in Visual C++ DLL project

故事扮演 提交于 2019-12-25 05:06:23
问题 I Just tried to build a x64 C++ DLL using Visual C++ 2012. It's a simple DLL linking one other static third-party .lib file. I am getting the following warning message: warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library It seems that other library uses /MT (multithreaded static runtime) linker option while my DLL (and all the other projects importing my DLL) uses /MD (multithreaded DLL runtime). I can not harmonize this since the third-party lib

Loading symbol file while linking

a 夏天 提交于 2019-12-25 04:09:44
问题 I am trying to load a symbol file at the time of linking. I am providing the symbol.txt file along with other libraries that I link. These are the two things I tried. 1st, I provided the symbol file exactly as what was the output of arm-none-eabi-nm, but this returned with a syntax error on line 1 itself. 2nd, I changed the format a bit. I added #< SYMDEFS ># at the beginning of the file and made the changes to follow ARM's symdef file format. This gave me the error file not recognized: File

How to Disable Auto-link for TBB

萝らか妹 提交于 2019-12-25 04:08:44
问题 When I build my VS project as Debug, it always auto-linked with tbb_debug.lib (which in turn linked with tbb_debug.dll). Is there a way to override this and make tbb.lib linked even for a Debug build? 回答1: First, are you sure it is 'auto-linked'? If so, this is done using #pragma comment( lib, tbb_debug.lib ) . Find where this code is, modify it if it's yours, or else disbale it somehow (either by do not including the file where that code is, or by #defining something that disables this piece

Removing OPENSSL_cleanse from OpenSSL-1.0.1r

萝らか妹 提交于 2019-12-25 04:00:28
问题 I found out that OPENSSL_cleanse wastes a lot of time in my project. For example, if it runs for 25 seconds, 3 seconds are wasted by OPENSSL_cleanse . I checked the code of this function and decided that it isn't doing anything very useful for me. I know it fills memory with garbage data for security reasons but I don't really care about it. So I decided to place return; just before the start of any operations in this function. void OPENSSL_cleanse(void *ptr, size_t len) { return; // original

unresolved external symbol in eclipse cdt

流过昼夜 提交于 2019-12-25 03:24:32
问题 I try to build cpp file using eclipse cdt. Linker throws "unresolved external symbol", however path to lib file that contains implementation for function is listed in LIB environment variable on Project properties->C/C++ Build->Environment What am I doing wrong? UPD I try to build file. There is lib RpcRT4.Lib on the path C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib\ And linker fails: **** Build of configuration Debug for project test cpp **** **** Internal Builder is used for build ****

Undefined symbol std::__throw_bad_function_call

那年仲夏 提交于 2019-12-25 03:22:26
问题 I'm building C++ code in Eclipse CDT with g++ and I'm getting the following linker error: Undefined symbols for architecture x86_64: "std::__throw_bad_function_call()", referenced from: std::function<void (graphics::RenderingContext*)>::operator()(graphics::RenderingContext*) const in GameWindow.o I have std::function members in a class called GameWindow. Is there something I have to link to in order to get code using std::function to link properly? 回答1: Turns out my lib path wasn't set

C++: having trouble linking from command line

元气小坏坏 提交于 2019-12-25 03:16:25
问题 Just getting started with C++ here. I am working on OSX with Eclipse CDT. I have a project with some custom classes and two files "Test.hpp" and "Test.cpp" - the later with my main() method that runs some tests that I have defined and implemented in these two files. I can compile and run from Eclipse with no problems, but when I try to compile from the command line with "g++ Test.cpp" I get a lot of linking errors that basically list all the methods defined in or referenced from Test.cpp as

C++: having trouble linking from command line

假装没事ソ 提交于 2019-12-25 03:16:08
问题 Just getting started with C++ here. I am working on OSX with Eclipse CDT. I have a project with some custom classes and two files "Test.hpp" and "Test.cpp" - the later with my main() method that runs some tests that I have defined and implemented in these two files. I can compile and run from Eclipse with no problems, but when I try to compile from the command line with "g++ Test.cpp" I get a lot of linking errors that basically list all the methods defined in or referenced from Test.cpp as