Eclipse nothing to build message in C project - c

I downloaded Eclipse Mars although I have been doing most of my work on Android Studio. The reason is I need another tool, which is not compatible with Android Studio. The procedures I followed instructed to create an executable C project. I then added hello world to it, but I can an error stating there is nothing to build. What am I doing wrong? All of this is setup on Ubuntu Virtual Machine. I have reviewed the posts online, but the error seems to be specific to each case. Here is a screen capture...

Compiler is simply telling you that your code was already compiled and there are no changes in your code, then it does not compile.
Is a builtin feature of compilers, if there are no changes in source code file, compilers do not waste time.
Clean Project before to Build Project or modify Hello.c and Build your project.

Related

Clion: Error running 'makefile': Cannot build 'makefile'

I have not seen any thread talk about this specific error so here is the problem:
I have set up a C project in Clion and I configured in Setting -> Build,Execution,Deployment -> Toolchains a file usr/bin/make as the Make.
I could run my code yesterday but today, i get the warning in a red window popping-up: Error running 'makefile': Cannot build 'makefile' when I try to run my code.
What could possibly cause this?
It seems like you’re trying to run the makefile instead of the program that is built by it.
Have you tried doing a build first? Or maybe you should try to clean the project too.
Have a look a the blog post of JetBrains https://blog.jetbrains.com/clion/2020/06/makefile-projects-in-clion/. There’s a gif that shows how to clean the project. Hope this helps, if not maybe post your makefile so we can check if it has any errors.

Run Errors with Eclipse C/C++ IDE

I just installed gcc and Eclipse C/C++ IDE but I'm having trouble using it.
I keep getting these errors. Anyone got ideas on how to fix this?
Your project seems to be one for making a windows application.
The code in your project does not match that, it is the simple code for a console application.
Create a new project, choose "Console Application" and use the same code.
Then you should be able to successfully build your program before you execute it (credits to Some programmer dude, for spotting the "build failed is not run time error").

build legacy C code in eclipse

I inherited a project written in C, running on Linux, with Cmake files written by the previous person. The previous person did not use IDE for this project, so I found it a bit hard to maintain this fairly large sized project, and I'm new to Cmake unfortunately :(.
I want to use eclipse (my OS is Linux) for this project to help me understand the project faster, and be able to build and debug it in Eclipse, so I do not have to run the build scripts manually every time. The project was in Mercurial, hence I check it out into my repository using Eclipse, then I have some options:
Open the project, and somehow make it into a C project which I can compile
Convert the code into makefile project, use Cross GCC toolchian, try to add all the pathes to 'include', then try to build (I'm on this path, but it seems Eclipse Juno needs me to find the path to include files myself, which is a lot to add manually T_T)
Create a new makefile project, import the code gradually as I go, I'm not super familiar with the code yet...
Some other ways...
Any suggestions please?
Also, in my case, which of the 3 options mentioned in http://www.vtk.org/Wiki/CMake:Eclipse_UNIX_Tutorial would be a good choice?

cmake vs gmake for qtcreator project

I am attempting to use QtCreator as an IDE for a straight C project. The reason is that I am comfortable with QtCreator and I want a visual IDE for stepping through this new project I am working on. My development box and my deployment box are different, but both of those have gmake on them. QtCreator requires cmake, which I dont mind putting on my development box, but my deployment box is not going to have cmake.
Am I OK to build my software on the Qt box, and be sure it will deploy on the deployment box?
Edit: to be clear, the existing code base already has a makefile structure going, and I'd rather not interrupt that. If I can set my project up to use those existing targets and such it would be great.
If your project is using CMake as build system, then you should have it installed on the machine you are building. You can't pregenerate Makefile's and then just run make on the other box.
Well, you actually can, but then you will probably need same compiler versions, libs/headers located in same paths and etc. So generally it's not good idea.
As for deploying already compiled binaries - it have no relation to CMake. The general rule there is that you should have same shared libraries on both machines. Linking your project statically allows deploying single fat executable/library, without any additional dependencies.

Compiling C code as static library for use in iPhone app?

Pardon me if this is a "noob" question, I'm overextending myself a bit with this.
I'm trying to compile a library written in C for use in an iPhone app I'm developing. I can't seem to figure out how to do this, and I've been searching and trying things for hours.
I've tried using an External Build System project, and selecting the folder where the makefile.in.am.mingw are.
I've tried creating a Static Library project and adding the header\source files to the project. Which looked good until I tried to compile and got 260k+ errors.
When I 'cd' to the directory with the makefiles and type 'make' I get:
No targets specified and no makefile found. Stop.
I have no idea how makefiles work, I just want to use the library!
Is there a simple way to do this? If someone could at least point me in the right direction, I would be quite appreciative.
The makefiles you have are for GNU automake (under MINGW by the look of it). Even if you get them working (automake can be tricky, but it is included in Mac OS X's development thankfully), it probably won't help you much in building an iPhone library.
I did this with an existing C library by creating a new framework target in Xcode with the right include settings, etc gleaned from looking at the makefiles. That created a .framework bundle with headers and an iPhone .a library ready to be used by an iPhone project. You could also just import the C source into the iPhone project, and have it compiled in that way which would probably be quicker.

Resources