c - Current directory in CLion -


i use clion 2016.1. example, run such code in directory ~/clionprojects/tutorial:

#include <stdio.h> int main() {     char * string;     string = "hello, everyone";     printf(string); } 

why clion go code directory?:

/home/ken/.clion2016.1/system/cmake/generated/tutorial-9a39f70/9a39f70/debug/tutorial hello, process finished exit code 15 

how make programs running in "normal" directory ~/clionprojects/tutorial?

upd

i want read "data.csv" file locates in current directory (where main.c is). clion looks in /home/ken/.clion2016.1/system/cmake/generated/tutorial-9a39f70/9a39f70/debug/tutorial. how make clion looks data.csv in ~/clionprojects/tutorial?

if want appear binaries in folder you've specified, need tell clion adjusting cmakelists.txt this:

set(cmake_runtime_output_directory ${project_source_dir}/bin) set(cmake_archive_output_directory ${project_source_dir}/lib) set(cmake_library_output_directory ${project_source_dir}/lib) 

edit:

somehow seems these options not respected in current version of clion (2016.2). therefore 1 might has change desired output directory via: build, execution, deployment | cmake settings , set there.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -