g++

How can i make a dll for my c# project from a linux/mac os supported 3rd party code?

只愿长相守 提交于 2019-12-24 22:27:43
问题 I have one 3rd party c++ project which doesn't support windows and now I am looking for a way to do cross-compile that code and make a dll out of that so I can use that in my c# code. This is the 3rd party code(https://github.com/usnistgov/NFIQ2) am looking to make dll file for my windows c# project. Any suggestion or help ? 回答1: As stated in an issue on the official repository, the iso_wg3 branch supports Windows builds and the README.md includes build instructions. 来源: https://stackoverflow

How to include and use openCV library when installed locally?

不打扰是莪最后的温柔 提交于 2019-12-24 20:21:40
问题 I want to install an OpenCV version locally on OSX in a folder without overwriting the old installation that I need for an old executable. I followed [these instructions][1], particularly the Building OpenCV from Source Using CMake, Using the Command Line section. So basically I: downloaded the source code with git and now it is in the subfolder openCV Created a new directory cmake_bin_dir Entered in cmake_bin_dir and created another subdirectory instDir From the cmake_bin_dir I launched the

program g++ not found in path

。_饼干妹妹 提交于 2019-12-24 19:48:16
问题 I am using Eclipse for a C project. I created a new Project by going to New->C project->Executable->Empty Project, Linux gcc toolchain. When I add a new .c file, I get "program 'g++' not found in path". How do I get rid of this? I'm not even using C++. 回答1: I had similar problem and it is solved by Installing g++ The GNU C++ complier using ubuntu software centre and Changing in - Window -> Preferences -> C/C++ -> Build -> Settings -> Discovery -> CDT GCC Build in Complier Settings [Shared]

C++ SFML with MinGW version 8.2.0 and Atom text editor

大憨熊 提交于 2019-12-24 19:08:15
问题 I am trying to learn to make 2d games using c++ with the SFML library. I am using windows, but I would prefer to use the Atom text editor instead of Visual Studio. I did a lot of research on how to do this, but I still do not know how to use the SFML library with Atom. So, how would I go about implementing the SFML library in my c++ project written in Atom. Thank you! 回答1: This answer supposes that you've downloaded the 32-bit MinGW version of SFML, and you'd like to compile programs written

C++ Cannot call constructor ' ' directly

自闭症网瘾萝莉.ら 提交于 2019-12-24 16:41:56
问题 I'm working on some OpenCV code and developed it in VS 2008 on windows. I'm trying to run the code on Linux with g++ but I get the error "Cannot call constructor 'ImageProcessor::ImageProcessor' directly" for ImageProcessor and all of the other classes I have created. I've attempted to find a way to indirectly call the constructor, but to no avail. Any suggestion would be great. The code compiles and runs fine on Windows. if (x == 1){ cout <<"MODE SELECTED: IMAGE TESTING \n"; ImageProcessor*

Benchmarks of code generated by different g++ versions

依然范特西╮ 提交于 2019-12-24 16:14:43
问题 I work on a runtime system for an application domain that is very performance sensitive. We go to a lot of effort to maintain backward compatibility with older compiler versions, including avoiding more recently-implemented language constructs, and synthesizing them for the older versions. However, I'm concerned that this effort does a disservice to our users, by enabling them to continue to use compiler releases that are costing them huge amounts of performance. Unfortunately, I haven't been

pointer to static member function is “invalid” as a template argument for g++

倖福魔咒の 提交于 2019-12-24 16:13:44
问题 This is some of my actual code that deals with exposing C++ classes to Lua, exemplified: #include <lua5.1/lua.hpp> #include <tuple> //in actual code, lots of specializations of these C++<=>Lua's stack helper functions. Here it's just a sample. template<typename T> T to(lua_State*, int); template<> int to(lua_State* l, int i){ return lua_tointeger(l, i); } template<typename T> void push(lua_State*, T); template<> void push(lua_State* l, int val){ lua_pushinteger(l, val); } //in actual code,

Actual long double precision does not agree with std::numeric_limits

情到浓时终转凉″ 提交于 2019-12-24 16:01:37
问题 Working on Mac OS X 10.6.2, Intel, with i686-apple-darwin10-g++-4.2.1, and compiling with the -arch x86_64 flag, I just noticed that while... std::numeric_limits<long double>::max_exponent10 = 4932 ...as is expected, when a long double is actually set to a value with exponent greater than 308, it becomes inf--ie in reality it only has 64bit precision instead of 80bit. Also, sizeof() is showing long doubles to be 16 bytes, which they should be. Finally, using <limits.h> gives the same results

Link errors while using G++ for MPI code

空扰寡人 提交于 2019-12-24 15:24:48
问题 My code is as simple as this: #include <mpi.h> int main(int argc, char**args) { MPI_Init(&argc, &args); int mpiSize; int mpiRank; MPI_Comm_size(MPI_COMM_WORLD, &mpiSize); MPI_Comm_rank(MPI_COMM_WORLD, &mpiRank); MPI_Finalize(); } I first compile it to object file: g++ -c src/mpitest.cpp -o src/mpitest.o Then I can easily use mpicxx: mpicxx src/mpitest.o -o mpi But I want to use g++ instead, because It's easier for automake, so I tried: mpicxx src/mpitest.o -o mpi -show It prints out: g++ src

I compiled the latest version of GCC. How to point CLion to its location?

雨燕双飞 提交于 2019-12-24 14:59:09
问题 I have built the latest version of GCC in a directory. How do I point CLion to use it? 回答1: After doing some more research, I realized that what I need to configure is CMake. Since CLion has a bundled CMake, you can configure this inside CLion. Go to Settings -> Build, Execution, Deployment -> CMake. Under CMake options, add -D CMAKE_CXX_COMPILER=... and replace ... with the path to g++ . There are other ways to do this, which are probably better. I just did this and it worked, but if you