Click here to Skip to main content
15,888,016 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: problem with tamplate deque Pin
a1_shay28-May-12 18:32
a1_shay28-May-12 18:32 
QuestionRe: problem with tamplate deque Pin
David Crow28-May-12 16:58
David Crow28-May-12 16:58 
QuestionHow to integrate cxxTest with Visual Studio IDE Pin
rajKR1227-May-12 19:14
rajKR1227-May-12 19:14 
AnswerRe: How to integrate cxxTest with Visual Studio IDE Pin
Aescleal28-May-12 5:25
Aescleal28-May-12 5:25 
GeneralRe: How to integrate cxxTest with Visual Studio IDE Pin
rajKR125-Jun-12 19:03
rajKR125-Jun-12 19:03 
QuestionCross Platform Development Pin
AmbiguousName27-May-12 0:49
AmbiguousName27-May-12 0:49 
AnswerRe: Cross Platform Development Pin
enhzflep27-May-12 6:16
enhzflep27-May-12 6:16 
AnswerRe: Cross Platform Development Pin
Aescleal28-May-12 5:06
Aescleal28-May-12 5:06 
Writing a platform independent library is fairly easy - don't use any features of the OS' you're targeting and don't make any assumptions about data sizes, object layout and anything else that the standard says is undefined.

If you're happy developing on Windows then don't bother with an IDE for Linux. Do all your development on Windows, checking at least once a day that everything builds using gcc. When I do cross platform development I use VC++2010 and gcc from mingw to make sure it builds. I've yet to write code I intended to be portable that didn't run on Linux that compiled on gcc from mingw.

For controlling the build I'd suggest one of three things:

- If your library is really small stick the g++ command line in a shell script and run that. Really small is a couple of source files.

- If your library is a bit bigger then write a makefile. mingw comes with two versions of make, both of which have (for simple projects) the same behaviour on Linux. I'd use this for libraries up to about 20 source files that you only want to build and run on a couple of platforms

- If your library is effing huge (10s of source files) and you want it to build and run on just about every Unixy platform on the planet use GNU autotools[^]. This is a set of (rather complicated) but very flexible tools that by writing a couple of simple files lets you build, test and run your code on loads of different platforms. I've used them to run code code I wrote on VC++ for windows on Linux, FreeBSD (both 32 and 64 bit) and Solaris.

Whatever you use I'd suggest eventually looking at the autotools if you ever want to do any cross platform stuff. They're pretty ubiquitous in the GNU world - whenever you ./config a package on Linux you're using them.

Oh, one thing I forgot to mention up top... If you need stuff usually supplied by the OS have a dig around for a library that already does it. Three libraries I use a lot are boost [^](it's a test bed for new libraries that might be standardised one day and has sorts of useful stuff - I've used it for date/time, filesystem support, threads, interprocess comms, shared and unique pointers before were in the standard), OpenSSL [^](all your crypto needs admittedly with the most bent interface you've ever seen) and libcurl [^](everything for HTTP/FTP/GOPHER client development).
QuestionApplication Watchdog Pin
Richard Andrew x6426-May-12 16:43
professionalRichard Andrew x6426-May-12 16:43 
AnswerRe: Application Watchdog Pin
«_Superman_»26-May-12 17:30
professional«_Superman_»26-May-12 17:30 
GeneralRe: Application Watchdog Pin
Richard Andrew x6426-May-12 17:42
professionalRichard Andrew x6426-May-12 17:42 
AnswerRe: Application Watchdog Pin
Ashish Tyagi 4029-May-12 19:41
Ashish Tyagi 4029-May-12 19:41 
QuestionTask Manager Pin
Bram van Kampen26-May-12 12:46
Bram van Kampen26-May-12 12:46 
AnswerRe: Task Manager Pin
Randor 26-May-12 13:07
professional Randor 26-May-12 13:07 
AnswerRe: Task Manager Pin
«_Superman_»26-May-12 17:23
professional«_Superman_»26-May-12 17:23 
GeneralRe: Task Manager Pin
Bram van Kampen27-May-12 4:44
Bram van Kampen27-May-12 4:44 
QuestionUsing namespace in VC6.0 ? Pin
Vaclav_26-May-12 6:53
Vaclav_26-May-12 6:53 
AnswerRe: Using namespace in VC6.0 ? Pin
jschell26-May-12 7:32
jschell26-May-12 7:32 
AnswerRe: Using namespace in VC6.0 ? Pin
Chris Losinger26-May-12 8:23
professionalChris Losinger26-May-12 8:23 
AnswerRe: Using namespace in VC6.0 ? Pin
Vaclav_26-May-12 14:51
Vaclav_26-May-12 14:51 
GeneralRe: Using namespace in VC6.0 ? Pin
Chris Losinger26-May-12 17:48
professionalChris Losinger26-May-12 17:48 
GeneralRe: Using namespace in VC6.0 ? Pin
Vaclav_26-May-12 18:32
Vaclav_26-May-12 18:32 
GeneralRe: Using namespace in VC6.0 ? Pin
Chris Losinger27-May-12 3:02
professionalChris Losinger27-May-12 3:02 
AnswerRe: Using namespace in VC6.0 ? Pin
Aescleal26-May-12 20:53
Aescleal26-May-12 20:53 
GeneralRe: Using namespace in VC6.0 ? Pin
Vaclav_26-May-12 23:50
Vaclav_26-May-12 23:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.