NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Netbeans begineer

 
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users
View previous topic :: View next topic  
Author Message
dharanidhar



Joined: 19 Apr 2013
Posts: 6

PostPosted: Fri Apr 19, 2013 1:52 pm    Post subject: Netbeans begineer Reply with quote

I have installed netbeans freshly for my C/C++ projects.
I am new to programming.

I wrote a simple "Hello World"..
I used the "C/C++ Application" to create my program.

When i try to build, i get the following error..

"C:/Dwimperl/c/bin/gmake" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
gmake[1]: Entering directory `C:/Documents and Settings/AUF/Desktop/embeddedcpp/microc'
"C:/Dwimperl/c/bin/gmake" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin-Windows/microc.exe
gmake[2]: Entering directory `C:/Documents and Settings/AUF/Desktop/embeddedcpp/microc'
mkdir -p build/Debug/Cygwin-Windows
rm -f build/Debug/Cygwin-Windows/main.o.d
g++ -c -g -MMD -MP -MF build/Debug/Cygwin-Windows/main.o.d -o build/Debug/Cygwin-Windows/main.o main.cpp
process_begin: CreateProcess(C:\cygwin\bin\g++.exe, g++ -c -g -MMD -MP -MF build/Debug/Cygwin-Windows/main.o.d -o build/Debug/Cygwin-Windows/main.o main.cpp, ...) failed.
make (e=5): Access is denied.

gmake[2]: *** [build/Debug/Cygwin-Windows/main.o] Error 5
gmake[2]: Leaving directory `C:/Documents and Settings/AUF/Desktop/embeddedcpp/microc'
gmake[1]: *** [.build-conf] Error 2
gmake[1]: Leaving directory `C:/Documents and Settings/AUF/Desktop/embeddedcpp/microc'
gmake: *** [.build-impl] Error 2


BUILD FAILED (exit value 2, total time: 2s)

Please, help me in solving this..
Back to top
dharanidhar



Joined: 19 Apr 2013
Posts: 6

PostPosted: Fri Apr 19, 2013 2:47 pm    Post subject: Reply with quote

Thanks for your quick reply..

Cygwin was previously installed in my PC and it is 1.7.5-1 version. As per the version requirements, 1.7.7..
I will try to install that version of CYGWIN and give it a try.
Back to top
dharanidhar



Joined: 19 Apr 2013
Posts: 6

PostPosted: Sun Apr 21, 2013 5:26 am    Post subject: Reply with quote

I tried to install recommended versions of CYGWIN, but i don't know, after complete installation, i don't see a make.exe..

Then, i installed MinGW and i could compile successfully a single main.cpp file.

Now i have a small problem. I included a header file in Header files section and tried to build project. and now my troubles start again.. When i try to RUN it says ,

"main.cpp:10:18: fatal error: main.h: No such file or directory"

Please, help me in solving this.. I read through some forum posts on this and couldnt understand what need to be done. Please, help me.

Also, i attached the Code assistance paths in my options..
Please, let me know what need to be done.



image1.PNG
 Description:
 Filesize:  71.58 KB
 Viewed:  8618 Time(s)

image1.PNG


Back to top
dharanidhar



Joined: 19 Apr 2013
Posts: 6

PostPosted: Mon Apr 22, 2013 2:21 pm    Post subject: Reply with quote

I have MinGW\bin in my path.

I have included "Code Assistance" to show my settings in build path.

Following is my compilation output:

"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/c/Documents and Settings/AUF/Desktop/embeddedcpp/microc'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/microc.exe
make[2]: Entering directory `/c/Documents and Settings/AUF/Desktop/embeddedcpp/microc'
mkdir -p build/Debug/MinGW-Windows
rm -f build/Debug/MinGW-Windows/main.o.d
g++ -c -g -MMD -MP -MF build/Debug/MinGW-Windows/main.o.d -o build/Debug/MinGW-Windows/main.o main.cpp
main.cpp:10:18: fatal error: main.h: No such file or directory
compilation terminated.
make[2]: *** [build/Debug/MinGW-Windows/main.o] Error 1
make[2]: Leaving directory `/c/Documents and Settings/AUF/Desktop/embeddedcpp/microc'
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory `/c/Documents and Settings/AUF/Desktop/embeddedcpp/microc'
make: *** [.build-impl] Error 2


BUILD FAILED (exit value 2, total time: 5s)
Back to top
soldatov



Joined: 05 Nov 2009
Posts: 577

PostPosted: Mon Apr 22, 2013 2:41 pm    Post subject: Reply with quote

dharanidhar wrote:

g++ -c -g -MMD -MP -MF build/Debug/MinGW-Windows/main.o.d -o build/Debug/MinGW-Windows/main.o main.cpp
main.cpp:10:18: fatal error: main.h: No such file or directory
compilation terminated.

Which "make" you uses?
Back to top
dharanidhar



Joined: 19 Apr 2013
Posts: 6

PostPosted: Wed Apr 24, 2013 1:21 pm    Post subject: Reply with quote

@soldatov

I have pointed my makefile to the following path:
c:\mingw\msys\1.0\bin\make.exe

I am using default make file from mingw

@mack06

i am using msys make only
Back to top
soldatov



Joined: 05 Nov 2009
Posts: 577

PostPosted: Wed Apr 24, 2013 9:48 pm    Post subject: Reply with quote

On first screenshot I see You uses #include <main.h>, but I don't see any -I compiler flags.

1) if main.h is placed in folder with main.cpp, you needs to use #include "main.h"
2) if main.h is placed in other folder, you needs to add your path to folder into "Project Properties" > Build > C++ Compiler > Include Directories field
Back to top
dharanidhar



Joined: 19 Apr 2013
Posts: 6

PostPosted: Sat Apr 27, 2013 5:37 am    Post subject: Reply with quote

@soldatov

Thank you so much..
That worked.
Back to top
abhinav.plwl@gmail.com



Joined: 02 May 2013
Posts: 2

PostPosted: Thu May 02, 2013 7:08 pm    Post subject: netbeans will not open shows error Reply with quote

When i Installed the netbeans 7.1 and click the netbeans.exe icon the netbeans will not open and shows the "Failed to create process Access denied"
error please help me...
Back to top
AlfredCook



Joined: 28 Jul 2016
Posts: 1

PostPosted: Thu Jul 28, 2016 10:19 am    Post subject: quick saving guide Reply with quote

Thanks for the quick saving guide! I love the idea of the simplicity of Netbeans, his IDE GUI Builder, and Profiler but sometimes the easiest things floating above the surface and you are diving too deep to get them..
Back to top
aimeusdietger



Joined: 03 Mar 2017
Posts: 1

PostPosted: Wed Mar 08, 2017 4:58 pm    Post subject: Re: netbeans will not open shows error Reply with quote

abhinav.plwl@gmail.com wrote:
When i Installed the netbeans 7.1 and click the netbeans.exe icon the netbeans will not open and shows the "Failed to create process Access denied"
error please help me...


The Application need access to use from Administrator.

Give Access to The System which you are using or Open the Application by Run as Administrator

But , Giving Admin access to Every user is not Good.

its problem with Netbeans Version : https://netbeans.org/bugzilla/show_bug.cgi?id=255756

I Uninstalled 8.1 and Installed Later Versions.

Give to user administrator rights, install Netbeans, run it. Remove administrator rights from user, restart pc. It will work
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> C/C++ Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo