D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] C++ Questions?

 

Hi

I am wanting to be able to create a GUI app that would compile in any OS 
(Linux,Mac and Windows),
so i am wanting to code in generic style code and not have licencing issues.

What are your views on wxWidgets, SQLite?
What could i use to create nice looking reports? (fop, pdf, xsl?)

i have started to use wxdevcpp on my XP machine which i find OK,
But i can get my hands on a Borland 5 C++ builder.

What would you recommend for windows or Linux multiple language support? 
Eclipse? codeblocks? and how would i do this (text file.db?)?

>>From some of the books i have it looks like the .h file contents syntax are 
different on Windows and Linux.

If i coded in linux, would the windows version be easier to compile from the 
linux source?

If you had areas of code that related to certain OS i.e / \ in paths and 
system calls, would you use namespace's ?

Does anyone know of any evening classes that would cover generic C++ 
programming and not the latest .NET versions. I am in Axminster area.

Thanks again for all your tips and advise.

Regards

Sam

----- Original Message ----- 
From: "Anthony Williams" <anthony@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
To: <list@xxxxxxxxxxxxx>
Sent: Wednesday, March 18, 2009 8:05 AM
Subject: Re: [LUG] C++ Questions?


> At Tue 17 Mar 2009 20:42:13 UTC, Sam Grabham <sam@xxxxxxxxxxxxxxxxx> 
> wrote:
>
>> I have started reading a 600 page book on C++ , but i haven't found
>> answers to the following:
>>
>> In C++ how should you use and include resource file (.rc) for multi
>> lang support for a GUI support?
>
> .rc files are Windows-specific. If you include copies of the same
> resources in different languages then Windows will choose the one
> appropriate for the current system language when the resource is
> loaded into the app.
>
> On linux, the mechanism for resources and multiple language support
> depends on your GUI toolkit.
>
>> In the books i have been reading the examples show all classes and
>> functions all on one .cpp file.
>>
>> In VB you would use lots of .bas files for all your extra common
>> code and recycle the code in other projects.
>>
>> How should you structure code for easier coding? would you use
>> another . cpp file and prototye the functions in the main.cpp file.
>
> Divide code into separate files based on the responsibilities
> represented. A reasonable guideline to start with is one class => one
> .h/.cpp pair.
>
> Put all your declarations in .h files rather than prototyping them in
> your .cpp files. Then when you need to use the class or functions in
> another .cpp file you can just #include the .h file.
>
>> How would you create GUI user controls like grids that get reused
>> again and again (ocx ?) .
>
> You can write an OCX in C++ too. It's not something I'd recommend for
> beginners though, as it's quite complex.
>
>> When would you create a .h file?
>
> When you have declarations of classes or functions that need to be
> used from more than one .cpp file.
>
>> are the compiled object files the same as dll's?
>
> No. Each .cpp file compiles into a single object file (.obj). DLLs are
> linked from compiled object files the same way as a complete EXE. DLLs
> may "export" functions which can then be used by other DLLs or EXEs
> which "import" the functions from that DLL.
>
>> and can you ref them into you compiled exe, In Lunix or windows?
>
> That's the whole point of DLLs --- you use them from your EXEs. You
> use DLLs for three purposes:
>
> * reuse the same code in multiple apps,
> * as plugins to enable extra functionality after the app is built
> (e.g. photoshop plugins)
> * to separate discrete chunks of an application that can be changed
> and rebuilt separately.
>
> Linux has "Shared Object" .so files instead of DLLs. The process is
> similar to DLLs --- compile some object files (.o on linux) and link
> to a .so. The .so can then be loaded into an executable program in
> order for the program to use the functions from the .so file.
>
> Anthony
> -- 
> Anthony Williams
> Author of C++ Concurrency in Action | http://www.manning.com/williams
> just::thread C++0x thread library   | http://www.stdthread.co.uk
> Custom Software Development         | 
> http://www.justsoftwaresolutions.co.uk
> Just Software Solutions Ltd, Registered in England, Company Number 
> 5478976.
> Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK
>
>
>
> -- 
> The Mailing List for the Devon & Cornwall LUG
> http://mailman.dclug.org.uk/listinfo/list
> FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html


--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.238 / Virus Database: 270.11.18/2009 - Release Date: 03/18/09 
07:17:00


-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html