Groups | Search | Server Info | Login | Register
Groups > comp.os.os2.programmer.misc > #150
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | "Dave Saville" <dave@invalid.invalid> |
| Newsgroups | comp.os.os2.programmer.misc |
| Subject | Re: EMX problem |
| Date | Sun, 3 Apr 2011 20:31:56 +0000 (UTC) |
| Organization | A noiseless patient Spider |
| Lines | 67 |
| Message-ID | <fV45K0OBJxbE-pn2-UW9Gwdgwbd4f@localhost> (permalink) |
| References | <fV45K0OBJxbE-pn2-Po0DVV9WtXII@localhost> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Sun, 3 Apr 2011 20:31:56 +0000 (UTC) |
| Injection-Info | mx03.eternal-september.org; posting-host="Evby4tluHA/pzEdP/tjMiw"; logging-data="1761"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/XGvTlv4kZ8JX9mw7AHDpK" |
| User-Agent | ProNews/2 V1.60.cp125 |
| Cancel-Lock | sha1:NqruvHuI+vE8+aIVFEh2sS4Zy6o= |
| Xref | x330-a1.tempe.blueboxinc.net comp.os.os2.programmer.misc:150 |
Show key headers only | View raw
On Tue, 29 Mar 2011 10:56:19 UTC, "Dave Saville"
<dave@invalid.invalid> wrote:
> I am trying to fix a few of the niggles I and others have with YAOS.
>
> First I tried to build it with the current gcc but there were so many
> errors, both in the C and linkage I gave up.
>
> I switched to my old emx setup and only get one warning and a link
> fail. This is without any code mods. I decided to get it to
> compile/link before messing with anything.
>
> The error I get is:
>
> gcc -O2 -Wall -c -o yaos.o yaos.cc
> yaos.cc: In function `void setTitle(char *)':
> yaos.cc:30: warning: ANSI C++ forbids cast to non-reference type used
> as lvalue
> gcc -O2 -Wall -o yaost.exe yaos.o util.o ycd.o ext.o file.o easysock.o
> version.o -lvideo -lsocket yaos.def
> yaos.o: Undefined symbol __16_DosSmSetTitle referenced from text
> segment
> make: *** [yaost.exe] Error 1
>
> extern "C" {
> USHORT _THUNK_FUNCTION (DosSmSetTitle) (_far16ptr title);
>
> void setTitle(char *title)
> {
> char *_title = (char*)_tmalloc(strlen(title)+1);
> if (_title != NULL) {
> strcpy(_title, title);
> _THUNK_PROLOG (4);
> _THUNK_FAR16 (_emx_32to16 (_title)); <--- line 30
> _THUNK_CALL (DosSmSetTitle);
> _tfree(_title);
> }
> }
>
> };
>
> cat yaos.def
> NAME WINDOWCOMPAT
> IMPORTS
> _16_DosSmSetTitle = SESMGR.5
>
>
> The original makefile used -Zomf but that throws loads of link errors.
> I reinstalled EMX from the fix4 wpi on hobbes. Gcc is the old 2.8.1
>
> Any ideas?
1) I had something wrong in my EMX setup. Reinstalled using the old
zips not the wpi.
2) Now compiles clean with -Zomf. But there is a problem in that YAOS
thinks the max command line is 260 chars. Luckily it was a #define so
I bumped it to 1024. Testing one function and it crashes. Tracked it
down to the 1024. reducing to 807 and it stops crashing. Can't see
why. Just for fun I recomplied at 1024 without the -Zomf - and it does
not crash. But in this case I need to fix the original problem of the
link failing on __16_DosSmSetTitle (I commented the call out for the
test.)
--
Regards
Dave Saville
Back to comp.os.os2.programmer.misc | Previous | Next — Next in thread | Find similar
Re: EMX problem "Dave Saville" <dave@invalid.invalid> - 2011-04-03 20:31 +0000
Re: EMX problem Ilya Zakharevich <nospam-abuse@ilyaz.org> - 2011-04-04 17:27 +0000
Re: EMX problem "Dave Saville" <dave@invalid.invalid> - 2011-04-04 19:01 +0000
Re: EMX problem Ilya Zakharevich <nospam-abuse@ilyaz.org> - 2011-04-04 21:30 +0000
Re: EMX problem "Dave Saville" <dave@invalid.invalid> - 2011-04-05 13:43 +0000
Re: EMX problem Ilya Zakharevich <nospam-abuse@ilyaz.org> - 2011-04-05 18:55 +0000
Re: EMX problem "A.D. Fundum" <what.ever@neverm.ind> - 2011-04-06 13:24 +0200
csiph-web