Page 1 of 2

Noobie question...

Posted: Tue Jul 07, 2009 7:32 pm
by XTRobot
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 :


And here is from wxFrame :


Posted: Tue Jul 07, 2009 8:54 pm
by tbreina
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:

Code: Select all

    printf("Press any key to continue...");
    getchar (); /* Pause the program from exiting */
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.


Posted: Tue Jul 07, 2009 9:10 pm
by XTRobot
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 :

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\ [Build Error] exe: *** [Objects/MingW/Project1_private.res] Error 1 
So where is the problem ? Thanks for your help anyway :)

Posted: Tue Jul 07, 2009 9:33 pm
by tbreina
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?


Posted: Tue Jul 07, 2009 10:11 pm
by XTRobot
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 ?

Posted: Tue Jul 07, 2009 10:34 pm
by tbreina
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 ?
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.

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.


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.

Posted: Tue Jul 07, 2009 10:45 pm
by XTRobot
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 :)

Posted: Tue Jul 07, 2009 11:18 pm
by tbreina
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. ... -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


Posted: Wed Jul 08, 2009 12:39 am
by XTRobot
Can you tell me how can i use that in C;Program files > DevCpp > Bin ?

Posted: Wed Jul 08, 2009 2:43 am
by Jophin

1. Unistall all MingW , wxDevCpp , wxMSW applications if you have installed in your system.

2. Visit 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 or try for more help

7. Also visit and download for latest wxWidgets help documentation in .chm foramt.

Posted: Wed Jul 08, 2009 10:23 am
by XTRobot
Wow,great help,finaly someon understand me,i didnt tryed your steps,but i will soon,because i have some work to do now :S

Posted: Wed Jul 08, 2009 1:20 pm
by XTRobot
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 :)

Posted: Wed Jul 08, 2009 1:31 pm
by XTRobot
There is just one more problem,i cant see the toolbox window,its not on the right side,i go to View > Toolbars and there was no toolbox window,how can i put one ?

Posted: Wed Jul 08, 2009 2:07 pm
by buildere
Be advised that RC5 has one important bug that corrupts forms, so don't rely on it too much.

We have one possible solution for the problem, but we're doing some further investigation to ensure the best possible fix.

Posted: Wed Jul 08, 2009 3:12 pm
by XTRobot
Ohh,i didnt knew that,thanks for fast reply,i hope you will fix it soon :) Best regards XTRobot .