Menu

compiling example files

Debugging
sydney
2013-02-23
2023-09-15
  • sydney

    sydney - 2013-02-23

    I have a book on algorithms with a lot of source code: c and h files. So I created a new project within the example code directory and added in the book code for the .c and .h files, and then removed the default main.c, since it was not needed: the other code already contained a main(). I then compiled and tried to run project code. No good! I looked in the project folder and found a .o file, so some of the compilation process is working, but there is no .exe file to be found! I looked at some of the included examples, ie Pascal, and found that this example works OK. Then I looked at and compared the make file for both projects. The syntax in both of these makefiles is the same except for the paths to the .o and .exe files! I thought that I new quite a bit about now to use compilers and linkers, but this problem is making me doubt myself! Any ideas are appreciated.

     
  • MikeDNC

    MikeDNC - 2013-09-20

    Maybe you could post the Compile Log (in bottom toolbar) here.

     

    Last edit: MikeDNC 2013-09-20
  • sydney

    sydney - 2021-02-27

    I did 2 things which solved most of the problems. I replaced the DevC++ IDE with the Embarcadaro version. It seems to be better. And then, instead of trying to use the old code, including the project files, make file, etc, I started from scratch just adding the .c and.h files into a new project. Now it compiles and runs!! I suspect that the real cause of my problems was due to simply copying the old, complete directory of files, including the project and makefiles. and using them in the new setup! Making a completely new project, with the .c and .h code, in the new IDE worked. Why the old project won't work in the new installation befuddles me. Especially since the installer that I used was the same one as I used on the previous installation of the older computer.
    syd

     

Log in to post a comment.