C++ MFC

Moderators: Lundin
Number of threads: 3354
Number of posts: 9032

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Problems using CPORT.H in VC++ V6.0 Posted by foozy_man on 18 Mar 2003 at 9:25 AM
I recently downloaded the CPORT libary by BRI Productions in order to do simple serial communication between winnt to a Motorolla HC12. My problems is when I add and compile the CPORT sample code into VC++ console app I get a bunch of errors compiling.

I copied cport.h and cport.hpp to the Microsoft "Include" folder. This is the error I'm getting:
-----------
Linking...
RS232_Serial.obj : error LNK2001: unresolved external symbol _ComClose
RS232_Serial.obj : error LNK2001: unresolved external symbol _ComPuts
RS232_Serial.obj : error LNK2001: unresolved external symbol _comopen_errno
RS232_Serial.obj : error LNK2001: unresolved external symbol _ComOpen
Debug/Sentry.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.

Sentry.exe - 5 error(s), 0 warning(s)
-------------

I also tried including the .lib file in the project setttings, but I get a file error with the cports.lib library.

Am I missing some fundamentail step in using this library?

Thanks for any help.




Report
Re: Problems using CPORT.H in VC++ V6.0 Posted by suhredayan on 20 Mar 2003 at 4:29 AM
Through Projects->AddToProjects->Files

You add corresponding xxx.lib files to your project .hope it sould work.
Report
Re: Problems using CPORT.H in VC++ V6.0 Posted by suhredayan on 21 Mar 2003 at 6:33 AM
you try
LoadLibrary()
and
GetProcAddress()
functions to explicitly link dlls you have




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.