Compiling with pocc the following snippet:
#include <stdio.h>
#include <windows.h>
__declspec(dllimport) int a;
int main(int argc, char *argv[])
{
printf("%d\n", a);
return 0;
}
Fails when debug is enabled with the following error:
D:\test\data_export_bug.c(9): error #3120: [asm] Symbol 'a' is undefined.
It compiles ok without debug enabled.
Confirmed.
The good news (for me) is that I seem to have fixed this already in the upcoming version.
The bad news (for you) is that the only workaround I can think of is to produce an assembly file from the compiler, hand-edit this file, and the feed it back into the compiler. This is... um... "a bit complicated".
QuoteThe good news (for me) is that I seem to have fixed this already in the upcoming version.
A good news for us would be to know when
Meanwhile ...
...
extern
__declspec(dllimport) int a;
...
Quote from: TimoVJL on June 08, 2021, 07:03:37 AM
Meanwhile ...
...
extern
__declspec(dllimport) int a;
...
Good trick Timo ;D
Quote from: Grincheux on June 07, 2021, 10:08:27 PM
QuoteThe good news (for me) is that I seem to have fixed this already in the upcoming version.
A good news for us would be to know when
I Agree... 8)
It's finished when it's finished. I'm not going to speculate, and I'm not going to be rushed.
I always start with the C compiler, which is mostly done for now, and then continue with other tools and tasks. The C runtime needs some updates, other things need to be researched, which always takes time, the documentation needs to be updated, which is boring as hell so it will take double time, and so on.
Quote from: Pelle on June 08, 2021, 07:15:24 PM
It's finished when it's finished.
Ok, take it easy ;)