0

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!

Pfrances
  • 107
  • 1
  • 11
  • I think you will have to spend some time and debug the situation. I mean first look (using your OS file browser) if the executable exists. If it does not perhaps there were compiler errors... – drescherjm Jun 10 '20 at 20:34
  • How does the main.cpp find the header files if they are in another project / directory? – darclander Jun 10 '20 at 20:36
  • It would not unless you added an additional Include directory to the other project. In that case you should have compiler errors about the missing include files provided you did not setup the include path after moving the headers. – drescherjm Jun 10 '20 at 20:39
  • On which operating system? With which compiler (maybe [GCC](http://gcc.gnu.org/), but then which version?) and what compilation flags. Try compiling on the command line e.g. using `g++ -Wall -Wextra -g` – Basile Starynkevitch Jun 10 '20 at 20:50

1 Answers1

0

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!

Pfrances
  • 107
  • 1
  • 11