Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: jfpjr on February 05, 2007, 04:10:08 am

Title: Importing Dev-Cpp project files from wxDevCpp with wxpack
Post by: jfpjr on February 05, 2007, 04:10:08 am
I was having trouble importing DevCpp project and found that the Dev Project file from wxDevCpp with wxPack installed for gcc and vc has 2 profile sections. In this section is the lib and compiler option. These were not be read by the import routine in devcpploader.cpp. I had to add

 dev->SetPath(_T("/Profile1"));

before the line :
   
 dev->Read(_T("CppCompiler"), &tmp, _T(""));

in order to get the libs and other options. Not a full fix just quick one to get it working.

XP sp2
wxwidgets 2.8
Feb 3 svn

Title: Re: Importing Dev-Cpp project files from wxDevCpp with wxpack
Post by: jfpjr on February 06, 2007, 01:04:08 am
A little update to prev comment,

I have added some checks so that it should not interfere with the original Dev-Cpp project files.

    m_pProject->SetTitle(title);

    //I added these lines to get compiler options
    //for wxDevCpp as it has 2 Profiles MingW and
    //Visual C++
    dev->Read(_T("ProfilesCount"), &tmp, _T(""));
    if (!tmp.IsEmpty())
    {
        dev->SetPath(_T("/Profile1"));
        dev->Read(_T("ProfileName"), &tmp, _T(""));
        if (!tmp.IsSameAs(_T("MingW 3.4.2")))
            dev->SetPath(_T("/Profile2"));
    }

    dev->Read(_T("CppCompiler"), &tmp, _T(""));

after loading you still have to set Compiler and linker paths.
Title: Re: Importing Dev-Cpp project files from wxDevCpp with wxpack
Post by: stahta01 on February 06, 2007, 02:04:23 am
I would suggest submitting this as a patch at Berlios.

http://wiki.codeblocks.org/index.php?title=Creating_a_patch_to_submit_to_BerliOS_%28Patch_Tracker%29

Tim S