NO

Recent Posts

Pages: [1] 2 3 ... 10
1
General discussions / Re: Build DLL on command line.
« Last post by TimoVJL on Yesterday at 12:15:33 pm »
Project options Verbose build show commandlines.

A small example:
Code: [Select]
//test.c
//__declspec(dllexport) int __stdcall sum(int a, int b) {
__declspec(dllexport) int __cdecl sum(int a, int b) {
    return a + b;
}

Code: [Select]
SET PellesCDir="C:\Program Files\PellesC"
SET Path=%PellesCDir%\bin
SET INCLUDE=%PellesCDir%\include
SET LIB=%PellesCDir%\lib;%PellesCDir%\lib\Win
pocc -Gd -Ze test.c
polink -dll test.obj
pause
-Gd create __cdecl exports
-Gz create __stdcall exports and with -Gn undecorated __stdcall functions

Python test.py
Code: [Select]
#test.py
import ctypes
#mydll = ctypes.WinDLL("test") # load the dll __stdcall
mydll = ctypes.CDLL("test") # load the dll __cdecl
mydll.sum.argtypes = (ctypes.c_int, ctypes.c_int)
print(mydll.sum(5, 3))
2
General discussions / Build DLL on command line.
« Last post by berossm on Yesterday at 12:17:28 am »
I'm trying to make a very low level C dll to be used in Python.
Code works fine in GCC on Linux to build the .so and I'm looking at this as a solution for building the .dll

I got it to build no problem as a project but for continuous integration I would prefer to build from the command line.  Is there an easy way to get the full option list from the IDE for the build target? 

Or is there an example for how to build and link a super simple dll from the command line.
Only includes are stdlib & string

So far my attempts have all been a mess of linking errors.
3
Bug reports / Re: Compiler generates bad code for (signed) long long modulo operator
« Last post by RichieL on February 15, 2018, 07:13:01 am »
Forgot to mention: code generated for "long" modulo is correct, optimizations or no optimizations. Only "long long" has the problem.
4
Bug reports / Compiler generates bad code for (signed) long long modulo operator
« Last post by RichieL on February 15, 2018, 06:53:09 am »
The following tiny procedure: "long long test(long long i) { return i % 4;}"
generates bad code when optimization is set to None; interestingly, when
optimization is set to Maximize Speed the generated code is correct.

The code generated with optimization=None is shown in attachment
noOpt.jpg (captured from the Pelles debugger).  The "cqo" instruction
takes its source from rax, but the compiler loads the numerator into
rdx instead. The optimized code (in Opt.jpg) correctly loads the numerator
into rax. There are three other instructions in noOpt.jpg that also reference
rdx when they should be, in this case, using rax.

Compiler is v8.00.60 (64-bit).

      Richie
5
Work in progress / Re: fSDK© - Frankie's SDK for PellesC
« Last post by frankie on February 11, 2018, 07:34:59 pm »
New version:
- 11/Feb/2018 -- V.0.1.2.2 (11.Feb.2018)
  - Fixed header MsHtmlC.h
  - Added WMI Samples

To upgrade compiler with fSDK kit download installer from github and run it
fSDK can be browsed on GitHub

Last pre-release
6

While it doesn't really matter what you use for learning since C is C regardless of IDE, the fact that there's only about two people on the web who care about this product any more isn't great for when you inevitably have some sort of problem, IDE or code.

aardvajk: I can see that if hardly anyone here cares (is caring for) Pelles C then why would the wider world care.


I also recognise the point you make about the bugs in Pelles C: it reflects un-professionalism in an application if these are not being addressed.


Both of the above do negate the great worth Pelles C has as a 'light and easy IDE' (as PaoloC13 put it) for C programming in Windows.


I have downloaded and installed Pelles C and will, when I start coding, explore it. In the meantime, for my starter requirements of something simple, I am also looking at greatly extendable code text editors like Atom and the like (all with C compiler and numerous other packages/plugins) after reading: https://www.codementor.io/mattgoldspink/best-text-editor-atom-sublime-vim-visual-studio-code-du10872i7
7
I also think that Pelles C has a too low web profile, considering its good characteristics and it seems a waste for a great job. I like to write C code for Windows on a light and easy IDE, really I don't know best alternative to Pelles C.
8
I believe I found PC after I found out that Eclipse and similar are written in Java, and clunky and bug ridden by the fact of that; so I started looking for a lightweight IDE written in C. (The Wikipedia page covering IDEs for C/C++ https://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments#C/C++  has a '?' against 'Written in' for the language Pelles C is written in).
Look at the bug report section, Pelles C also has lots of active bugs. The difference between those IDEs and Pelles C though is that bugs in those are likely to be fixed. Pelle himself seems to have stopped caring about his creation. Not that he can really be blamed for such, lots of work for presumably minimal compensation would eventually lead even the most altruistic to think "Why bother?"

While it doesn't really matter what you use for learning since C is C regardless of IDE, the fact that there's only about two people on the web who care about this product any more isn't great for when you inevitably have some sort of problem, IDE or code.
9
Hello,


From my point of view I ask the question above because it took a lot of seeking and searching on the web to find a mention and recommend for Pelles C.


There are numerous sites listing and recommending IDEs, big and small – and even on most of the ‘top 50’ type sites for IDEs there is no mention of Pelles C. I eventually found you here only because of an obscure mention in a comment by someone on a question about lightweight IDEs – so obscure that I can’t relocate it! I believe I found PC after I found out that Eclipse and similar are written in Java, and clunky and bug ridden by the fact of that; so I started looking for a lightweight IDE written in C. (The Wikipedia page covering IDEs for C/C++ https://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments#C/C++  has a '?' against 'Written in' for the language Pelles C is written in).


Perhaps it is not important that Pelles C is more known in the IDE field?
 
Anyway, I am glad I found  Pelles C to try, and I look forward to using it at the start of my journey with learning C programming.
 
[From 1985-87 I was a COBOL programmer for a multinational – but then moved into systems analysis, feasibility studies and quality assurance for project/feasibility studies  in IT. I only moved away from programming for the reason that the career route was limited for programmers in those days; the alternative I chose was a fast track to higher paid positions].
 
A part of me has always regretted the move from the thoroughness and detail to the more abstract overview of things. So in my retirement years I want to go back and learn about programming in a more thorough way].
 
Thank you for Pelles C, and for this forum.
10
General discussion / Re: Forum downtime
« Last post by jj2007 on February 08, 2018, 07:26:59 pm »
Your Masm32 fanclub (Vortex & me) got already worried 8)
Pages: [1] 2 3 ... 10