Codelite not compiling and running program - c

I'm new to coding and i am trying to learn C, I installed Codelite and tried to compile the default hello world thing but I just returns this, is something going on or am I just stupid?
the default thing is:
#include <stdio.h>
int main(int argc, char **argv)
{
printf("hello world\\n");
Codelite is returning this when I click "Build":
make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
make[1]: Entering directory '/cygdrive/c/Users/Matheus/OneDrive/Documentos/Testing/Testing2'
/bin/sh: -c: line 1: syntax error: unexpected end of file
make[1]: *** [Testing2.mk:86: MakeIntermediateDirs] Error 1
make[1]: Leaving directory '/cygdrive/c/Users/Matheus/OneDrive/Documentos/Testing/Testing2'
make: *** [Makefile:5: All] Error 2
=== build completed successfully (0 errors, 0 warnings) ===
And when I click "Run" this shows up:
==== Program exited with exit code: 0 ====
Time elapsed: 000:00.000 (MM:SS.MS)
Press any key to continue...
I don't know anything about coding i only tried to change to build settings and returning it to the normal state but i didn't work either

Related

Errors in building INET in omnet++ 5.5.1

I have installed OMNeT++ 5.5.1 in ubuntu 18.04 successfully and it is working.
However, I am getting the following errors while building the latest version of INET. I followed the instructions ( using the IDE) given in the document. Can anyone please help me to get ride of it? Thank you.
/tmp/cc4FhpSO.s: Assembler messages:
/tmp/cc4FhpSO.s: Fatal error: can't close ../out/gcc-debug/src/inet/visualizer/base/MediumVisualizerBase.o: No space left on device
Makefile:1754: recipe for target '../out/gcc-debug/src/inet/visualizer/base/MediumVisualizerBase.o' failed
make[1]: *** [../out/gcc-debug/src/inet/visualizer/base/MediumVisualizerBase.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/tech/Downloads/inet4/src'
make: *** [all] Error 2
Makefile:7: recipe for target 'all' failed
"make MODE=debug -j2 all" terminated with exit code 2. Build might be incomplete.
20:48:19 Build Failed. 5 errors, 0 warnings. (took 11m:39s.915ms)
It seems that you don't have free space in the disk:
/tmp/cc4FhpSO.s: Fatal error: can't close ../out/gcc-debug/src/inet/visualizer/base/MediumVisualizerBase.o: No space left on device

HTK compile error: make[1]: Nothing to be done for 'all'

Following the official HTK Unix/Linux installation guide, I had similar issues to the ones described in this thread when trying to run make all on HTK. I had initially been looking at the wrong Makefile (/htk-3.4.1/Makefile), as suggested by MadScientist. After fixing the extra indentation on line 77 in the correct Makefile (/htk-3.4.1/HLMTools/Makefile) generated by running ./configure --prefix=/tmp, the HTK compile error:
Makefile:77: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.
has disappeared, but I am still unable to compile on make all:
$ make all
(cd HTKTools && make all) \
|| case "" in *k*) fail=yes;; *) exit 1;; esac;
make[1]: Entering directory '/home/zeesy/htk-3.4.1/HTKTools'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/zeesy/htk-3.4.1/HTKTools'
(cd HLMTools && make all) \
|| case "" in *k*) fail=yes;; *) exit 1;; esac;
make[1]: Entering directory '/home/zeesy/htk-3.4.1/HLMTools'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/zeesy/htk-3.4.1/HLMTools'
Prior to make all, running ./configure --prefix=/tmp results in the error:
config.status: WARNING: HLMTools/Makefile.in seems to ignore the --datarootdir setting
for HTKLib, HLMLib, HTKTools and HLMTools. It also resets line 77 of the Makefile to quadruple indented tabs.
I have gcc-multilib installed. Based on this post, I installed libc6:i386 zlib1g:i386 lib32ncurses5 and lib32z1 in order to run this 32bit program on a 64bit computer.
Has anyone run into this problem? Step 4 of the VoxForge HTK install guide suggests that gcc 3.4 compiler compatibility modules are required.
As suggested by MadScientist, I was at first looking at the wrong Makefile. I had been looking at /htk-3.1.4/Makefile, when the file that needed to be edited was /htk-3.1.4/HLMTools/Makefile. A case of not reading the error messages thoroughly.
After getting the same error message for line 77
missing separator (did you mean TAB instead of 8 spaces?).
I ran Spaces to Tabs in Atom, and corrected the quadruple tab in the default Makefile.
The make all command initially ran successfully, but as I was unable to access ls /tmp/bin.linux I attempted make all again and received the second error message
make[1]: Nothing to be done for 'all'
The fix for this was to run make clean (see this post). However, Nikolay Shmyrev has pointed out that this error means that everything has compiled, there for there is 'nothing to be done'.
I'm now having problems accessing /tmp/bin.linux but will deal with that elsewhere.
SUMMARY: The make[1]: Nothing to be done for 'all' error means that everything has already compiled.

sqrt() method in c (Netbeans compiler vs. gcc)

I am making some tutorial exercises for school practice in c. I have this little method(Heron's formula):
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
.
.
double s = (a+b+c)/2.0;
double A = sqrt(s*(s-a)*(s-b)*(s-c)) //a,b,c = 3,3,2
.
.
I can compile it with a gcc:
gcc exercise.c -o exercise -lm
Everything works well. Problem is, when i try to rewrite the same code in Netbeans, it throws this error:
/home/l2ysho/NetBeansProjects/cviko1/main.c:48: undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
nbproject/Makefile-Debug.mk:62: recipe for target 'dist/Debug/GNU- Linux/cviko1' failed
make[2]: *** [dist/Debug/GNU-Linux/cviko1] Error 1
make[2]: Leaving directory '/home/l2ysho/NetBeansProjects/cviko1'
nbproject/Makefile-Debug.mk:59: recipe for target '.build-conf' failed
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory '/home/l2ysho/NetBeansProjects/cviko1'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 861ms)
In Netbeans, sqrt() method only works with a number (sqrt(2.5)), but not with a constant (sqrt(s)). I think, it is some problem with a Netbeans compiler. Do anyone have some similar issue?
I found one solution. If you have the same problem, you can hard link a math.h in NetBeans IDE:
File->Project Properties->Build->Linker->Libraries->add Library/add standard Library
I also tried add an -lm argument to NetBeans compilator configuration, but this isn't worked.

Error while cross compiling poppler package

I am getting the following error while cross compiling Poppler package on Ubuntu
After configuring I gave command make
then while making the following error has come
GlobalParams.cc:81:35: fatal error: fontconfig/fontconfig.h: No such file or directory
compilation terminated.
make[3]: * [libpoppler_la-GlobalParams.lo] Error 1
make[3]: Leaving directory /media/COMMON/WorkSpace/Packages/poppler-0.41.0/poppler'
make[2]: *** [all] Error 2
make[2]: Leaving directory/media/COMMON/WorkSpace/Packages/poppler-0.41.0/poppler'
make[1]: * [all-recursive] Error 1
make[1]: Leaving directory `/media/COMMON/WorkSpace/Packages/poppler-0.41.0'
make: *** [all] Error 2
I even check the includes which I had given while configuring it has the fontconfig/fontconfig.h but den still the error is coming.
It looks like you should cross-compile the fontconfig library,then include the headers and libs into Popper.
Download the latest fontconfig and excute the conmmand below:
PKG_CONFIG_PATH=/opt/poppLib/lib/pkgconfig ./configureCC=arm-linux-gcc --host=arm-linux --build=i386-linux --prefix=/opt/poppLib--with-arch=arm --enable-libxml2 --disable-docs
make && make install
then add the include and lib in your Popper ,try compile it again.

Systrace 1.6f Compliation error

I am trying to compile Systrace-1.6f on Ubuntu 12.04 32bit edition. I found below error.
root#sharma-VM:/home/sharma/Desktop/systrace-1.6f# make
make all-recursive
make[1]: Entering directory `/home/sharma/Desktop/systrace-1.6f'
Making all in .
make[2]: Entering directory `/home/sharma/Desktop/systrace-1.6f'
gcc -DHAVE_CONFIG_H -I. -Wall -c systrace-translate.c
In file included from systrace-translate.c:54:0:
linux_fcntl.h:90:2: error: unknown type name ‘linux_off_t’
linux_fcntl.h:91:2: error: unknown type name ‘linux_off_t’
linux_fcntl.h:92:2: error: unknown type name ‘linux_pid_t’
linux_fcntl.h:98:9: error: unknown type name ‘linux_loff_t’
linux_fcntl.h:99:9: error: unknown type name ‘linux_loff_t’
linux_fcntl.h:100:9: error: unknown type name ‘linux_pid_t’
make[2]: *** [systrace-translate.o] Error 1
make[2]: Leaving directory `/home/sharma/Desktop/systrace-1.6f'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sharma/Desktop/systrace-1.6f'
make: *** [all] Error 2
Please kindly suggest me a solution for the above error.
This question about particular program is too specific to be asked on SO. However I came across the same problem and that is how I found it.
grep is your helper! You can grep -rsli linux_off_t to find out that it is in linux_types.h. Another question why it doesn't work, but if you just want to go further, insert the following lines
#undef _LINUX_TYPES_H
#include "linux_types.h"
somewhere in the beginning of linux_fcntl.h.
Then you'll come across yet another issue. Replace all references to cs with xcs. It took me a while since I used assembler last time. So I don't know if that is how this register is called these days but that is what I see for struct user_regs_struct in /usr/include/i386-linux-gnu/sys/user.h.
Even with all that it still does not pass the second regression test.
systrace has not been updated for quite a while and perhaps is not quite compatible with 3.x kernels as is. I am not a kernel expert though.

Resources