Compiling using eclipsec.exe fails but using the IDE it pass - c

I'm trying to create a CI process to a c code,
The developers are working on an IDE called "Kinetis" and when I ran and compiled the project from the IDE everything is working fine.
To create the CI I tried to compile the project using eclipsec.exe and then I get an error:
c:\jenkins\workspace\embeded_build\ng_brg_plt_env\mqx\source\io\flash_spi\flash_spi.h:19:20: fatal error: device.h: No such file or directory
#include <device.h>
The device.h file exists in :
C:\jenkins\workspace\Embeded_Build\NG_BRG_PLT_ENV\config\twrk65f180m\device.h
Is there something missing in the command line? I couldn't find an argument to pass the classpath, and I don't even know if this will help.
https://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html
This is the command I am running:
eclipsec.exe -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import .\ -build mqtt -cleanBuild mqtt

Related

Cannot run C codes on vscode

I have installed VScode and gitbash this afternoon on my Windows to pull and push C scripts for a project.
Everything is working fine but i can't run my scripts on the GitBash shell (error is : ..../main.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory)
neither on the PowerShell (compiling but returning nothing when I try to execute the exe file).
If i open a CMD window it's working fine.
I installed the 'code runner' extension to execute the code in one click, but i always get this error :
[Done] exited with code=3221225781 in 0.43 seconds
I already tried to execute the command line that the extension uses :
cd "c:\Users\....\" && gcc main.c -o main && "c:\....\"main
on an external cmd window and it's working fine
I also have MinGW in PATH.
Thank you
I fixed it by downloading "msvcr71.dll" and putting it into C:\Windows\SysWOW64 and C:\Windows\System32

Error compiling CMake project with Emscripten

I have written a project that compiles with CMake. Now I am trying to get emscripten to compile it, but I am getting an error. Beginning in the root of the Cmake project, the steps I take are as follows:
$mkdir build_emscripten
$cd build_emscripten
$emcmake cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
$sudo make
Everything works up until the command make. What happens is it links the C executable successfully then it gives the error "ERROR:root:/usr/include/python2.7: Input file has an unknown suffix, don't know what to do with it!"
Then it proceeds to give multiple other errors causes by this. What can I do to fix this?

Struggling to get PortAudio to Work with MinGW

I have the MinGW install previously working fine with MSYS. They are installed properly and functioning just well.
I installed the PortAudio library and did the install and got the success message after:
./configure
make
make install
When I try to compile samples:
c:\c>gcc patest_mono.c -o pa.exe
patest_mono.c:50:23: fatal error: portaudio.h: No such file or directory
#include "portaudio.h"
^
compilation terminated.
I'm new. I have a feeling I might be doing something fundamentally wrong with the way I'm trying to create the exe from compiling. It's been somewhat of a puzzle quest so far, but I've tried to figure it out and think I am close but completely missing something.
PATH variable ?
In the PortAudio MinGW build instructions I noticed
"The above should create a working version though you might want to
provide '–prefix=<path-to-install-dir>' to configure. "
I've tried adding C:\MingW\PortAudio into the user path. Doesn't work.
I've also tried running the commands in Bash and they come back with an error message "No Rule to make target 'paexpink'" either with the make command, and with gcc .c -o .exe I just get the same error message as compiling straight from the cmd prompt.
I found another source on stack overflow thread with no answers, but the user had commented that http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio provided them a solution but I tried installing the 5 cpython binaries and under the assumption I did it right, it didn't work either.
Thanks for your help,
Julian
To build and install portaudio, you need to add -prefix=/c/<"path to base of the MinGW directory"> to the ./configure line.
For example: ./configure -prefix=/c/MinGW/
then continue the installation by doing
make
After that, do the
make install
and that should install the portaudio files into MinGW.
After it has finished installing, you need to add -lportaudio to the compile command whenever you compile any programs that you want to use PortAudio in.
For example: gcc -o test test.c -lportaudio
I just figured out how to do this today, so I may have accidentally forgotten a few steps.

How to compile modsecurity on Ubuntu?

After I followed the instructions in (Building Custom ModSecurity Modules)section in modsecurity dev guide in order to compile (mod_tfn_reverse.c) using the command apxs -ca mod_tfn_reverse.c, I'm still finding "fatal errors" such as unable to find the file modsecurity.h mentioned in the header of the C document.
Here is the link to the source on github modsec
Instructions I did:
I am using Ubuntu 14.4 64bits (New installation with updates).
I installed "apache dev" package, to run "APXS" command on terminal.
Downloaded "modsecurity" zip file from github.
I extracted the zip file, then I located where the mod_tfn_reverse.c is.
It's path : ModSecurity/ext/mod_tfn_reverse.c
Then I changed the directory to the targeted file CD modsecurity/ext
as I placed the folder in "home".
Finally, I executed the command apxs -ca mod_tfn_reverse.c.
These are the instructions I did, apxs works, but the compilation fails because "modsecurity.h" declared in the header was not found, I searched this file I found it in another directory (ModSecurity/apache2/modsecurity.h).
So, the difficulty is, how can I successfully compile that specific file and have the module done and ready to use in apache2 server.
I am also confused about what are the other archives, headers, and development tools required to:
to compile a custom apache module.
to compile mod_tfn_reverse.c, in my case, knowing that this is only the starting point to create custom module for modsecurity.
This is covered by the included README:
apxs -I<MODSECURITY_SOURCE_CODE> -I/usr/include/libxml2 \
-ca mod_tfn_reverse.c

CodeVision AVR: Cannot read object file

I've just installed CodeVision AVR and create a new project. The code compiled successfully, but when I build the project I get this error:
"Can't read file: E:\prjpath\Obj\test.obj."
test.obj is existed in the expected directory.
I've tested the following solutions (but did not work):
Run as administrator
The directory must be without any space character.
No directory (folder) name can be longer than 8 characters.
Please mention that the problem appears after restarting the PC. The project build successfully when I've just installed CodeVision AVR (before system restart).

Resources