A good knowledge of C++.. but what now?

  • orendr7500
    6th Sep 2015 Member 1 Permalink

    i have been learning C++ already for 3 months ( and yes, i dont say its SO long, or even a EXPERT. )

    1. i love it so far, although, i dont know if i should learn SQL server's OR to start learning SDL, i want a answer from an experienced c++ programmer.

    2. the IDE im using, Visual Studio Community 2015, when i make an console application and after i "finish" it, i want to test it on my laptop, it wont work, because some .dll is missing, i download that .dll and put it in the folder, and there is an different error that can't be fixed. do i need to install some sort of a thing on that laptop so it will work?

     

    3. if the official creator reads this, what IDE do you recommend to use?

     

    thanks for answering..

    Edited once by orendr7500. Last: 6th Sep 2015
  • boxmein
    6th Sep 2015 Former Staff 0 Permalink
    I Am Not A @Ximon but:

    (1) SQL Server sounds pretty meaningless unless you actually plan on programming with it - as with all software libraries. Learn them when you need to.

    (2) The Microsoft Visual Studio C/++ Runtime you built against is missing on the target machine. The one you packaged and moved onto your laptop was named right but was the wrong DLL. (either it was the wrong architecture or just entirely wrong).

    I'd suggest you slap the C/++ runtime onto the end of the EXE file by statically linking it, but alternatively you can just figure out which of the DLLs you exactly need and package it along with the EXE file. Do this:

    Project -> Properties -> Configuration Properties -> C/C++ -> Code Generation. Set the Runtime Library to /MT or Multithreaded (without DLL!). Press OK.

    (3) Visual Studio is a pretty awesome in my opinion, but I'd suggest you try compiling something from the command line alone too - no Code Projects and Graphical Interfaces, just you and the keyboard against the world. I suggest you install MinGW and use gcc to learn how to build on the command line, because that experience will apply on both Linux and OSX (even clang has a similar command line interface!)

    Also, when you want to work on TPT, it's wise to use the compilation script that comes with it, which uses MinGW/gcc by default.
  • orendr7500
    6th Sep 2015 Member 0 Permalink

    @boxmein (View Post)

     

    hmm, thanks for all the info, 

    but about this sentence:

    I suggest you install MinGW and use gcc to learn how to build on the command line.

    i never worked with a compiler, i think VS Is good enough for me currently.

    BUT , i just did the thing you said:

    Project -> Properties -> Configuration Properties -> C/C++ -> Code Generation. Set the Runtime Library to /MT or Multithreaded (without DLL!). Press OK.

    after i did that , ALL my code was in strange error, i switched back the setting, it was working again

    why does this happend?

     

    Edited once by orendr7500. Last: 6th Sep 2015
  • mniip
    6th Sep 2015 Developer 0 Permalink
    @orendr7500 (View Post)
    For future reference, whenever a "strange error" happens, you usually copy-paste the error text, and other relevant information. It's very hard to guess what caused this, without an error message.
  • orendr7500
    6th Sep 2015 Member 0 Permalink

    @mniip (View Post)

     oh really mate?,

    well, its not ONE error,

    its about.. hmm, TONS OF THEM, you want 3 pages full of errors?

  • jacob1
    6th Sep 2015 Developer 0 Permalink
    @orendr7500 (View Post)
    You can post them on http://pastebin.com

    Compiling statically on visual studio is hard though, i've never gotten it working fully. It always still requires at least one dll (or the visual studio redistributable).
  • orendr7500
    6th Sep 2015 Member 0 Permalink

    @jacob1 (View Post)

     then what have you used? what IDE?

    just MinGW?

    Edited once by orendr7500. Last: 6th Sep 2015
  • jacob1
    6th Sep 2015 Developer 0 Permalink
    @orendr7500 (View Post)
    No, I usually use visual studio on windows. And then I follow the setup guide for TPT in the wiki. I don't really use visual studio for anything else.
  • orendr7500
    6th Sep 2015 Member 0 Permalink

    @jacob1 (View Post)

     ah, ok. 

    ill guess ill start learning SDL! :D

  • boxmein
    7th Sep 2015 Former Staff 0 Permalink
    @orendr7500 (View Post)
    Well, go do that I guess.

    @orendr7500 (View Post)
    >> I suggest you install MinGW and use gcc to learn how to build on the command line.
    > i never worked with a compiler, i think VS Is good enough for me currently.


    Visual Studio secretly uses the Microsoft Visual C++ Compiler (MSVC). You're still interfacing with a compiler and build scripts, except the difference is that it's so transparent it seems like magic. It would be wise to try and compile something by hand in order to understand the process of compilation and linking and the various errors that can happen during those. Besides, sometimes doing the bare minimum needed is a really good way to learn about what kind of fluff Visual Studio adds to your build process.