简体   繁体   中英

CodeLite doesn't run C++ program in certain workspaces

I am using CodeLite as an IDE for C++ in order to do some of the exercises for a book I am trying to read. As of now, I have generated a workspace, and have multiple projects (each one corresponding to one exercise). CodeLite was working ok until, for one of the projects, I began copying over some helper functions (these were within a header and C++ file). Once I did this however, my programs in the whole workspace no longer run. Everything will still compile and build, and the Run button isn't grayed out. I click the run button (or do ctrl+F5) and nothing happens.

I have tried to restart my computer, and CodeLite, as well as close and reopen the specific workspace, but the issue persists. I should note that this issue does not appear in other workspaces, and only started once I began adding in the helper functions in the form of the header and cpp files.

I also wanted to add that I was unable to directly add the helper functions, and had to copy paste the contents individually into my own files. I suppose this is because the "Add Existing File" feature only lets you view those files in a separate directory, though I'm not too sure.

In any case, here is a picture of my workspace, though I'm not really sure if that will be of much help:

Also, here is how I am including these helper functions in my code:

#include <iostream>
#include <iomanip>
#include <math.h>

#include "SAT_Const.h"
#include "SAT_Kepler.h"
#include "SAT_RefSys.h"
#include "SAT_Time.h"
#include "SAT_VecMat.h"

I can't really find any workspace settings which would incur such behavior, but please let me know if you'd like for me to include more information.

Thanks!

I mean first look (using your OS file browser) if the executable exists.

Thanks for this comment, I think this may be the root of the issue. CodeLite does make a folder where it would place the executable (folder is called Debug for me), but it does not make an executable. I think this is entirely my fault, as I named my projects with dots in them, which causes issues when creating the executable file name (ie it will make an executable for Ex_2.4 as simply Ex_2.4 where the ".4" counts as the file extension instead of putting a.exe in there).

Even when I change the names of the projects through CodeLite, the changes do not translate to the files. So I simply made a new workspace and copy-pasted all of the information and it works wonders!

Thank you for your help!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM