clion

OCCI C++ app undefined reference

别等时光非礼了梦想. 提交于 2019-12-25 06:45:13
问题 I started here but so much has changed I thought it best to start a new question, especially since I think the CMake issue in the that question is solved. Background I'm trying setup a basic shell of a project that involves connecting a C++ midtier to an Oracle 12c database. Environment 1. MinGW-64 (x86_64-4.9.1-release-win32-sjlj-rt_v3-rev2) 2. Windows 7 64-bit 3. CLion 2016.1.1 (so I'm using CMake 3.5.1) 4. All of the OCCI DLLs are in system32. 5. Both the libs and the dlls are in C:/Users

Trouble compiling GLFW, undefined symbols

拟墨画扇 提交于 2019-12-25 05:05:34
问题 I'm currently reading this tutorial on OpenGL. I'm getting compile errors as follows: Undefined symbols for architecture x86_64: "_glfwInit", referenced from: _main in main.cpp.o "_glfwTerminate", referenced from: _main in main.cpp.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[3]: *** [OpenGL] Error 1 make[2]: *** [CMakeFiles/OpenGL.dir/all] Error 2 make[1]: *** [CMakeFiles/OpenGL.dir/rule] Error 2 make:

Compiling OpenCV on Windows with MinGW

不打扰是莪最后的温柔 提交于 2019-12-25 04:33:34
问题 I am trying to build OpenCV from source using CLion with MinGW on Windows 10. Unfortunately the provided builds for OpenCV do not include a MinGW build any more. When compiling, I get an error that strsafe.h is missing, although I have Windows SDK and Visual Studio 2015 C++ tools installed. Has anyone tried building OpenCV on the same setup? Tanks! 回答1: Yes, I have recently succesfully built OpenCV 3.0 on Windows 10 and 7 using MinGW-w64 for use with CLion. Suggestions, based on my experience

Equivalent of CMAKE_PREFIX_PATH in CLion

别来无恙 提交于 2019-12-24 19:30:33
问题 I'm building a Qt project with CMake and on the command line I have to give -DCMAKE_PREFIX_PATH=<path-to-qt> for CMake to be able to find Qt. Now I opened this project in CLion and as expected it didn't find Qt. What is the CLion equivalent of -DCMAKE_PREFIX_PATH=... on the command line? 回答1: First, open the CMake panel (press the CMake button on the toolbar at the bottom of the main window). The goto CMake settings like shown below: In the settings dialog you can now configure CMake as

Kg to pounds converter build error (CLion)

隐身守侯 提交于 2019-12-24 17:13:35
问题 I've just started to learn the C++ programming language by reading the book "C++ Primer Plus 5th addition" but I'm coming across a problem. The book just started to go into detail with functions, function prototypes, function headers and such.I decided to try and make a KG --> Pounds converter as practice, but my problem is that when I try to build it (Im using CLion) I get a build error. The code: #include <cmath> // [EDIT] Removed this line as it isnt being used #include <iostream> using

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

CLion prints the input back

浪子不回头ぞ 提交于 2019-12-24 11:42:44
问题 Everyone. I've been using CLion for some time and I do like it, except one thing. Maybe somebody had the same problem. The thing is that when I print something in console, the IDE prints it back. For example, if I run that code #include <iostream> #include <string> int main() { std::string message; std::getline(std::cin, message); std::cout << "You've printed: " << message; return 0; } the IDE will act like this: Printing back I think that problem lies in CMake, but as a newy I have no idea

“Can't resolve constructor” when using type alias inside class

a 夏天 提交于 2019-12-24 09:57:20
问题 I'm fairly new to C++, so please forgive me if I'm being naive here. I have a snippet that demonstrates my issue: template<typename _T, typename _Key, typename _Val> class Foo { typedef std::pair<_Key, _Val> _P1; using _P2 = std::pair<_Key, _Val>; _T *t = new _T(); _P1 *p1 = new _P1(); _P2 *p2 = new _P2(); // (IDE) error: can't resolve constructor '_P2' } My understanding is that using is equivalent to typedef . Why do the first two declarations work but the third one is flagged by my IDE?

CLion CMakeLists.txt add argv arguments to configuration

别来无恙 提交于 2019-12-24 04:43:06
问题 I have configuration in CMAkeLists.txt set(SOURCE_FILES client/client.cpp) add_executable(Client ${SOURCE_FILES} client/client.cpp) So I can launch client.cpp in CLion (Shift + F10). But if I need to launch client.cpp with argv parameter (it has one integer as parameter) I must change configuration in CLion adding program arguments. Maybe I can add some parameters using CMakeLists.txt? 回答1: CMakeList is only responsible for configuring your program, it does so by generating a Makefile, which

How to stop CMake appending C compiler flags

◇◆丶佛笑我妖孽 提交于 2019-12-24 02:56:16
问题 I converted an old style makefile to a CMake CMakeLists.txt file so that I can load a project into JetBrain's new CLion IDE. I thought it would be easy, but I'm stuck at the point of CMake appending some custom compiler flags to the compilation command which cause a compilation error. I don't have enough knowledge of CMake to solve this issue. Here is the original makefile. # makefile # Main Filename to be compiled MAINFILE = TestProgram # Paths DRIVE := C: COMPILERROOT := $(DRIVE)/GNUHC11