Author Topic: [resolved] No targets in New Project wizard  (Read 41573 times)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: No targets in New Project wizard
« Reply #15 on: October 18, 2013, 06:28:22 pm »
I'm building C::B now, I have deleted the folder: cb_trunk\src\.objs, where the gch files locates.
Let me wait for the result.
Bad news: the result is that I still have this issue.
I'm using wxWidgets 2.8.12, WinXP, MinGW-build-dwarf2-4.8.1-compiler-suite.


I had the issue using wx 2.8 branch, Win7 SP1 32-bit, TDM SJLJ 4.8.1 compiler.

Now trying 4.7.1 compiler.

Special steps taken:
Deleted objects folder before build
Deleted devel/share Folder before build
Deleted output Folder after build before update.bat

Tim S.

Repeated steps except using 4.7.1 compiler; and, I did NOT see the problem.

Edit: Changed back to using 4.8.1 Compiler (but added the compiler option -Wno-unused-local-typedefs to reduce warnings)
The problem did NOT show back up.

Edit2: I realized I built the bad version using CB svn 9156; trying again using that CB version to see if problem happens again.
Edit3: Found no problem using CB svn 9156 to build; no idea why the first time had a problem.

Tim S.
« Last Edit: October 18, 2013, 07:32:07 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: No targets in New Project wizard
« Reply #16 on: October 19, 2013, 08:31:26 am »
I debugged this bug for a while, and I found a strange problem:
In the function:
Code
NewFromTemplateDlg::NewFromTemplateDlg(TemplateOutputType initial, const wxArrayString& user_templates)
    : m_Template(0L),
    m_pWizard(0L),
    m_WizardIndex(-1)
{
    //ctor
    wxXmlResource::Get()->LoadObject(this, 0L, _T("dlgNewFromTemplate"),_T("wxScrollingDialog"));
    m_Wizards = Manager::Get()->GetPluginManager()->GetOffersFor(ptWizard);

    wxListbook* lb = XRCCTRL(*this, "nbMain", wxListbook);
    SetSettingsIconsStyle(lb->GetListView(), sisNoIcons);
/*
    // create image lists
    XRCCTRL(*this, "listProjects", wxListCtrl)->SetImageList(new wxImageList(32, 32), wxIMAGE_LIST_NORMAL);
    XRCCTRL(*this, "listProjects", wxListCtrl)->SetImageList(new wxImageList(32, 32), wxIMAGE_LIST_SMALL);
    XRCCTRL(*this, "listTargets", wxListCtrl)->SetImageList(new wxImageList(32, 32), wxIMAGE_LIST_NORMAL);
    XRCCTRL(*this, "listTargets", wxListCtrl)->SetImageList(new wxImageList(32, 32), wxIMAGE_LIST_SMALL);
    XRCCTRL(*this, "listFiles", wxListCtrl)->SetImageList(new wxImageList(32, 32), wxIMAGE_LIST_NORMAL);
    XRCCTRL(*this, "listFiles", wxListCtrl)->SetImageList(new wxImageList(32, 32), wxIMAGE_LIST_SMALL);
    XRCCTRL(*this, "listCustoms", wxListCtrl)->SetImageList(new wxImageList(32, 32), wxIMAGE_LIST_NORMAL);
    XRCCTRL(*this, "listCustoms", wxListCtrl)->SetImageList(new wxImageList(32, 32), wxIMAGE_LIST_SMALL);

    // load view prefs
    XRCCTRL(*this, "rbView", wxRadioBox)->SetSelection(Manager::Get()->GetConfigManager(_T("new_from_template"))->ReadInt(_T("/view"), 0));
    ChangeView();

    BuildCategories();
    BuildList();

    // fill user templates list
    XRCCTRL(*this, "lstUser", wxListBox)->Clear();
    for (unsigned int i = 0; i < user_templates.GetCount(); ++i)
    {
        XRCCTRL(*this, "lstUser", wxListBox)->Append(user_templates[i]);
    }

    lb->SetSelection((int)initial);*/
}
You see, I have comment out all the operations on the dialog, but the wxListBook control still not shown correctly.

When I open the xrc in the wxsmith editor, I can see the default dialog should be like this (see the image shot below)


EDIT:
It looks like the option: Resize border should be enabled compared with other xrc, but when I enabled this, I still have this issue.

EDIT2
I can easily add a new button, but the wxListBook still not shown, I'm no idea how to fix it. (see the screen shot below)



« Last Edit: October 19, 2013, 08:56:40 am by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: No targets in New Project wizard
« Reply #17 on: October 19, 2013, 10:21:10 am »
I will try to get a deeper look into it, but I need to install C::B, C::B sources, wxWidgets and MinGW to test.
This will probably need some time.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: No targets in New Project wizard
« Reply #18 on: October 19, 2013, 10:35:39 am »
I think it is better we can have a Codeblocks_debugwx.cbp file which link to the debug version of wx library, so that catch bugs in wx is quite easy. :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: No targets in New Project wizard
« Reply #19 on: October 19, 2013, 01:16:44 pm »
It looks like wxLC_LIST is broken on WinXP, so my changes in svn r9390 to SetSettingsIconStyle break the NewFromTemplateDllg on Windows XP (not win7 !).
Using wxLC_SMALL_ICON instead of wxLC_LIST work non XP. If it does work on win7 (wx2.8 and wx2.9+) I commit this fix, otherwise, I will find another solution.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: No targets in New Project wizard
« Reply #20 on: October 19, 2013, 02:17:37 pm »
Could you please check, whether the issue is fixed in svn r9405 ?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: No targets in New Project wizard
« Reply #21 on: October 19, 2013, 03:05:32 pm »
Could you please check, whether the issue is fixed in svn r9405 ?
Thanks. It works fine now! Great work.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: No targets in New Project wizard
« Reply #22 on: October 20, 2013, 10:37:06 am »
I have just installed Kubuntu 13.10 and compiled C::B using Jens' tarball codeblocks_12.11svn9393.orig.tar.gz against wx 2.8.12 as provided by Kubuntu 13.10. The C::B start screen shows
Code
svn build rev 9393 (2013-10-08 09:17:30) gcc 4.8.1 Linux/unicode - 32 bit 

If I try the project wizard, there are no targets as mentioned in this thread.

Another issue that I noticed, was that the compilation was unusually slow. I didn't time it or watch it, but it seemed to take forever.

For my own projects, I also use wx 2.8.12, but compile and link it statically. As I compiled wx, I noticed there was a huge number of warnings being issued about "unused local typedefs" in wx/defs.h and perhaps other places. Writing all these warnings took a loooong time. This appears to be a side effect of gcc 4.8.1, but so far I have not found any way to switch those warnings off. Suggestions welcome.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: No targets in New Project wizard
« Reply #23 on: October 20, 2013, 10:52:13 am »
For my own projects, I also use wx 2.8.12, but compile and link it statically. As I compiled wx, I noticed there was a huge number of warnings being issued about "unused local typedefs" in wx/defs.h and perhaps other places. Writing all these warnings took a loooong time. This appears to be a side effect of gcc 4.8.1, but so far I have not found any way to switch those warnings off. Suggestions welcome.

add the compiler option -Wno-unused-local-typedefs to reduce warnings. Or manually remove this dummy typedef in the wx source.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: No targets in New Project wizard
« Reply #24 on: October 20, 2013, 11:05:08 am »
Before running the configure-script just do a
Code
export CXXFLAGS="-Wno-unused-local-typedefs"
in the console.
The other issue is fixed later and there are more fixes to the settings-dialogs I am working on.
I will commit them most likely this afternoon/evening/night, but it's always much to test (WinXP, Win7, Liinux and wx2.8 and wxtrunk).

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: No targets in New Project wizard
« Reply #25 on: October 20, 2013, 11:13:55 am »
Before running the configure-script just do a
Code
export CXXFLAGS="-Wno-unused-local-typedefs"
in the console.
The other issue is fixed later and there are more fixes to the settings-dialogs I am working on.
I will commit them most likely this afternoon/evening/night, but it's always much to test (WinXP, Win7, Liinux and wx2.8 and wxtrunk).

Thanks a lot, but I believe that option (-Wno-unused-local-typedefs) is removed in gcc 4.8.1. I tried, and it doesn't work. I believe the opposite (-Wunused-local-typedef) is now implicit in -Wall, without any way of turning it off. A last resort solution is to start fiddling with wx 2.8.12 source, but it isn't ideal.

I shall watch your C::B folder and try again when I see the update. Your work is much appreciated!

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: No targets in New Project wizard
« Reply #26 on: October 20, 2013, 11:26:59 am »
I use it here and it works with gcc4.8 on Fedora.

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: No targets in New Project wizard
« Reply #27 on: October 20, 2013, 11:30:38 am »
I use it here and it works with gcc4.8 on Fedora.

Ok, i will double check. Thanks again.

Offline cacb

  • Lives here!
  • ****
  • Posts: 536
Re: No targets in New Project wizard
« Reply #28 on: October 20, 2013, 01:41:22 pm »
I use it here and it works with gcc4.8 on Fedora.

Ok, i will double check. Thanks again.

I have double checked now, and you are correct again  :) Somehow, I messed up the first time.

To suppress all wx 2.8 warnings (rightly or wrongly), I found I had to use these two options:
Code
-Wno-unused-local-typedefs
-Wno-literal-suffix

As I have many code::blocks projects with several targets in each, it isn't straghtforward to update them all. As a temporary solution I have therefore enabled the two options above as global C::B compiler settings for gcc. A better solution would be to use some tool to add them to my project files, I guess.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: No targets in New Project wizard
« Reply #29 on: October 20, 2013, 02:19:18 pm »
If you just build C::B, you can add them to the  cb_release_type global-variable. That covers most (not all) C::B projects.