linker

How to use GTest with CMake ? Linkage problem when following Google's guide

假装没事ソ 提交于 2020-07-07 11:40:46
问题 I started to use boost test for my project, but I need to mock static methods, so I try to switch to GTest and GMock. I followed the really clear guide from google, and the CMakeLists seems to be doing its job : CMakeLists.txt cmake_minimum_required(VERSION 3.15) project(POC_V4) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED TRUE) # Specifying we are using pthread for UNIX systems. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS} -pthread -Wall") find_package(OpenCV

Any tool(s) for knowing the layout (segments) of running process in Windows?

妖精的绣舞 提交于 2020-07-07 07:21:12
问题 I've always been curious about How exactly the process looks in memory? What are the different segments(parts) in it? How exactly will be the program (on the disk) & process (in the memory) are related? My previous question: more info on Memory layout of an executable program (process) In my quest, I finally found a answer. I found this excellent article that cleared most of my queries: http://www.linuxforums.org/articles/understanding-elf-using-readelf-and-objdump_125.html In the above

Any tool(s) for knowing the layout (segments) of running process in Windows?

我怕爱的太早我们不能终老 提交于 2020-07-07 07:19:34
问题 I've always been curious about How exactly the process looks in memory? What are the different segments(parts) in it? How exactly will be the program (on the disk) & process (in the memory) are related? My previous question: more info on Memory layout of an executable program (process) In my quest, I finally found a answer. I found this excellent article that cleared most of my queries: http://www.linuxforums.org/articles/understanding-elf-using-readelf-and-objdump_125.html In the above

Any tool(s) for knowing the layout (segments) of running process in Windows?

耗尽温柔 提交于 2020-07-07 07:19:01
问题 I've always been curious about How exactly the process looks in memory? What are the different segments(parts) in it? How exactly will be the program (on the disk) & process (in the memory) are related? My previous question: more info on Memory layout of an executable program (process) In my quest, I finally found a answer. I found this excellent article that cleared most of my queries: http://www.linuxforums.org/articles/understanding-elf-using-readelf-and-objdump_125.html In the above

Place segments of external static library to specific locations

你说的曾经没有我的故事 提交于 2020-07-05 07:36:07
问题 My application calls some functions which are placed in an external static library. I link the external static library to my application and everything works (in this case I'm using GCC). Nevertheless, the locations (addresses) of text, .data and .bss sections of the library are chosen by the linker. I can choose/change their locations by modifying the linker script, but it's tedious as I have to specify all the functions, variables, etc. of the library. What I mean it's something like: . =

Target Boost::<library> already has an imported location + link errors

谁说我不能喝 提交于 2020-07-04 08:56:08
问题 I'm using Homebrew to install LLVM, Boost, and CMake on MacOS Mojave. After upgrading my LLVM to version 9.0.0 and Boost to 1.71.0, CMake (v3.15.3) started complaining about various libraries already having an imported location, such as: CMake Warning at /usr/local/lib/cmake/boost_system-1.71.0/libboost_system-variant-shared.cmake:59 (message): Target Boost::system already has an imported location '/usr/local/lib/libboost_system-mt.dylib', which will be overwritten with '/usr/local/lib

Access symbols defined in the linker script by application

陌路散爱 提交于 2020-07-04 06:40:09
问题 In my linker script file, I have defined two symbols define symbol _region_RAM_start__ = 0xC0000000; define symbol _region_RAM_end__ = 0xC00fffff; and then I have exported them as well as shown below export symbol _region_RAM_start__; export symbol _region_RAM_end__; From the applciation code, I try to access these symbols extern const unsigned int _region_RAM_start__; extern const unsigned int _region_RAM_end__; .... int GetRAMSize() { int size = 0; unsigned int address_1 = _region_RAM_start

Access symbols defined in the linker script by application

元气小坏坏 提交于 2020-07-04 06:39:21
问题 In my linker script file, I have defined two symbols define symbol _region_RAM_start__ = 0xC0000000; define symbol _region_RAM_end__ = 0xC00fffff; and then I have exported them as well as shown below export symbol _region_RAM_start__; export symbol _region_RAM_end__; From the applciation code, I try to access these symbols extern const unsigned int _region_RAM_start__; extern const unsigned int _region_RAM_end__; .... int GetRAMSize() { int size = 0; unsigned int address_1 = _region_RAM_start

C++ SDL2 - Incomprehensible link error

谁说胖子不能爱 提交于 2020-06-29 08:00:26
问题 I setup SDL2 under C++ CDT Eclipse. I added the include path "........SDL2-2.0.3\i686-w64-mingw32\include", the library path "........SDL2-2.0.3\i686-w64-mingw32\lib" and added the libraries 1."mingw32" 2."SDL2main" 3."SDL2". So now, if I add a main.cpp with this content: #include <SDL.h> int main(int argc, char* args[]) { return 0; } I can build the project fine, but if I use this: #include <SDL.h> int main() { return 0; } The project can't build and I get this error: Info: Internal Builder

linking sfml with cmake (Windows MinGW)

允我心安 提交于 2020-06-27 17:49:27
问题 I can't seem to link SFML to my executable using cmake . CMakeLists.txt: cmake_minimum_required(VERSION 3.0.0) project(Tut3) set(LIBS_DIR ~/../../Libraries) add_executable(Tut3 main.cpp) set(CMAKE_MODULE_PATH ${LIBS_DIR}/sfml/cmake/Modules) find_package(SFML REQUIRED system window graphics) target_link_libraries(Tut3 ${SFML_LIBRARIES}) Error I get when running cmake: CMake Error at C:/Libraries/sfml/cmake/Modules/FindSFML.cmake:355 (message): Could NOT find SFML (missing: SFML_SYSTEM_LIBRARY