RS232 port and wxWidgets
RS232 port and wxWidgets
Hey all,
Anyone know if there is a way of grabbing rs232 data through wxWidgets?
Thanks!
Anyone know if there is a way of grabbing rs232 data through wxWidgets?
Thanks!
-
- wxWorld Domination!
- Posts: 1471
- Joined: Tue Nov 14, 2006 7:58 am
- Location: Saint-Petersburg, Russia
Hy,
look here:
http://forums.wxwidgets.org/viewtopic.p ... highlight=
direct link to wxCTB:
http://wxcode.sourceforge.net/showcomp.php?name=wxCtb
look here:
http://forums.wxwidgets.org/viewtopic.p ... highlight=
direct link to wxCTB:
http://wxcode.sourceforge.net/showcomp.php?name=wxCtb
Last edited by tan on Wed Jul 04, 2007 6:57 pm, edited 1 time in total.
OS: Windows XP Pro
Compiler: MSVC++ 7.1
wxWidgets: 2.8.10
Compiler: MSVC++ 7.1
wxWidgets: 2.8.10
Thanks guys!
Where would I find libwxctb? Is it included in wxctb 0.9?
Any ideas on how to install this? I got a little lost with the instructions. I am using VC++ 2005 express.
I went into the VC cmd prompt and typed this, but got the following error:
Thanks!
Where would I find libwxctb? Is it included in wxctb 0.9?
Any ideas on how to install this? I got a little lost with the instructions. I am using VC++ 2005 express.
I went into the VC cmd prompt and typed this, but got the following error:
Code: Select all
c:\documents and settings\<user>\my documents\wxctb\build>n
make -f makefile.vc DEBUG=1 GPIB=1
Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
if not exist debug mkdir debug
cl /c /nologo /TP /Fodebug\wxctb_lib_expect.obj /MTd /DWIN32 /Zi /D_DE
BUG /Fd..\lib\wxctbd-gpib-0.9.pdb /O2 /I..\include /GR /EHsc .\..\src\expect.
cpp
expect.cpp
c:\documents and settings\<user>\my documents\wxctb\include
\wx\ctb\win32/timer.h(13) : fatal error C1083: Cannot open include file: 'window
s.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\c
l.EXE"' : return code '0x2'
Stop.
Tried compiling that and got the following errors:
Code: Select all
------ Build started: Project: ctb, Configuration: Debug Win32 ------
Performing Makefile project actions
Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
cl /c /nologo /TP /Fowxctb_lib_expect.obj /MT /DWIN32 /DNDEBUG /O2 /Fd..\lib\wxctb-0.8.pdb /I..\include /GR /EHsc .\..\src\expect.cpp
expect.cpp
.\..\src\expect.cpp(51) : warning C4996: 'strcat' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(78) : see declaration of 'strcat'
Message: 'This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
cl /c /nologo /TP /Fowxctb_lib_getopt.obj /MT /DWIN32 /DNDEBUG /O2 /Fd..\lib\wxctb-0.8.pdb /I..\include /GR /EHsc .\..\src\getopt.cpp
getopt.cpp
cl /c /nologo /TP /Fowxctb_lib_iobase.obj /MT /DWIN32 /DNDEBUG /O2 /Fd..\lib\wxctb-0.8.pdb /I..\include /GR /EHsc .\..\src\iobase.cpp
iobase.cpp
cl /c /nologo /TP /Fowxctb_lib_match.obj /MT /DWIN32 /DNDEBUG /O2 /Fd..\lib\wxctb-0.8.pdb /I..\include /GR /EHsc .\..\src\match.cpp
match.cpp
cl /c /nologo /TP /Fowxctb_lib_serport.obj /MT /DWIN32 /DNDEBUG /O2 /Fd..\lib\wxctb-0.8.pdb /I..\include /GR /EHsc .\..\src\win32\serport.cpp
serport.cpp
c:\documents and settings\<user>\my documents\downloads\wxctb\include\wx\ctb\win32\../serportx.h(161) : warning C4996: '_snprintf' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\stdio.h(339) : see declaration of '_snprintf'
Message: 'This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
.\..\src\win32\serport.cpp(119) : warning C4996: '_snprintf' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\stdio.h(339) : see declaration of '_snprintf'
Message: 'This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
.\..\src\win32\serport.cpp(205) : warning C4996: 'strncpy' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(156) : see declaration of 'strncpy'
Message: 'This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
cl /c /nologo /TP /Fowxctb_lib_timer.obj /MT /DWIN32 /DNDEBUG /O2 /Fd..\lib\wxctb-0.8.pdb /I..\include /GR /EHsc .\..\src\win32\timer.cpp
timer.cpp
if exist ..\lib\wxctb-0.8.lib del ..\lib\wxctb-0.8.lib
link /LIB /NOLOGO /OUT:..\lib\wxctb-0.8.lib @C:\DOCUME~1\JORDAN~1\LOCALS~1\Temp\nm1BBF.tmp
cl /c /nologo /TP /Fowxctb_dll_expect.obj /MT /DWIN32 /DNDEBUG /O2 /Fd..\lib\wxctb-0.8.pdb /I..\include /GR /EHsc .\..\src\expect.cpp
expect.cpp
.\..\src\expect.cpp(51) : warning C4996: 'strcat' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(78) : see declaration of 'strcat'
Message: 'This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
cl /c /nologo /TP /Fowxctb_dll_getopt.obj /MT /DWIN32 /DNDEBUG /O2 /Fd..\lib\wxctb-0.8.pdb /I..\include /GR /EHsc .\..\src\getopt.cpp
getopt.cpp
cl /c /nologo /TP /Fowxctb_dll_iobase.obj /MT /DWIN32 /DNDEBUG /O2 /Fd..\lib\wxctb-0.8.pdb /I..\include /GR /EHsc .\..\src\iobase.cpp
iobase.cpp
cl /c /nologo /TP /Fowxctb_dll_match.obj /MT /DWIN32 /DNDEBUG /O2 /Fd..\lib\wxctb-0.8.pdb /I..\include /GR /EHsc .\..\src\match.cpp
match.cpp
cl /c /nologo /TP /Fowxctb_dll_serport.obj /MT /DWIN32 /DNDEBUG /O2 /Fd..\lib\wxctb-0.8.pdb /I..\include /GR /EHsc .\..\src\win32\serport.cpp
serport.cpp
c:\documents and settings\<user>\my documents\downloads\wxctb\include\wx\ctb\win32\../serportx.h(161) : warning C4996: '_snprintf' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\stdio.h(339) : see declaration of '_snprintf'
Message: 'This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
.\..\src\win32\serport.cpp(119) : warning C4996: '_snprintf' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\stdio.h(339) : see declaration of '_snprintf'
Message: 'This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
.\..\src\win32\serport.cpp(205) : warning C4996: 'strncpy' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(156) : see declaration of 'strncpy'
Message: 'This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
cl /c /nologo /TP /Fowxctb_dll_timer.obj /MT /DWIN32 /DNDEBUG /O2 /Fd..\lib\wxctb-0.8.pdb /I..\include /GR /EHsc .\..\src\win32\timer.cpp
timer.cpp
link /DLL /NOLOGO /OUT:..\lib\wxctb-0.8.dll /LIBPATH:..\lib @C:\DOCUME~1\JORDAN~1\LOCALS~1\Temp\nm1BC0.tmp
wxctb_dll_serport.obj : error LNK2019: unresolved external symbol "public: __thiscall fifo::fifo(unsigned int)" (??0fifo@@QAE@I@Z) referenced in function "public: __thiscall wxIOBase::wxIOBase(void)" (??0wxIOBase@@QAE@XZ)
wxctb_dll_serport.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall fifo::items(void)" (?items@fifo@@QAEIXZ) referenced in function "public: virtual int __thiscall wxSerialPort::Read(char *,unsigned int)" (?Read@wxSerialPort@@UAEHPADI@Z)
..\lib\wxctb-0.8.dll : fatal error LNK1120: 2 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\bin\link.EXE"' : return code '0x460'
Stop.
Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
Build log was saved at "file://c:\Documents and Settings\<user>\My Documents\Downloads\wxctb\build\Debug\BuildLog.htm"
ctb - 5 error(s), 8 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
-
- Earned a small fee
- Posts: 23
- Joined: Tue Jul 11, 2006 1:36 pm
- Location: Poland, Warsaw
- Contact:
Re: RS232 port and wxWidgets
Hi,
Some time ago I wanted the same thing, but I wanted a solution to create a RS-232 connection with automatic transmission speed negotiation So I've started to create one. Due to lack of time - it's still not finished.
Some time ago I wanted the same thing, but I wanted a solution to create a RS-232 connection with automatic transmission speed negotiation So I've started to create one. Due to lack of time - it's still not finished.
Lucky75 wrote:Hey all,
Anyone know if there is a way of grabbing rs232 data through wxWidgets?
Thanks!
Althought this is an old (semi-dead ) thread, I was asked in another thread to write something about this problem.
You have a linker problem. I think you forgot to link a library. Have a look in the project options. (I do not know VC++ Express) I think in the linker options you have to add another .lib. I do not know, which one, but maybe somebody else can answer this.
Sebastian
You have a linker problem. I think you forgot to link a library. Have a look in the project options. (I do not know VC++ Express) I think in the linker options you have to add another .lib. I do not know, which one, but maybe somebody else can answer this.
Sebastian
-
- wxWorld Domination!
- Posts: 1471
- Joined: Tue Nov 14, 2006 7:58 am
- Location: Saint-Petersburg, Russia
Hi,
well, it is just a warning, don't pay attentionLucky75 wrote:Tried compiling that and got the following errors:
Code: Select all
------ Build started: Project: ctb, Configuration: Debug Win32 ------ Performing Makefile project actions Microsoft (R) Program Maintenance Utility Version 8.00.50727.42 Copyright (C) Microsoft Corporation. All rights reserved. cl /c /nologo /TP /Fowxctb_lib_expect.obj /MT /DWIN32 /DNDEBUG /O2 /Fd..\lib\wxctb-0.8.pdb /I..\include /GR /EHsc .\..\src\expect.cpp expect.cpp .\..\src\expect.cpp(51) : warning C4996: 'strcat' was declared deprecated C:\Program Files\Microsoft Visual Studio 8\VC\include\string.h(78) : see declaration of 'strcat' Message: 'This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
Really you have only 2 errors. You just forgot to include file fifo.cpp in the project. I have attached fixed makefile.Lucky75 wrote:Code: Select all
[skipped] link /DLL /NOLOGO /OUT:..\lib\wxctb-0.8.dll /LIBPATH:..\lib @C:\DOCUME~1\JORDAN~1\LOCALS~1\Temp\nm1BC0.tmp wxctb_dll_serport.obj : error LNK2019: unresolved external symbol "public: __thiscall fifo::fifo(unsigned int)" (??0fifo@@QAE@I@Z) referenced in function "public: __thiscall wxIOBase::wxIOBase(void)" (??0wxIOBase@@QAE@XZ) wxctb_dll_serport.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall fifo::items(void)" (?items@fifo@@QAEIXZ) referenced in function "public: virtual int __thiscall wxSerialPort::Read(char *,unsigned int)" (?Read@wxSerialPort@@UAEHPADI@Z) ..\lib\wxctb-0.8.dll : fatal error LNK1120: 2 unresolved externals
- Attachments
-
- makefile.zip
- (1.23 KiB) Downloaded 91 times
OS: Windows XP Pro
Compiler: MSVC++ 7.1
wxWidgets: 2.8.10
Compiler: MSVC++ 7.1
wxWidgets: 2.8.10