http://groups.google.com/group/comp.lang.c++?hl=en
comp.lang.c++@googlegroups.com
Today's topics:
* Difference between Windows and Linux GCC compiler - 7 messages, 5 authors
http://groups.google.com/group/comp.lang.c++/t/f432fafbea7d806a?hl=en
* SSO - 3 messages, 2 authors
http://groups.google.com/group/comp.lang.c++/t/77f7c1c9190e45a7?hl=en
* heap corruption - 2 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/e5e84babc84c5ddc?hl=en
* ⊙^⊙===2009 New Summer Suprise price wholesale Versace,Gucci,DG,LV,DB,Coach,
Chanel Purses, fashion&the best quality with low price===www.fjrjtrade.com - 1
messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/e68e1501ec960ab6?hl=en
* question on vector<char>::difference_type - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/0887bb3c0dd6545e?hl=en
* New release of the Dynace OO extension to C - 2 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/ee8689156295093c?hl=en
* How can I use unqualified names? (Possibly hard or impossible?) - 4 messages,
2 authors
http://groups.google.com/group/comp.lang.c++/t/e2f24a95fe72b591?hl=en
* Handbags supplier ¤www.toptradea.com¤ Lady Handbags Juicy,Gucci,LV,Prada,D&G,
Edhardy,Chanel,Coach, Jimmy-Hoo,Burberry,DB ┈━◆→ - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/1611f0aa4020b3e8?hl=en
* ┈━♥◎♥→wholesale Iphone,Nokia,Samsung,Blackberry,etc brand mobile phones, TV
mobiles,Music Mobiles, Touch Mobiles, Dual sim card dual standby Chinese
mobile phones <www.toptradea.com> - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/515573a0f39453f2?hl=en
* strcpy vs memcpy - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/71a5945deead500c?hl=en
* Printing the last item of a structure twice - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/9fd75392aae26667?hl=en
* ★★★★★HOT !!!! Discount NFL jerseys MLB jerseys NHL jerseys Wholesale Free
shipping (paypal payment www.dotradenow.com) - 1 messages, 1 author
http://groups.google.com/group/comp.lang.c++/t/236347b665b3704c?hl=en
==============================================================================
TOPIC: Difference between Windows and Linux GCC compiler
http://groups.google.com/group/comp.lang.c++/t/f432fafbea7d806a?hl=en
==============================================================================
== 1 of 7 ==
Date: Thurs, Jul 30 2009 10:50 pm
From: Ian Collins
Rayne wrote:
> Hi all,
>
> I'm interested to know what is the difference in programming using MS
> Visual C++ on Windows and using the GCC compiler on Linux, i.e. what
> are some of the things I can do on Visual C++ that won't compile/run
> on Linux, and vice versa.
>
> For example, I know that Windows uses the LLP64 model, while Linux
> uses the LP64 model, so I can't use the long long data type when
> programming on Linux.
Where did you get that idea from?
All the models do is specify the size longs and pointers. long long is
part of the C standard.
> Also, the windows.h file is only available in
> Windows, and can't be used on Linux.
What use would it be on anything other than windows?
> I've also read that there is also
> some differences in network programming, since winsock, and especially
> the underlying ip headers are much different in Windows than Unix/
> Linux gcc. Is this true?
Not really. Once you get past initialisation, there's not a lot of
difference and socket level code is pretty portable between platforms.
This isn't really the place to ask, you have more luck asking windows
questions on a windows group and Unix ones on comp.unix.programmer.
--
Ian Collins
== 2 of 7 ==
Date: Fri, Jul 31 2009 2:16 am
From: James Kanze
On Jul 31, 7:50 am, Ian Collins <ian-n...@hotmail.com> wrote:
> Rayne wrote:
[...]
> > I've also read that there is also some differences in
> > network programming, since winsock, and especially the
> > underlying ip headers are much different in Windows than
> > Unix/ Linux gcc. Is this true?
> Not really. Once you get past initialisation, there's not a
> lot of difference and socket level code is pretty portable
> between platforms.
> This isn't really the place to ask, you have more luck asking
> windows questions on a windows group and Unix ones on
> comp.unix.programmer.
Which raises an interesting question: where do I ask about
portable socket code? Either about what portable libraries
might exist (I'd say that could be asked here), or since you
mention that much is pretty portable, about that portable part?
(I don't think that belongs here, but I don't know where else to
send someone.)
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
== 3 of 7 ==
Date: Fri, Jul 31 2009 2:48 am
From: Ian Collins
James Kanze wrote:
> On Jul 31, 7:50 am, Ian Collins <ian-n...@hotmail.com> wrote:
>> Rayne wrote:
>
> [...]
>>> I've also read that there is also some differences in
>>> network programming, since winsock, and especially the
>>> underlying ip headers are much different in Windows than
>>> Unix/ Linux gcc. Is this true?
>
>> Not really. Once you get past initialisation, there's not a
>> lot of difference and socket level code is pretty portable
>> between platforms.
>
>> This isn't really the place to ask, you have more luck asking
>> windows questions on a windows group and Unix ones on
>> comp.unix.programmer.
>
> Which raises an interesting question: where do I ask about
> portable socket code? Either about what portable libraries
> might exist (I'd say that could be asked here), or since you
> mention that much is pretty portable, about that portable part?
> (I don't think that belongs here, but I don't know where else to
> send someone.)
c.u.p is fairly tolerant, there used to be a lot more interesting
networking questions there than we see today.
I've written a number of portable networking applications and the
differences between WinSock and "normal" BSD sockets is minimal.
I don't know of a specific network programming group.
--
Ian Collins
== 4 of 7 ==
Date: Fri, Jul 31 2009 2:57 am
From: pjb@informatimago.com (Pascal J. Bourguignon)
James Kanze <james.kanze@gmail.com> writes:
> On Jul 31, 7:50 am, Ian Collins <ian-n...@hotmail.com> wrote:
>> Rayne wrote:
>
> [...]
>> > I've also read that there is also some differences in
>> > network programming, since winsock, and especially the
>> > underlying ip headers are much different in Windows than
>> > Unix/ Linux gcc. Is this true?
>
>> Not really. Once you get past initialisation, there's not a
>> lot of difference and socket level code is pretty portable
>> between platforms.
>
>> This isn't really the place to ask, you have more luck asking
>> windows questions on a windows group and Unix ones on
>> comp.unix.programmer.
>
> Which raises an interesting question: where do I ask about
> portable socket code?
To google of course!
> Either about what portable libraries
> might exist (I'd say that could be asked here), or since you
> mention that much is pretty portable, about that portable part?
> (I don't think that belongs here, but I don't know where else to
> send someone.)
comp.programming
be.comp.networking ch.network clari.tw.computers.networking
cmh.network cruzio.network cu.courses.csci-networks cuug.networking
dsm.network fido7.ru.networks kw.networks memphis.networking
okinawa.networks osu.network relcom.fido.ru.networks slac.networks
tw.bbs.comp.network um.network uw.network uwo.ssc.network
vmsnet.networks.misc
--
__Pascal Bourguignon__
== 5 of 7 ==
Date: Fri, Jul 31 2009 3:15 am
From: "Ron AF Greve"
Hi,
You can write completely portable code for sockets. The difference is that
windows in addition to the 'regular' calls for sockets also has some special
stuff that integrates with windows itself. For instance normally you would
create a bunch of sockets and start listening on them. In a single threaded
app that means it wouldn't respond to windows messages . So windows added
its own sockets to remedy that problem. However you just use the portable
sockets all you have to do is start it in a separate thread and let the main
thread handle the message queue while the separate thread will do a
(blocking or blocking with certain timeout) 'select()' on the portable
sockets. My network code works on various unix/linux as well as on windows
without problems.
Well having that said, I had a quick look in my code and there are some very
minor differences (not sure if they are actually necessary).
To get the error code
#ifdef WIN32
ErrorCode << Error << " " << WSAGetLastError();
#else
ErrorCode << Error << " " << strerror( errno );
No comments:
Post a Comment