NO

Author Topic: Crinkler <-> Pelles C  (Read 9919 times)

wolf

  • Guest
Crinkler <-> Pelles C
« on: August 06, 2011, 05:47:11 PM »
Hi,
does anyone know why Pelles C compiled files do not seem to work with Crinkler?

- Wolfgang

CommonTater

  • Guest
Re: Crinkler <-> Pelles C
« Reply #1 on: August 06, 2011, 08:01:58 PM »
Might help if we knew what Crinkler is....

Offline Vortex

  • Member
  • *
  • Posts: 797
    • http://www.vortex.masmcode.com
Re: Crinkler <-> Pelles C
« Reply #2 on: August 06, 2011, 08:04:53 PM »
If I am not wrong, he means this one :

Quote
Crinkler is an executable file compressor (or rather, a compressing linker) for Windows specifically targeted towards executables with a size of just a few kilobytes. As of 2011, it is the most widely used tool for compressing 4k intros.

http://www.crinkler.net/
Code it... That's all...

wolf

  • Guest
Re: Crinkler <-> Pelles C
« Reply #3 on: August 06, 2011, 08:37:56 PM »
Yes. This is true. A former version of Pelles C worked well with Crinkler but it seems like the latest doesn't work at all. So I was wondering if I miss setting a switch or something.

Thanks in advance for your help.

wolf

  • Guest
Re: Crinkler <-> Pelles C
« Reply #4 on: August 06, 2011, 09:56:12 PM »
btw: source code is here ....

wolf

  • Guest
Re: Crinkler <-> Pelles C
« Reply #5 on: August 06, 2011, 09:56:59 PM »

CommonTater

  • Guest
Re: Crinkler <-> Pelles C
« Reply #6 on: August 06, 2011, 10:13:36 PM »
Ahhh, ok... seems kind of silly to compress small executables... Wouldn't that just make them very slow to load?

Really big ones I get, but why the small ones?


wolf

  • Guest
Re: Crinkler <-> Pelles C
« Reply #7 on: August 06, 2011, 10:43:27 PM »
This is for 1k and 4k demo competitions.

http://en.wikipedia.org/wiki/Demoscene

CommonTater

  • Guest
Re: Crinkler <-> Pelles C
« Reply #8 on: August 07, 2011, 01:17:20 AM »
Ok... thanks for the explanation.  Sorry I can't be more help...

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Crinkler <-> Pelles C
« Reply #9 on: August 07, 2011, 10:18:01 AM »
Error like this ?
Code: [Select]
: error: LNK: Import 'HeapAlloc' from 'kernel32' uses forwarded RVA. This feature is not supported by crinkler (yet)
Quote
COMMON PROBLEMS, KNOWN BUGS AND LIMITATIONS
-------------------------------------------

Any DLL that is needed by a program that Crinkler compresses must be
available to Crinkler itself. If you get the error message 'Could not
open DLL ...', it means that Crinkler needed the DLL but could not
find it. You must place it either in the same directory as the
Crinkler executable or somewhere in the DLL path, such as
C:\WINDOWS\system32. Alternatively, you can use the REPLACEDLL option
to replace it by one that is available.

If you launch your Crinkler-compressed program from within Visual
Studio, use Start Without Debugging (Ctrl+F5) rather than Start
Debugging (F5). The debugger cannot handle Crinkler-compressed
executables. If the program crashes, you can still attach the debugger
in the normal way.

When running inside Visual Studio, the textual progress bars are not
updated correctly, since the Visual Studio console does not flush the
output until a newline is reached, even when explicitly flushed by the
running program. Use the /PROGRESSGUI option to get a graphical
progress bar.

The code for parsing object and library files contains only a minimum
of sanity checks. If you pass a corrupt file to Crinkler, it will most
likely crash.

The import code does not support forwarded RVA imports, which means
that some functions, such as HeapAlloc, cannot be used. This makes
Crinkler unable to link with libc. What a loss.

The final compressed size must be less than 64k, or Crinkler will fail
horribly. You shouldn't use it for such big files anyway.
« Last Edit: August 07, 2011, 10:25:30 AM by timovjl »
May the source be with you

wolf

  • Guest
Re: Crinkler <-> Pelles C
« Reply #10 on: August 07, 2011, 12:17:02 PM »
thanks a lot for your help. Do you see this error message when you use the code? I don't see any error message. In my case the compressed Exe just crashes without any useful information. I will double check now the DLL loading ...

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: Crinkler <-> Pelles C
« Reply #11 on: August 07, 2011, 01:53:20 PM »
This function code fail and following code try to use NULL pointer ?
Code: [Select]
D3D10CreateDeviceAndSwapChain( NULL,
D3D10_DRIVER_TYPE_HARDWARE,
NULL,
D3D10_CREATE_DEVICE_DEBUG ,
D3D10_SDK_VERSION,
&sd,
&g_pSwapChain,
&g_pd3dDevice );
Your older code was this ??
Code: [Select]
if (D3D10CreateDeviceAndSwapChain(NULL,
D3D10_DRIVER_TYPE_HARDWARE,
NULL, 0,
D3D10_SDK_VERSION,
&sd,
&g_pSwapChain,
&g_pd3dDevice)
)
if (D3D10CreateDeviceAndSwapChain(NULL,
D3D10_DRIVER_TYPE_REFERENCE,
NULL, 0,
D3D10_SDK_VERSION,
&sd, &g_pSwapChain, &g_pd3dDevice))
return 1;
May the source be with you

wolf

  • Guest
Re: Crinkler <-> Pelles C
« Reply #12 on: August 07, 2011, 02:11:46 PM »
Thanks so much! That was great! I committed a fix. The problem seems to have been that the swap chain description structure was not fully initialized. After compression this seem to have mad e difference.