Page 2 of 2

Re: Writing the first ReactOS application.

Posted: Thu Apr 28, 2011 3:06 am
by vicmarcal
Which command are you using to compile the .c file?
In the screenshot seems you are using "g++ cfilename.c", correct use is "makex cfilename"

Re: Writing the first ReactOS application.

Posted: Thu Apr 28, 2011 2:49 pm
by Qrchack

Code: Select all

C:\Users\Guest\Downloads\ReactOS-0.3.13-REL-src\ReactOS-0.3.13\base\setup\firstapp> makex firstapp.c
make.exe: Nothing to be done for 'firstapp.c'.

Total Build Time: 00:00:00

Re: Writing the first ReactOS application.

Posted: Thu Apr 28, 2011 3:03 pm
by Saibamen
Must be "make firstapp".

Re: Writing the first ReactOS application.

Posted: Thu Apr 28, 2011 7:56 pm
by Qrchack

Code: Select all

C:\Users\Guesst\Downloads\ReactOS-0.3.13-REL-src\ReactOS-0.3.13\base\setup\firstapp>make firstapp
cc     firstapp.c     -o firstapp
process_begin: CreateProcess(NULL, cc firstapp.c -o firstapp, ...) failed.
make (e=2): Couldn't find specified file
make.exe: *** [firstapp] Error 2
'Couldn't find specified file' - here was 'Nie można odnaleźć określonego pliku' - translated to English

Re: Writing the first ReactOS application.

Posted: Thu Apr 28, 2011 8:14 pm
by Saibamen
Location should be "C:\Users\Guesst\Downloads\ReactOS-0.3.13-REL-src\ReactOS-0.3.13\"

Greetings

Re: Writing the first ReactOS application.

Posted: Mon Mar 30, 2015 10:38 am
by Tonix
Update

rbuild files are now obsolete you should use cmake files:

Tuturial part from [now.. edit the setup.rbuild located in SETUP directory and ADD then new FIRSTAPP entry.]
to [now.. is time to write the c-code... is a good idea to write some REM, something like that:]

shuold be substituted by
[..]
now.. edit the CMakeLists.txt located in SETUP directory and ADD then new FIRSTAPP entry.

add_subdirectory(reactos)
add_subdirectory(setup)
add_subdirectory(usetup)
add_subdirectory(vmwinst)
add_subdirectory(welcome)
add_subdirectory(firstapp)

open FIRSTAPP directory and create a new Cmake file named: CMakeLists.txt copy this code on it:
add_executable(firstapp firstapp.c)
set_module_type(firstapp win32gui UNICODE)
add_importlibs(firstapp gdi32 user32 shell32 msvcrt kernel32 ntdll)
add_cd_file(TARGET firstapp DESTINATION reactos NO_CAB FOR bootcd)
[..]

Tuturial part [now... JUST go on ROSBE shell... and type: MAKE FIRSTAPP]
shuold be substituted [now... JUST go on ROSBE shell, output directory, reactos ... and type: ninja firstapp]


Tuturial part from [edit firstapp.rbuild and add this entry: firstapp.rc] to [now.. create resource.h]
shuold be substituted with:

edit CMakeLists.txt and add this entry: firstapp.rc
like this:

add_executable(firstapp firstapp.c firstapp.rc)
set_module_type(firstapp gdi32 user32 shell32 msvcrt kernel32 ntdll)
add_importlibs(firstapp kernel32 gdi32 user32 )
add_cd_file(TARGET firstapp DESTINATION reactos NO_CAB FOR bootcd)

Re: Writing the first ReactOS application.

Posted: Mon Mar 30, 2015 8:01 pm
by uppusaikiran
After this how to see the output on the screen

Re: Writing the first ReactOS application.

Posted: Tue Mar 31, 2015 2:00 pm
by uppusaikiran
means if we made changes it is showing a red mark on the folder of setup
how to get rid of the red mark
And how to build reactos bootcd from here

Re: Writing the first ReactOS application.

Posted: Tue Mar 31, 2015 3:06 pm
by Tonix
you can compile te boot cd with
ninja bootcd
command int the output\reactos directory, it will be created there.

the red mark on the folder means that your local version is different from the version on-line in the svn repository.

You need to remove the changes or commit the to the svn online repository.

But only official developers have write (commit) access to the online repository
and a tutorial app is not something that should be present in the official sources.

you can test you app duoble clicking it, if you work on windows,
it's in the output folder/base/setup/firstapp/firstapp.exe

Re: Writing the first ReactOS application.

Posted: Fri May 19, 2017 4:35 pm
by linrx
Pleased seeing some C code working on ROS. At my age it gives me more meaning seeing old wheels being reinvented than a brand new car from Microsoft. Keep up the good work, imho :)

Re: Writing the first ReactOS application.

Posted: Mon Jun 04, 2018 12:58 am
by legendarytraveller
Is it possible use C++? I mean making a cpp file and a hpp file (header) for an application.

Re: Writing the first ReactOS application.

Posted: Tue Jun 05, 2018 10:30 am
by ThFabba
legendarytraveller wrote:Is it possible use C++? I mean making a cpp file and a hpp file (header) for an application.
Yes, it works the same way as for C.
To enable the full feature set (exceptions, standard library), you just need to add

Code: Select all

set_cpp(WITH_RUNTIME WITH_EXCEPTIONS WITH_STL)
to your CMakeLists.txt

Re: Writing the first ReactOS application.

Posted: Sat Apr 11, 2020 2:33 pm
by ThFabba
Just look further in the thread (i.e. scroll up on this very page): viewtopic.php?p=115149#p115149