Noobie question... Topic is solved
Noobie question...
Hello,i downloaded wxDevCpp,and i created new wxFrame,but when i compile it just dont compile,and dont run,i click run it says your soruce file not compiled,but when i click compile the compile window doesnt open. And when i compile some C++ code(not wx)it says compile done but the console doesnt show up. What the heck is the problem ?
Here is pic from c++ code :
[/img]
And here is from wxFrame :
Here is pic from c++ code :
[/img]
And here is from wxFrame :
Fifty years of programming language research, and we end up with C++ ?
In you first case, you'll need to put something at the end of the C++ code to pause the console window long enough. Otherwise, you'll see a console window open and close almost immediately. For example, add this at the end:
In the second example, you just did File->New->wxFrame. Instead, you'll need to do File->New->Project and select wxFrame from the window. This will setup all of the app code and compiler/linker switches you need to build the project.
Try looking at the "wxDev-C++ programming" book in the Help menu for more guidance.
-Tony
Code: Select all
printf("Press any key to continue...");
getchar (); /* Pause the program from exiting */
Try looking at the "wxDev-C++ programming" book in the Help menu for more guidance.
-Tony
Everybody's got something to hide except for me and my monkey.
About the first thing you are not right,i added system("pause"); and return 0; but like i said "When i click compile it just says Done,and the Compile Progress windows doesnt close,it just say that and the program dont run. I dont know what is the problem. And about the second thing,you are right about the new project,but when i compile wxFrame it give me some errors :
So where is the problem ? Thanks for your help anyway
Code: Select all
C:\Users\Aleksandar\Desktop\gcc installation problem, cannot exec `cc1': No such file or directory.
[Resource Error] no resources
C:\Users\********\Desktop\Makefile.win [Build Error] exe: *** [Objects/MingW/Project1_private.res] Error 1
Fifty years of programming language research, and we end up with C++ ?
For the first one, did you create a new Project (File->New->Project->Console application)? Or did you just create a new source file (File->New->Source file)? You'll need to always create a new project when you first begin a new program.
For the second one, there seems to be something wrong with your path. Do you have MingW, Msys, or something like that on your machine? Is wxDev-C++ (or your project) in a directory that has spaces in the name?
-Tony
For the second one, there seems to be something wrong with your path. Do you have MingW, Msys, or something like that on your machine? Is wxDev-C++ (or your project) in a directory that has spaces in the name?
-Tony
Everybody's got something to hide except for me and my monkey.
The compiler is in C:Program Files but the project is in Desktop. I have MingW on my PC,so how can i solve that error ? And you are right about that first one,i was just using New Source File,thanks for this,but can you help me for the error ?
Fifty years of programming language research, and we end up with C++ ?
I think the second MingW may be interfering. If you can, please try uninstalling that other MingW installation. Or, you can look at the PATH environment variable and move C:\Program Files\Dev-Cpp\bin to the start of the PATH.XTRobot wrote:The compiler is in C:Program Files but the project is in Desktop. I have MingW on my PC,so how can i solve that error ? And you are right about that first one,i was just using New Source File,thanks for this,but can you help me for the error ?
For the new source file error, create a new console project (File->New->Project->Console application). Copy your C++ code over the skeleton code that is automatically provided. Then, build the project.
-Tony
p.s. It sounds like you need to be reading the "Introduction to wxDev-C++ programming" manual in the Help menu. It will get you through a lot of the common pitfalls.
Everybody's got something to hide except for me and my monkey.
I solved the first problem,and thank you about that,and i dont understand you about the second problem,(i am beginner),i have installed Mingw gcc with the wxDevCpp wizard,you can see here :
Did you had this error when you installed wxDevCpp first time ? How did you solve it ? I just installed it like it need to be(default),i didnt changed nothing,so it looks everyone have this problem,so have did they solve it ? And what is that PATH you are talking about ? I know i am wx noobie so please help to this little kid because i am getting nervous
Did you had this error when you installed wxDevCpp first time ? How did you solve it ? I just installed it like it need to be(default),i didnt changed nothing,so it looks everyone have this problem,so have did they solve it ? And what is that PATH you are talking about ? I know i am wx noobie so please help to this little kid because i am getting nervous
Fifty years of programming language research, and we end up with C++ ?
I'm assuming you used some sort of installer for the second MingW/MSys. Try uninstalling that.
As far as the system PATH, you can find more information via google (e.g. http://banagale.com/changing-your-syste ... -vista.htm). Essentially, PATH tells your computer what directories to look for when you try to run a program without specifying the directory of the program. My guess is that your computer is trying to use the second MingW compiler rather than the one in C:\Program Files\Dev-Cpp\bin
-Tony
As far as the system PATH, you can find more information via google (e.g. http://banagale.com/changing-your-syste ... -vista.htm). Essentially, PATH tells your computer what directories to look for when you try to run a program without specifying the directory of the program. My guess is that your computer is trying to use the second MingW compiler rather than the one in C:\Program Files\Dev-Cpp\bin
-Tony
Everybody's got something to hide except for me and my monkey.
-
- Knows some wx things
- Posts: 41
- Joined: Sun Apr 05, 2009 1:53 am
- Location: Maharashtra , India
Hi
1. Unistall all MingW , wxDevCpp , wxMSW applications if you have installed in your system.
2. Visit http://wxdsgn.sourceforge.net/ and download wxDev-C++ 7.0 Release Candidate 5 ( or use wxDev-C++ 6.10.2 that you already have with you ). This setup includes all required IDE , binarys, header files ,library and example files.
3. Try to install wxDevCpp in C:\ instead of C:\Program Files\.
4. After installation first try compiling C++ examples in "examples" directory by opening wxDevCpp project file which has *.dev extension.
5. And later try compiling wxWidgets examples in "examples\wxWidgets" directory.
6. Try following simple tutorials at site http://wxdsgn.sourceforge.net/?q=node/13 or try for more help http://wxdsgn.sourceforge.net/?q=node/6
7. Also visit http://biolpc22.york.ac.uk/pub/2.9.0-rc4/ and download wxWidgets-2.9.0-rc4-chm.zip for latest wxWidgets help documentation in .chm foramt.
1. Unistall all MingW , wxDevCpp , wxMSW applications if you have installed in your system.
2. Visit http://wxdsgn.sourceforge.net/ and download wxDev-C++ 7.0 Release Candidate 5 ( or use wxDev-C++ 6.10.2 that you already have with you ). This setup includes all required IDE , binarys, header files ,library and example files.
3. Try to install wxDevCpp in C:\ instead of C:\Program Files\.
4. After installation first try compiling C++ examples in "examples" directory by opening wxDevCpp project file which has *.dev extension.
5. And later try compiling wxWidgets examples in "examples\wxWidgets" directory.
6. Try following simple tutorials at site http://wxdsgn.sourceforge.net/?q=node/13 or try for more help http://wxdsgn.sourceforge.net/?q=node/6
7. Also visit http://biolpc22.york.ac.uk/pub/2.9.0-rc4/ and download wxWidgets-2.9.0-rc4-chm.zip for latest wxWidgets help documentation in .chm foramt.
Jophin K.
Maharashtra , India
Maharashtra , India
I compiled one of the examples and it started,thats great,now when i compiled wxFrame it also worked fine,i just cant beleave i made it,you are my angel,you understaned me,what would i do without you buddy,thanks for your help,and if i have other problems later i will ask you.BTW maybe this worked because i downloaded the latest version of wxdevcpp,before you told me i used older version,i dont know why it worked but i will always install it in C: and i will download version 7.0 !
Thanks again,i solved this problem
Thanks again,i solved this problem
Fifty years of programming language research, and we end up with C++ ?