there is an error while compiling with avr using eclipse - eclipse

i am trying to compile a program with eclipse luna and using avr compiler and here is the error that poped up:
make all
Building file: ../main.c
Invoking: AVR Compiler
avr-gcc -Wall -Os -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=atmega16 -DF_CPU=1000000UL -MMD -MP -MF"main.d" -MT"main.d" -c -o "main.o" "../main.c"
make: *** [main.o] Error 1
i am trying to fix it over 3 days but there is no benefit of it.
can anyone help me and give me an advice for it ?
i have tried many eclipse version with no solution. also, i have uninstall and reinstall the winavr again nothing happened.

Related

error: no matching function for call to 'std::basic_ifstream<char>::basic_ifstream(const wchar_t*, std::_Ios_Openmode)'

I am getting following error:
error: no matching function for call to 'std::basic_ifstream<char>::basic_ifstream(const wchar_t*, std::_Ios_Openmode)'
My compiling command is
g++ -I"C:\Intel\OpenCL\sdk\include" -I"C:\Intel\OpenCL\sdk\include\common" -O0 -g3 -Wall -c -fmessage-length=0 **-std=c++11** -MMD -MP -MF"src/oclobject.d" -MT"src/oclobject.o" -o "src/oclobject.o" "../src/oclobject.cpp"
I am checking this on eclipse Oxygen with cygwinx64 compiler for compiling Intel OCL sample applications.

Build error using dlib library in Eclipse

This is the first time I started use Dlib library.
I make a project and include dlib's face detection example cpp.
I have already linked to pthread and -std=c++1 into my project.
I have already included the folder path which has dlib folder inside.
I have already included source.cpp into my project.
When I build, I have errors from this source.cpp as
15:43:22 * Build of configuration Debug for project ObjectDetectionDlib *
make all
Building file: ../src/ObjectDetectionDlib.cpp
Invoking: GCC C++ Compiler
g++ -DGXX_EXPERIMENTAL_CXX0X -I/home/nyan/Softwares/Dlib_Lib/ -O0 -g3 -Wall -c -fmessage-length=0 -std=c++11 -MMD -MP -MF"src/ObjectDetectionDlib.d" -MT"src/ObjectDetectionDlib.o" -o "src/ObjectDetectionDlib.o" "../src/ObjectDetectionDlib.cpp"
Finished building: ../src/ObjectDetectionDlib.cpp
Building file: ../src/source.cpp
Invoking: GCC C++ Compiler
g++ -DGXX_EXPERIMENTAL_CXX0X -I/home/nyan/Softwares/Dlib_Lib/ -O0 -g3 -Wall -c -fmessage-length=0 -std=c++11 -MMD -MP -MF"src/source.d" -MT"src/source.o" -o "src/source.o" "../src/source.cpp"
../src/source.cpp:7:41: fatal error: ../base64/base64_kernel_1.cpp: No such file or directory
#include "../base64/base64_kernel_1.cpp"
^
compilation terminated.
make: *** [src/source.o] Error 1
What is wrong? I use g++/4.8 as compiler.

Windows + Eclipse + ARM-GCC

I would like to use eclipse IDE for my development with Tiva (LM4F) processor. I did this tutorial. Kernel hacks tutorial.
I use Win 8.1 x64 + eclipse + ARM-GCC and I would like to program a LM4F MCU.
I sat up everything, compiler path, the driverlib path. But It can't find the correct dependencies
Invoking: Cross GCC Compiler
arm-none-eabi-gcc -DPART_LM4F120H5QR -DTARGET_IS_BLIZZARD_RA1 -DARM_MATH_CM4 -I../.. /../stellarisware/ -I../../../stellarisware/utils -I../../../stellarisware/driverlib -I../../../stellarisware/inc/ -O0 -g3 -Wall -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -ffunction-sections -fdata-sections -MMD -MP -MF"main.d" -MT"main.d" -o "main.o" "../main.c"
c:/gnu_gcc_arm/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/lib/armv7e-m/softfp\libg.a(lib_a-exit.o): In function 'exit':
exit.c:(.text.exit+0x16): undefined reference to '_exit'
C:\Users\MTYS~1\AppData\Local\Temp\ccECjb0N.o: In function 'Init_Adc':
C:\eclipse_workspace\proba\Debug/../main.c:20: undefined reference to 'SysCtlPeripheralEnable'
And all of driver functions gave me error.
And my path is (windows path: C:\stellarisware\, the project folder is C:\eclipse_workspace\try):
../../../stellarisware/
../../../stellarisware/utils
../../../stellarisware/driverlib
../../../stellarisware/inc/
I tried different methods (use cygwin path, or absolute windows path), the code can be compiled successfully with IAR. What should I do?

Error building doxygen1.8.6

Just got the latest duoxygen 1.8.6 on Linux
Currently have 1.8.5 installed. It build fine.
With 1.8.6 am gettign the following error:
gmake[2]: Entering directory `/home/build/doxygen/doxygen-1.8.6/src'
/usr/bin/flex -PconfigYY -t config.l >config.cpp
g++ -c -pipe -fsigned-char -D_LARGEFILE_SOURCE -Wall -W -O2 -I../qtools -o ../objects/config.o config.cpp
config.l: In member function bool Config::parse(const char*):
config.l:1692: error: configYY_flex_debug was not declared in this scope
gmake[2]: *** [../objects/config.o] Error 1
Any help appreciated
With release 1.8.6 a newer version of flex is required to build doxygen. Try version 2.5.35 or later.
See also https://bugzilla.gnome.org/show_bug.cgi?id=719525

Compiling a dll with mingw and eclipse

I want to write a tool to capture and visualize pressed keys in a specific application so I searched for a sample source.
My result was this:
http://www.codeguru.com/cpp/w-p/system/keyboard/article.php/c5699
But it doesn't work yet. Here's my approach:
I have imported the sources as makefile project in Elipse (Helios, CDT Version 7.0.0.201006141710) using Mingw 4.6.1 as toolchain.
In keydll3.cpp I added the line
#define KEYDLL3_EXPORTS
to tell the preprocessor that i want to export the dll functions.
Now when I try to compile the project, the following errors occour:
**** Internal Builder is used for build ****
g++ -shared -DBUILDING_EXAMPLE_DLL -IC:\MinGW\include -IC:\MinGW\lib\gcc\mingw32\4.6.1\include\c++ -O2 -g -Wall -c -fmessage-length=0 -oStdAfx.o ..\StdAfx.cpp
g++ -shared -DBUILDING_EXAMPLE_DLL -IC:\MinGW\include -IC:\MinGW\lib\gcc\mingw32\4.6.1\include\c++ -O2 -g -Wall -c -fmessage-length=0 -okeydll3.o ..\keydll3.cpp
..\keydll3.cpp:31:0: warning: ignoring #pragma data_seg [-Wunknown-pragmas]
..\keydll3.cpp:34:0: warning: ignoring #pragma data_seg [-Wunknown-pragmas]
..\keydll3.cpp:36:0: warning: ignoring #pragma comment [-Wunknown-pragmas]
g++ -okeydll3 keydll3.o StdAfx.o
c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../libmingw32.a(main.o): In function `main':
C:\MinGW\msys\1.0\src\mingwrt/../mingw/main.c:73: undefined reference to `WinMain#16'
collect2: ld returned 1 exit status
Build error occurred, build is stopped
It seems that the compiler misses the winmain statement because he assume it's a windows application. But a dll isn't.
It also seems that the "-share" option has no effect.
So how do I tell the compiler that my code is a dll with some Windows API calls?
If there's another example which works without visual studio let me know.
Thanks in advance for your contributions.
Noir
You've added the -shared option in the wrong place. It needs to be added to the linker flags, not to the compiler flags. Your commands should look like this.
g++ -DBUILDING_EXAMPLE_DLL -IC:\MinGW\include -IC:\MinGW\lib\gcc\mingw32\4.6.1\include\c++ -O2 -g -Wall -c -fmessage-length=0 -oStdAfx.o ..\StdAfx.cpp
g++ -DBUILDING_EXAMPLE_DLL -IC:\MinGW\include -IC:\MinGW\lib\gcc\mingw32\4.6.1\include\c++ -O2 -g -Wall -c -fmessage-length=0 -okeydll3.o ..\keydll3.cpp
g++ -shared -okeydll3 keydll3.o StdAfx.o