delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
From: | "Anthony" <akantsel AT integra DOT rmt DOT ru> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Problem with Allegro and DzComm |
Date: | Wed, 31 Mar 2004 15:17:43 +0400 |
Organization: | Radio-MSU NOC, Moscow State University |
Lines: | 82 |
Message-ID: | <c4e9db$228g$1@alpha2.radio-msu.net> |
NNTP-Posting-Host: | integra.rmt.ru |
X-Trace: | alpha2.radio-msu.net 1080731884 67856 81.13.30.150 (31 Mar 2004 11:18:03 GMT) |
X-Complaints-To: | usenet AT radio-msu DOT net |
NNTP-Posting-Date: | Wed, 31 Mar 2004 11:18:03 +0000 (UTC) |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 6.00.2600.0000 |
X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2600.0000 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Hello! I'm experiencing problems with Allegro 4.1.12 + DzComm 0.9.9g programming. #include <allegro.h> #include <dzcomm.h> ... comm_port *port; volatile int tick; void tick_handler() { ++tick; } END_OF_FUNCTION(tick_handler); ... int main() { ... LOCK_VARIABLE(tick); LOCK_FUNCTION(tick_handler); // error: invalid convertion from 'void (*)()' to 'void*' ... } If I comment the #include <dzcomm.h> string (and remove everything related to dzcomm, the code compiles just fine. What can be the case? Also I have a small test program that uses dzcomm with no allegro. While it is a single file, it works fine. If I split it into two files, I'm not able to link it: in file c306th.h: #ifndef _CENTER_306_THERMOMETR_H_ #define _CENTER_306_THERMOMETR_H_ #include <stdexcept> #include <dzcomm.h> ... #endif in file c306th.cpp: #include "C306th.h" ... in file thermo.cpp: #include <iostream> #include <iomanip> #include "C306th.h" ... Then C:\DJGPP\MyProjects\Thermo>gpp -Wall C306th.cpp thermo.cpp -o thermo.exe -ldzcom c:/djgpp/tmp/ccId1w5b.o(.text+0x0):thermo.cpp: multiple definition of `__dzdos_i nstall_irq' c:/djgpp/tmp/cctwBPwX.o(.text+0x0):C306th.cpp: first defined here c:/djgpp/tmp/ccId1w5b.o(.text+0x1a):thermo.cpp: multiple definition of `__dzdos_ remove_irq' c:/djgpp/tmp/cctwBPwX.o(.text+0x1a):C306th.cpp: first defined here c:/djgpp/tmp/ccId1w5b.o(.text+0x30):thermo.cpp: multiple definition of `_dzdos_i nstall_timer' c:/djgpp/tmp/cctwBPwX.o(.text+0x30):C306th.cpp: first defined here c:/djgpp/tmp/ccId1w5b.o(.text+0x3e):thermo.cpp: multiple definition of `_dzdos_i nstall_param_int' c:/djgpp/tmp/cctwBPwX.o(.text+0x3e):C306th.cpp: first defined here c:/djgpp/tmp/ccId1w5b.o(.text+0x5a):thermo.cpp: multiple definition of `_dzdos_r emove_param_int' c:/djgpp/tmp/cctwBPwX.o(.text+0x5a):C306th.cpp: first defined here collect2: ld returned 1 exit status What am I doing wrong? I would appreciate any help a lot. Thanks. Anthony
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |