NO

Recent Posts

Pages: 1 ... 8 9 [10]
91
Beginner questions / Re: Build a dll without __declspec(dllexport)?
« Last post by opaque on April 04, 2020, 09:27:41 am »
If my code doesn't specify it does Pelles C use CDECL or STDCALL by default? I have to know this to prepare the .def file.
This is not related to the export qualifier __declspec(dllexport). This extended qualifier simply puts the address of your function in the export table of the PE executable independently from the calling convention.
You can specify the calling convention for 32bit executables on function by function basis, using the qualifiers __stdcall or __cdecl, or globally defining the default calling convention. For 64bits executables the calling convention is fixed and is the MS 64bits ABI.
The default calling convention can be set on the compiler command line with the switches /Gr and /Gz, or setting it in the IDE project options, compiler tab.
You must specify in an header file the prototype of your exported functions, eventually adding the calling convention, __stdcall or __cdecl, and include it in the modules of the executable that loads the DLL.

Because I don't write the .def file myself. I got it generated from MinGW when compiling the dll with MinGW. The generated .def file is decorated with @ so I think it's STDCALL.

Yes, it's a 64 bit DLL. But I also want to build for 32 bit.

IMHO, being able to build a dll without dllexport/dllimport is very useful. I think Pelles C should support it.
92
Graphics programming / Re: Setting Up SDL
« Last post by Ilya83 on April 04, 2020, 09:15:08 am »
Quote
I've created a thread that contains simple instructions

Thank you!
93
Bug reports / Re: Relocation type ADDR32 is invalid without /LARGEADDRESSAWARE:NO
« Last post by Git on April 03, 2020, 03:21:25 pm »
I am getting the same error from 9.00.9 :

POLINK: error: Relocation type ADDR32 is invalid without /LARGEADDRESSAWARE:NO, for symbol 'biggy'.

I have several initialed variables in a DATA segment, and some code in a CODE segment. POLINK kicks out that error for each variable declared. Dumpbin shows that all those variables are ADDR32 relocs.. I don't want or need 32bit anything in this program. I have a simple 64bit C program calling a simple 64bit asm function.

Could anybody please explain how to fix this?. Id there a particular project setting or assembler directive or keyword missing?. Any help on this will be greatly appreciated, it's driving me nuts, as is being stuck indoors during this COVID19 pandemic.

Here's the rub - it was all ok, compiled, assembled, linked and just about ran. I changed that good ole "something, I forget..." and it started throwing these ADDR32 link errors. It's telling me to set /LARGEADDRESSAWARE:NO but I really don't want to do that.

Git


Code: [Select]
.MODEL FLAT, FASTCALL

EXTERN cos: PROC
EXTERN modf: PROC

.DATA
ALIGN 16

biggy OWORD 12345678123456781234567812345678
qA QWORD 84BD228634A74B22h
dubB  REAL8 100.0

.CODE
ALIGN 16

gen_nums proc public
local y:qword
push  blah
push  more
mov   etc
movsd xmm1, dubB
etc
...
...

gen_nums endp

ENDS



Later : In line with Pelles wishes in his message at the top of the bug reports forum, I'm attaching a minimal project that exhibits the problem. The code doesn't do anything else sensible.

Git
94
Bug reports / Re: Installer is too small
« Last post by John Z on April 03, 2020, 01:34:12 pm »
Opaque,

Try to verify your download.  Here is some information on the file
Name: PellesC_9_64bit_setup.exe  (setup.exe renamed by me)
Size: 14037409 bytes (13 MiB)
CRC32: B643C36D
CRC64: 2A3472E5D7319E35
SHA256: 31E5F43311377A819CDDA7452FC9E3470F961DE63777806627705B7BC2441458
SHA1: 4210FFB3C596DC0021AFE9FC8D9FFCBFD008063E
BLAKE2sp: DADBC0CE31A2651CC8FF78B2249BCDD029DBB6BB7F3C3D07C38AB5532BF912A8

Regards,
95
Bug reports / Re: Installer is too small
« Last post by Robert on April 03, 2020, 07:36:08 am »
Hi. I downloaded and install Pelles C 9.0 with setup.exe and it just said "Installer is too small" and not let me to install.

I just downloaded Pelle's C 9.00.9 from

http://www.smorgasbordet.com/pellesc/900/setup.exe

and it installed as expected.

The download has the same size as several other downloads that I have made since Pelle's C 9.00.9 was released, that is, 14,037,409 bytes.
96
Bug reports / Re: Installer is too small
« Last post by opaque on April 03, 2020, 04:31:10 am »
You had a defective download. Try again from http://www.smorgasbordet.com/pellesc/.
The forum is on a temporary server that allows administration only to the mantainer, so we can't partecipate to moderation.

Hi, frankie. I downloaded setup.exe again from the site above and it's still error with "Installer is too small". I think it's not my downloaded file is corrupt but the file on the server is corrupt. Please check it.
97
User contributions / Re: SGL - win32 made simple!
« Last post by opaque on April 03, 2020, 04:26:27 am »
Here is my codeblocks project and so could find my .def file inside Debug/bin folder. I also attached a test application linked with sgl.dll.
98
Beginner questions / Re: Build a dll without __declspec(dllexport)?
« Last post by frankie on April 02, 2020, 10:26:13 pm »
If my code doesn't specify it does Pelles C use CDECL or STDCALL by default? I have to know this to prepare the .def file.
This is not related to the export qualifier __declspec(dllexport). This extended qualifier simply puts the address of your function in the export table of the PE executable independently from the calling convention.
You can specify the calling convention for 32bit executables on function by function basis, using the qualifiers __stdcall or __cdecl, or globally defining the default calling convention. For 64bits executables the calling convention is fixed and is the MS 64bits ABI.
The default calling convention can be set on the compiler command line with the switches /Gr and /Gz, or setting it in the IDE project options, compiler tab.
You must specify in an header file the prototype of your exported functions, eventually adding the calling convention, __stdcall or __cdecl, and include it in the modules of the executable that loads the DLL.
99
Beginner questions / Re: Build a dll without __declspec(dllexport)?
« Last post by opaque on April 02, 2020, 05:33:23 pm »
PellesC doesn't have the GCC option.
If you don't specify any exported symbol the export table in the PE file will be empty.
If you don't want modify all your DLL code you can build a DEF file with functions you want to export and relink the DLL objects adding the DEF file.
For better instructions please refer to the help for polink option /DEF:filename
If my code doesn't specify it does Pelles C use CDECL or STDCALL by default? I have to know this to prepare the .def file.
100
Bug reports / Re: Installer is too small
« Last post by opaque on April 02, 2020, 05:32:15 pm »
You had a defective download. Try again from http://www.smorgasbordet.com/pellesc/.
The forum is on a temporary server that allows administration only to the mantainer, so we can't partecipate to moderation.
I will try download and install again.
Pages: 1 ... 8 9 [10]