clion

How to run SFML in CLion, Error undefined reference to?

不问归期 提交于 2020-07-17 10:47:31
问题 I'm new to C++ and try to learn game programming, I choose SFML and run on CLion by Jetbrain and using Ubuntu machine. I following this tutorial SFML and Linux here my code : #include <SFML/Graphics.hpp> using namespace sf; int main() { RenderWindow window(sf::VideoMode(200, 200), "SFML Work!"); CircleShape shape(100.f); shape.setFillColor(Color::Green); while (window.isOpen()) { Event event; while (window.pollEvent(event)) { if (event.type == Event::Closed) { window.close(); } } window.clear

How to run SFML in CLion, Error undefined reference to?

我们两清 提交于 2020-07-17 10:47:14
问题 I'm new to C++ and try to learn game programming, I choose SFML and run on CLion by Jetbrain and using Ubuntu machine. I following this tutorial SFML and Linux here my code : #include <SFML/Graphics.hpp> using namespace sf; int main() { RenderWindow window(sf::VideoMode(200, 200), "SFML Work!"); CircleShape shape(100.f); shape.setFillColor(Color::Green); while (window.isOpen()) { Event event; while (window.pollEvent(event)) { if (event.type == Event::Closed) { window.close(); } } window.clear

How to configure Clion to compile gtkmm project

╄→гoц情女王★ 提交于 2020-07-03 04:32:50
问题 I have copied a sample project from GTK #include <gtkmm.h> int main(int argc, char *argv[]) { auto app = Gtk::Application::create(argc, argv, "org.gtkmm.examples.base"); Gtk::Window window; window.set_default_size(200, 200); return app->run(window); } And when compiling directly from terminal it works just fine: g++ main.cpp -o simple `pkg-config gtkmm-3.0 --cflags --libs` But when I try compilation using Clion it says fatal error: gtkmm.h: No such file or directory #include <gtkmm.h> My

C compiler broken: is not able to compile a simple test program

孤街醉人 提交于 2020-06-28 04:25:14
问题 On my Dektop and on my Surface Pro 6 CLion has stopped working and I don´t know exactly why. That is written on my Desktop: "C:\Program Files\JetBrains\CLion 2018.3.2\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" C:\Users\Alexander\Desktop\Clion\übung -- The C compiler identification is GNU 6.3.0 -- Check for working C compiler: C:/MinGW/bin/gcc.exe -- Check for working C compiler: C:/MinGW/bin/gcc.exe -- broken CMake Error at C:/Program Files

How to get CLion to show exceptions?

[亡魂溺海] 提交于 2020-06-17 02:06:26
问题 I have CLion installed with presumably default configuration. I think something is wrong with it, because I can't see exceptions. For example, this code: int main(){ throw 5; } Prints only Process finished with exit code 0 Why doesn't it print the exception? Why does it print 0 instead of 1? For comparison: int main(){try { throw 5; } catch(int x) { std::cout << x << '\n'; }} This prints 5, so it looks like code is correctly run and the exception is correctly thrown. It's just hidden by CLion

cLion + Qt5 - exit code -1073741515 (0xC0000135)

对着背影说爱祢 提交于 2020-06-13 11:12:12
问题 I'm trying to run simple test using QT5 and cLion but I run in to the exit code wall... Here is my envi : cLion 2017.2 minGw 5.0 < according to cLion cMake 3.8.2 Qt 5.9.0 CMakeList.txt cmake_minimum_required(VERSION 3.8) project(testWindotQt) set(CMAKE_CXX_STANDARD 17) set(CMAKE_AUTOMOC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOUIC ON) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(SOURCE_FILES main.cpp ) add_executable(testWindotQt ${SOURCE_FILES}) if (WIN32) # If you

Used .ignore('\n') and the Getline function that follows is only taking half of the input from file

冷暖自知 提交于 2020-06-09 05:24:06
问题 I tried to make sure what I'm asking wasn't a duplicate since this must be a very beginner mistake but I couldn't find something similar but if someone has a reference to a similar post that'd be great as well anyways So I'm trying to make a battleship game that reads in the ship placement from a .csv file but before it places the ships it goes through the file and makes sure all the ships are found in the file. The data in the file is formatted as follows: Carrier,B2,H Battleship,D4,V

Wrong compiler used in the target offload process in CLion during CUDA compilation

痴心易碎 提交于 2020-06-09 04:21:47
问题 I'm trying to configure a very simple CUDA project in CLion 2020.1. I'm on Fedora 31 (default gcc is 9.3), but compiled gcc 8.2 from source to use it with Cuda Toolkit 10.2. The Cuda samples compile and run fine using the provided make, so the compiler is working and playing nicely with nvcc. In CLion, I have googletest downloaded with Conan. The Conan profile specifies 8.2 as the gcc version to be used. All references to GCC in CMakeOutput.log are to the correct bin file. And yet, I keep

Wrong compiler used in the target offload process in CLion during CUDA compilation

霸气de小男生 提交于 2020-06-01 07:37:45
问题 I'm trying to configure a very simple CUDA project in CLion 2020.1. I'm on Fedora 31 (default gcc is 9.3), but compiled gcc 8.2 from source to use it with Cuda Toolkit 10.2. The Cuda samples compile and run fine using the provided make, so the compiler is working and playing nicely with nvcc. In CLion, I have googletest downloaded with Conan. The Conan profile specifies 8.2 as the gcc version to be used. All references to GCC in CMakeOutput.log are to the correct bin file. And yet, I keep

Undefined reference errors in simple boost serialization

不打扰是莪最后的温柔 提交于 2020-05-28 04:20:30
问题 I have a minimal example of Boost serialization where I try to save an integer in a binary archive file Here is main.cpp: #include <iostream> #include <fstream> #include <boost/archive/binary_oarchive.hpp> int main() { int t = 0; std::ofstream file("Test.bin"); boost::archive::binary_oarchive archive(file); archive << t; file.close(); return 0; } and here is the CMake file: cmake_minimum_required(VERSION 3.15) project(Test) set(CMAKE_CXX_STANDARD 17) find_package(Boost REQUIRED serialization)