Menu

Getting started

jabberx

Getting started

\1. Download latest WinC+ package and updates if there is any new: https://sourceforge.net/projects/cplusminus/files/

\2. Unpack it to C:, so path will be C:\cpm\c+-.exe. You may unpack it to any other place but then you should edit paths in "make.bat" of your project.
If you're using Linux you probably should compile c+- parser by yourself (c+-source.tar) with g++ and you probably need linux versions of SDL, SDL_image, SDL_mixer, SDL_ttf and maybe SDL_net if you plan to use network and make.bat file isn't for you, you should read it and write your own shell script according to your system.
3. Create empty folder for your project anywhere.
4. Copy make.bat from C:\cpm\projects\pong to your project folder
5. Create folder named data inside your project folder
6. Open Programmers notepad editor C:\cpm\editor\pn.exe or any text editor you like.
7. write down this code:


#include \<lsdl>



int main ()

    print ( "Hello, world!" )

    pause ( 1000 )

    return 0





Leave blank line in the end. You should do this with every source file.

\8. Press Ctrl+S and save your file to your project folder as main.cpm
9. Now you can run make.bat manually, or close PNotepad and open it by double-clicking on main.cpm (associations should work now) and press F8 to run make.bat from PNotepad.
10. Notice that data folder now is filled with dlls and main.exe. There is also run.bat near make.bat. You can execute it by pressing F5 in PNotepad or run it manually (run.bat or main.exe).

As result of working program message "Hello, world!" should appear in command window for a second.


Related

Tutorials: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.