Build error due to some "permission error"

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
tdeshp
In need of some credit
In need of some credit
Posts: 1
Joined: Tue Jun 04, 2013 4:51 am

Build error due to some "permission error"

Post by tdeshp »

Hi All,

I am trying to interface my laptop with a DAQ card. There's a dll file to which a sample c code (provided by the manufacturer) can communicate. The manufacturer's sample executable (generated from that same c code) runs fine. I intend to make modifications to c code so that I can make it write the data from my DAQ card to a file of my choice. But, as a first step, I tried to compile the existing c code (without modifications) in wxDev-C++. But I am getting a build error. I know for sure that this cannot be the result of something being wrong in the actual code since the c code is directly from the manufacturer. I think the problem is with the way I am compiling this code.

Anyways, here is what I get in the compile log:

Code: Select all

Compiler: Default GCC compiler
Building Makefile: "C:\Users\...\Trial Compile\Makefile.win"
Executing  make clean
del /Q "Objects\MingW\AD7760_sample_code.o" "Objects\MingW\ADI_CED1_dll.o" "Output\MingW\first_attempt.exe"

C:\Users\...\Trial Compile\Output\MingW\first_attempt.exe

Access is denied.
g++.exe -c AD7760_sample_code.c -o Objects/MingW/AD7760_sample_code.o -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/include" -I"C:/Program Files (x86)/Dev-Cpp/" -I"C:/Program Files (x86)/Dev-Cpp/include/common" -D__WXMSW__ -D__GNUWIN32__ -D_UNICODE  

g++.exe -c ADI_CED1_dll.c -o Objects/MingW/ADI_CED1_dll.o -I"C:/Program Files (x86)/Dev-Cpp/MinGW32/include" -I"C:/Program Files (x86)/Dev-Cpp/" -I"C:/Program Files (x86)/Dev-Cpp/include/common" -D__WXMSW__ -D__GNUWIN32__ -D_UNICODE  

g++.exe "Objects/MingW/AD7760_sample_code.o" "Objects/MingW/ADI_CED1_dll.o" -o "Output/MingW/first_attempt.exe" -L"C:/Program Files (x86)/Dev-Cpp/lib/wx/gcc_lib" -L"C:/Program Files (x86)/Dev-Cpp/lib" -L"C:/Program Files (x86)/Dev-Cpp/MinGW32/lib" -mwindows -lwxmsw29u -lwxmsw29u_gl -lwxscintilla -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lodbc32 -lopengl32   

c:/program files (x86)/dev-cpp/mingw32/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: cannot open output file Output/MingW/first_attempt.exe: Permission denied
collect2: ld returned 1 exit status

mingw32-make.exe: *** [Output/MingW/first_attempt.exe] Error 1

Execution terminated
Compilation Failed. Make returned 2
Can someone please tell me what's wrong? or how I should proceed to figure out what might be wrong?

Thanks.

tdeshp
catalin
Moderator
Moderator
Posts: 1618
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: Build error due to some "permission error"

Post by catalin »

Go to the output location and see if you have permissions to write to that directory, that the exe does not already exist and is running.
It has nothing to do with the code.
Post Reply