C++ and wxWidgets questions?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
LoneRanger
In need of some credit
In need of some credit
Posts: 2
Joined: Tue Aug 11, 2015 6:37 pm

C++ and wxWidgets questions?

Post by LoneRanger » Tue Aug 11, 2015 7:15 pm

I'm an experienced Programmer/Analyst and fluent in several languages. I'm new to C++ and wxWidgets.

I noticed that Audacity was written using wxWidgets.

I've got a project that involves .wav audio files. I need to evaluate 16bit .wav files for amplitude and be able to parse out sections of the .wav files and create new files of the selected sub-sections, based on amplitude.

Do you know if I will be able to use wxWidgets with Microsoft visual studio Express C++? Or is there some other free C++ compiler that I will need for my project? Or does wxWidgets give me everything I will need, including an IDE?

User avatar
T-Rex
Moderator
Moderator
Posts: 1198
Joined: Sat Oct 23, 2004 9:58 am
Location: Zaporizhzhya, Ukraine
Contact:

Re: C++ and wxWidgets questions?

Post by T-Rex » Tue Aug 11, 2015 8:26 pm

Free Visual Studio 2015 Community Edition (and other free versions of Visual Studio) supports wxWidgets. So you can develop the apps using C++/wxWidgets without any payments to MS.
If it comes to WAV file processing then this task should be performed using 3rd-party library, you probably can reuse the pieces of code from Audacity or use the same 3rd-party libs as Audacity uses. There are also several samples of wave file processing at http://codeproject.com as far as I remember.

LoneRanger
In need of some credit
In need of some credit
Posts: 2
Joined: Tue Aug 11, 2015 6:37 pm

Re: C++ and wxWidgets questions?

Post by LoneRanger » Tue Aug 11, 2015 8:37 pm

Thanks T-Rex,

That tells me a lot. That's a good suggestion about taking a peek at Audacity's libraries and code... I'll check out codeproject too! :D

User avatar
whoops
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sat Jun 27, 2015 5:53 am
Location: China

Re: C++ and wxWidgets questions?

Post by whoops » Wed Aug 12, 2015 1:54 am


hi, LoneRanger, i'm using Microsoft Visual Studio C++ Express 2010 to build wxWidgets
there are several ways to configure Microsoft Visual Studio C++ Express:

1) set the "Environment Varibles"
set a new "System Varible",
Name: wxMSW28x
Value: C:\wx\wxWidgets2.8-MSVC (change it to yours)

2) save the following file to "wxDebugModeFor2.8.x.props" (its name indicate that it's a "Project Property File")

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ImportGroup Label="PropertySheets" />
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup>
    <GenerateManifest>false</GenerateManifest>
    <IncludePath>$(wxMSW28x)\include;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <ItemDefinitionGroup>
    <ClCompile>
      <AdditionalIncludeDirectories>$(wxMSW28x)\include;$(wxMSW28x)\include\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <WarningLevel>EnableAllWarnings</WarningLevel>
    </ClCompile>
    <Link>
      <AdditionalLibraryDirectories>$(wxMSW28x)\lib\vc_lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
      <AdditionalDependencies>wxbase28ud_net.lib;wxmsw28ud_html.lib;wxbase28ud_xml.lib;wxmsw28ud_adv.lib;wxmsw28ud_aui.lib;wxmsw28ud_media.lib;wxmsw28ud_qa.lib;wxmsw28ud_richtext.lib;wxmsw28ud_xrc.lib;wxmsw28ud_core.lib;wxbase28ud.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
  </ItemDefinitionGroup>
  <ItemGroup />
</Project>
<!-- Properties For wxWidgets 2.8.x in MSVC(Express) 2010 Debug Mode :-) -->
3) save the following file to "wxReleaseModeFor2.8.x.props"

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ImportGroup Label="PropertySheets" />
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup>
    <IncludePath>$(wxMSW28x)\include;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <ItemDefinitionGroup>
    <Link>
      <AdditionalDependencies>wxbase28u.lib;wxbase28u_net.lib;wxbase28u_xml.lib;wxexpat.lib;wxjpeg.lib;wxmsw28u_adv.lib;wxmsw28u_aui.lib;wxmsw28u_core.lib;wxmsw28u_html.lib;wxmsw28u_media.lib;wxmsw28u_qa.lib;wxmsw28u_richtext.lib;wxmsw28u_xrc.lib;wxpng.lib;wxregexu.lib;wxtiff.lib;wxzlib.lib;winmm.lib;comctl32.lib;rpcrt4.lib;wsock32.lib;oleacc.lib;%(AdditionalDependencies)</AdditionalDependencies>
      <AdditionalLibraryDirectories>$(wxMSW28x)\lib\vc_lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    </Link>
    <ClCompile>
      <AdditionalIncludeDirectories>$(wxMSW28x)\include;$(wxMSW28x)\include\msvc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <WarningLevel>EnableAllWarnings</WarningLevel>
      <Optimization>Full</Optimization>
    </ClCompile>
  </ItemDefinitionGroup>
  <ItemGroup />
</Project>
<!-- Properties For wxWidgets 2.8.x in MSVC(Express) 2010 Release Mode :-) -->
4) add a project, and add two propertiy files to "Debug | Win32" and "Release | Win32" in "Property Manager"

BTW, i'm recommand you to using MSVC(Express) to build wxWidgets, it's somewhat better than Code::Blocks and CodeLite,
but in later period, you may draw the frame and dialog in C::B, and copy the code in MSVC(Express).
but it's only a piece of advice... i wish it hopeful to you :-)
[/size]
 Things being equal, the simplest explanation tends to be the right.

 [ Windows 7 Ultimate x64 | wxWidgets 3.0.2 | Microsoft Visual C++ 2010 Express ]

Post Reply