Recent Posts

Pages: [1] 2 3 ... 10
1
General Discussion / Re: gmail validation is not supported ?
« Last post by KO Myung-Hun on Today at 02:09:53 am »
I've confirmed. Thanks!
2
Hi/2.

You can append `asm("variable_name")' to a variable declaration like:

Quote
__attribute__ ((dllexport)) extern const char *NdpTypes[] asm("NdpTypes");

You can use `__asm__' instead of `asm'.

For details, see http://trac.netlabs.org/libc/wiki/Faq#Howtodeclareavariablesoitwontgetanunderscore and https://gcc.gnu.org/onlinedocs/gcc/Asm-Labels.html.
3
Programming / Re: GCC/G++ - how to export global variable without underscore?
« Last post by Dave Yeo on July 15, 2024, 06:16:37 pm »
I tried various combinations of dllexport (which seems to be mandatory to export the symbol) and stdcall cdecl... But I ever end up with exporting _NdpTypes instead NdpTypes. I was under the impression that c++ don't add the _ but obviously I misinterpreted some stuff.

Another idea, is there any emx tool which can modify the exported symbols? Or add a new symbol to a dll which references to the orignal?

Btw. this all started cause I didn't manage to convince c++/linker to work with a .def file as it was used with icc or watcom. You know I'm not experienced with all this stuff so there is much guessing on my side.

You only need dllexport if you don't have the symbols in the def file. Traditionally, before we got dllexport, you hand wrote a DEF file including the exports, either by name or ordinal or you ran emxexp on the
object files and piped the results to the def file. Run emxexp with no parameters to see usage..
I've only done it the other way, pulling in symbols from a GCC DLL to a OW binary.
Note that with OW, you have to be careful to use the right calling convention to begin with, it defaults to its own calling convention which is incompatible with GCC DLLs, it uses registers instead of the stack.
See "Open Watcom 2.0 C/C++ Programmers Guide under Commonly Asked Questions, Converting to OpenWatcom C/C++, Conversion from IBM-compatible PC compilers.
In the case of porting from icc or OW, I simply edit the DEF, adding the underscores

Edit: You might also need the extern keyword
4
Programming / Re: GCC/G++ - how to export global variable without underscore?
« Last post by Dave Yeo on July 15, 2024, 06:02:14 pm »
Isn't it _System to use non-underscored variable names?

Might be.
5
Applications / Re: Experiment: Moving OS/2 Graphic/MM Resources
« Last post by Dave Yeo on July 15, 2024, 05:56:49 pm »
After unpacking, preferably a copy of the DLL, you can run strings on it, piping the results through less,
Code: [Select]
strings WPCONFIG.DLL | less
And see all text in the DLL. Strings is not perfect so you do get some garbage mixed in. There's a lot of strings in this DLL.
Or if you know what you are looking for, use grep,
Code: [Select]
H:\tmp>strings WPCONFIG.DLL  | grep "POINTERS"
NAMEFILTER=*;CLASSLIST=WPPointer;STARTFOLDER=?:\OS2\POINTERS;DEFAULTCRITERIA=YES

NAMEFILTER=*;CLASSLIST=WPFolder;STARTFOLDER=?:\OS2\POINTERS;DEFAULTCRITERIA=YES DIALOG=NO
6
Applications / Re: Experiment: Moving OS/2 Graphic/MM Resources
« Last post by Martin Iturbide on July 15, 2024, 05:06:03 pm »
Just one question, when you say "If I unpack WPCONFIG.DLL", what procedure are you doing there?

Sorry, I should explain myself better.
The right question is - What procedure are you doing there to know the information of the DLL that shows you the text string "STARTFOLDER=?:\OS2\POINTERS" from WPConfig.DLL?

I want to see if I can learn more about what information can I get from DLLs.

Regards
7
Isn't it _System to use non-underscored variable names?
8
Programming / Re: GCC/G++ - how to export global variable without underscore?
« Last post by Andi B. on July 15, 2024, 09:04:07 am »
I tried various combinations of dllexport (which seems to be mandatory to export the symbol) and stdcall cdecl... But I ever end up with exporting _NdpTypes instead NdpTypes. I was under the impression that c++ don't add the _ but obviously I misinterpreted some stuff.

Another idea, is there any emx tool which can modify the exported symbols? Or add a new symbol to a dll which references to the orignal?

Btw. this all started cause I didn't manage to convince c++/linker to work with a .def file as it was used with icc or watcom. You know I'm not experienced with all this stuff so there is much guessing on my side.
9
Off Topic discussions / Re: Which Linux desktop for long time OS/2 users?
« Last post by Heikki Kekki on July 15, 2024, 09:01:29 am »
I am using Xcfe desktop mostly via FreeRDP. Just tryed it, File manager opens same as last time, same with Firefox.
10
Programming / Re: Bigicons
« Last post by David Graser on July 15, 2024, 02:55:41 am »
My second attempt at an os2 folder theme.
Pages: [1] 2 3 ... 10