News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

Using CoderStudio Tools

Started by Manos, February 08, 2019, 09:43:52 PM

Previous topic - Next topic

Manos

To use pcc32, Link32, RC32, follow these stepts:
Create a directory, for example: CoderStudio.
In CoderStudio directory create a folder named bin and put there my bin Tools.
In CoderStudio directory put the include folder and the lib folder that you have downloaded.
Now you have a directory named CoderStudio and three subfolders: bin, include and lib.
Because my Tools when run create  temporary Environment Variables, using the above
steps you don't have to use much parameters.
Open a command line box and set as current directory the: C:\CoderStudio\bin
Type: pcc32 /c /MD Test.c and press the key Enter.
You will take the Test.obj
Then type: Link32 /SUBSYSTEM:CONSOLE Test.obj kernel32.lib and press key enter.
You will take the Test.exe.
Run it from command line to see.

Download my example.

Note:
The Compiler:
1). pcc32 has as default the option: /O1, that means optimize for speed and small size.
This option is the best.
Since this is a default option, you can omit it in command line.
2). Avoid to use the /O2 option because it is not completed yet.
3). Use the option: /MD to link the MSVCRT.dll dynamically.
If you wish to link statically CRT libraries, you should put
in folder lib the apropriate libraries, because I have not implemented these yet.
4). pcc32 accepts inline assembly, but in NASM syntax.
5). pcc32 accepts also inline C functions, but you must enable the /C99 option
and to use the keyword: inline.

The linker:
1). Link32 has as default the option: /SUBSYSTEM:WINDOWS.
Therefore you can omit this option when build Windows executables or DLLs.
2). Avoid to merge segments because Link32 does the apropriate merge.
3). When build Windows projects, use the option: /MANIFESTEMBED to activate visual styles.
The linker will embed the apropriate manifest file.

4).Some antivirus, mainly free antivirus, complain for virus detection in projects that the Link32 produce,
but it is a False Positive Antivirus Detection and you will ignore these.

Manos.