Need some basic help, please



  • Hello guys...

    Coming from the Javafolks I am quite a n00b in c++. Hope you may help me out anyway...
    In fact I need to understand some real basics ... i.e. what the difference in the various compilers are and if -in general- it is possible to compile any c++ project (lets say win32) with any win 32 compiler.

    Here is my problem.
    Coming from the Java Community I am used to Eclipse which is a great IDE IMO. Was looking for something similar for the C++ project and decided to try out the C++ Developer Toolkit for Eclipse (no, I wont ask CDT specific questions... ease up, buddy ;o) ).
    The C++ project I am working on is quite a big VC98 project. VC uses the compiler (cl.exe) from its bin directory and compiles the whole stuff with no errors and no warnings-- perfect. The only way to export the project. so I can use it instantly in Eclipse was to export the makefiles within Visual C. So far so good.
    Using the VC tool nmake with these makefiles, I can compile with no problem.

    Unfortunatly Eclipse is 1. designed to use a gnu compiler (it generates command line switches not applicaple for the ms compiler and stuff)
    2. does not let you specify your own makefiles but generates them itself.

    Well.. not too bad. But using the Microsoft nmake with the generated makefiles from eclipse doesnt work as nmake does not understand the gnu makefile syntax. (vice verca using the mingw32-make with the VC makefiles, doesnt work either).
    So I used the MinGW32-make with the eclipse makefiles (I just had to setup it within eclipse as make command). As compiler I setup the MinGw compiler.

    As for the makefile parsing, this worked fine, but obviously the Mingw compile cannot compile the source ... telling something from invalid declarations, multiple declaration errors and stuff. Hmpf.

    So I tried to setuo the VC compiler (cl) within eclipse. So now I was using the mingw32-make.exe to parse the makefiles and the VC compiler for compiling 😃 Btw, which compiler is to be invoked is written to the makefiles-- guess you know. Anyhow.... the VC compiler had issues with some of the headerfiles from mingew/include. So I changed the include path to VC98/include.

    Still the VC compiler could not understand some commandline switches generated to the makefiles by eclipse because eclipse uses the gnu compiler syntax. ...most important options seemed to be compatible, though.

    The VC compiler got really further ahead and eventually touched the project source, but aborted with the first file saying there were ")" missing before ";" and such shit.

    Besides I don't really want to use the VC compiler if not neccessary. So here are some questions for you:

    -- What is GNU ? (no, please dont burn me now)
    -- Should it be possible in general to compile a directX VC project with a gnu compiler such as mingw32 ?
    -- Anyone knows a better way of importing an complex VC98 project into ecipse? (okay, thatone was CTD specific :p)
    -- All I am after is an IDE for C++ which is equal as good as eclipse for java. In the meantime I realized that this obviously isnt possible (although I dont understand the reasons behind it). Even the CDT does not offer some kind of hirarchy browser and sometimes it even says to could not find any references eventhough there are some.... so does VC98. "No deklaration found" "No references found" ...sometimes it works, though. I am dissapointed overall. How can you C++ guys work with such stuff ??? I might try VC7.1 maybe thats better.... and would get me around the porting between differnt compilers. I suppose VC 7.1 simply could open/import the 6.0 workspace, eh ?
    What IDE do you guys use ?? What is best ? Maybe someone using CDT ?
    And how ever used eclipse for java ? If so, why is ther nothing similar for C++ ?

    For give me guys,
    I just need to get into it. The language as such is not as problematic but these basics around IDEs, makefiles and compilers really are a bit of a mystery to me. So is why a C++ compier often spits out weird errors of missing "(" or invalid syntax eventhough nothing is wrong actually.

    You know-- Java is like Lego . You just use whats there and build on it. Easy -- no stress. C++ is sort of true programming, more complex obviously.

    Please light me up,
    thanx you



  • uhm... our problems about

    ...telling something from invalid declarations, multiple declaration errors and stuff.

    when using a makefile for a gnu-compiler sounds like something's a bit wrong with your makefile (or maybe your compiler isn't set up properly and can't find some of the standard-libraries' headers... can't tell without seeing the error-msg)....

    - What is GNU ? (no, please dont burn me now)

    1. GNU is an organisation aiming at providing Free Software... check out www.gnu.org for details, the story's way to complex to explain here... Besides, GNU was involved heavily (and of course still is) in the development of Linux (if you've ever heard of that one)

    -- Should it be possible in general to compile a directX VC project with a gnu compiler such as mingw32 ?

    never did that myself, but AFAIK it should work... But remember that both VC and DirectX are from Microsoft and therefore ment to be used together

    -- Anyone knows a better way of importing an complex VC98 project into ecipse? (okay, thatone was CTD specific :p)

    dunno 😉 never used Eclipse 😉

    How can you C++ guys work with such stuff ??? I might try VC7.1 maybe thats better.... and would get me around the porting between differnt compilers. I suppose VC 7.1 simply could open/import the 6.0 workspace, eh ?
    What IDE do you guys use ?? What is best ? Maybe someone using CDT ?
    And how ever used eclipse for java ? If so, why is ther nothing similar for C++ ?

    VC7 surely is a better IDE. And so is the compiler it contains (it's more C++ Standard compilant), and yes, you can simply import VC6 - Projects in it (altough I never tried myself)

    About the IDE... some great Freeware IDEs for Windows using MinGW can be found at

    www.bloodshed.net - the "Dev Cpp"
    www.parinya.ca - the MinGW Development Studio

    but note that both are Freeware-Projects and therefore lack some features professional IDEs offer. Insofar they're probably not nearly as good as Eclipse is for Java....

    BTW: this forum is mostly german, you may want to look for a forum in english that fits your needs, because using this forum you loose the possibility to read, understand and learn from other threads posted here 🙂



  • Hahahaha -- das passiert mir immer wieder !!!

    Bin normalerweise auf englischen foren unterwegs und da ist die Englischschreiberei wohl zur Gewohnheit / zum Reflex geworden. LOL.

    Ich werd mir am Wochenende mal das VC 7.1 anschauen--- schätze das wird mir einige Kopfschmerzen sparen.

    Ein transfer des VC 6.0 Projektes nach eclipse ist schon aus dem Grund schwierieg das Eclipse die makefiles selbst generiert und man nicht diejenigen von VC 6.0 benutzen kann. Natürlich kann eclipse auch keinerlei Workspace Dateien importieren.

    Erschwert wird das ganze dann weiter dadurch, das die generierten Makefiles von Eclipse nicht vom VC nmake gelesen werden können und Eclipse auch sonst auf die Verwendung von gnu compilern ausgelegt ist.

    Das heisst, neben der IDE muss man auch maketool, compiler und linker switchen und alle Makefiles für die gesamte Projektstruktur müssen neu generiert werden.

    Vielleicht geht es irgendwie.... aber ich bezweifle es sogar. Da werden auch files aus dem DirectX SDK benötigt. Das ist alles microsoft spezifisches Zeug und ich bezweifle irgendwie das der MinGW compiler das überhaupt compilieren würde-- unterverwendung des mingew include pfades anstatt des VC/include pfades für die Standardsachen.

    Naja... wie gesagt. Vielleicht gebe ich mich mit VC7.1 einfach zufrieden und spare mir den Ärger 🙂



  • Hornet schrieb:

    Hahahaha -- das passiert mir immer wieder !!!

    Bin normalerweise auf englischen foren unterwegs und da ist die Englischschreiberei wohl zur Gewohnheit / zum Reflex geworden. LOL.

    Spasti



  • @Moderatoren: Bitte vorhergehenden Post löschen, der ist ja menschenverachtend.



  • aber wahr...



  • ???


Anmelden zum Antworten