.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Programming
General Programming Help others and get yourself helped here!

Reply
 
Thread Tools
Re: Misc C++ things I have trouble understanding
Old
  (#11)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Misc C++ things I have trouble understanding - 03-04-2004

Well there's a checkbox in your project settings...
it's called "disable compiler extensions", I think...



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: Misc C++ things I have trouble understanding
Old
  (#12)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: Misc C++ things I have trouble understanding - 03-04-2004

i haven't checked out all the options in MSVC6 yet cuz i recently moved to GNU/Linux and I just decided to use gcc on both to make life simpler
  
Reply With Quote
Re: Misc C++ things I have trouble understanding
Old
  (#13)
koraX
Member
 
koraX's Avatar
 
Status: Offline
Posts: 145
Join Date: Jan 2004
Location: Slovak Republic
Default Re: Misc C++ things I have trouble understanding - 03-04-2004

Quote:
Originally Posted by botmeister
This is nuts, must be Microsoft's way of locking you in. I recommend you use another compiler unless you don't care.
MSVC can be configured to work correctly (to support and compile ANSI standard code), but defaultly it adds Microsoft's shite (like precompiled headers and all that strange thing that Appwizard adds).
I'm using it, because I'm familiar with editor and it is easy to code in it (for me).

Also MSVC 6.0 added less microsoft's incompactible stuff than .NET

I'm working now on some program that has to run under linux, and using editors other than Visual studio would slow me down. So far, I 'encountered' these problems :
- MSVC adds #pragma once in header files, which is obsolete. G++ compiles without problems, but It is better to use #ifndef ... #define ... #endif
- MSVC uses precompiled header shite, and I had to change #include "StdAfx.h" to #include "stdafx.h" cause of case sensitivity on linux systems
- If you create a new class in Classview, the files MSVC creates are case sensitive so I had to covert them to lovercase. (#include "something" was lowercase ->OK)
- However, MSVC typed #include ".\something.h" so I had to change it to #include "something.h"
- MSVC .NET included <tchar.h> and added lot of shite like _tmain, and _tchar. It is UNICODE support and it is not ANSI standard imo, so I couldn't compile it under g++. I had to change _tmain to main and _TCHAR to char. ALso I had to remove #include <tchar.h> from stdafx.h
- If you change precompiled header (stdafx.h), it is pain to compile program in MSVC, 'cause MSVC forgets to compile it. You have to go to project properties and somewhere there under C++ tab, you must choose compile precompiled headers

after all those changes, code compiles well under linux, and program runs perfectly (I had to create makefile, indeed).

Also to note that if you srand(0) under windows and linux, it gives you another set of random numbers

After all these problems, I still use MSVC, cause I often do MFC programs under windows and MSVC .NET has some nice features like outlining and task list


kXBot
koraX's utils
- see my homepage for other projects (OpenGL CSG Editor, FAT16 Sim, NNetwork Sim, ...)
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com