visual c++ - LINK2019 still keeps going -


i'm trying resolve unresolved external (link2019 error).there posts on issue , try them, still not figure out.

the error caused createftdcmdapi function ( right?) understanding "resolved".

// testtraderapi.cpp : 定义控制台应用程序的入口点。   //   #include "mdspi.h"   #include <iostream> // userapi对象   cthostftdcmdapi* puserapi = null;  // 配置参数   char front_addr[] = "tcp://asp-sim2-md1.financial-trading-platform.com:26213";      // 前置地址   tthostftdcbrokeridtype  broker_id = "***";              // 经纪公司代码   tthostftdcinvestoridtype investor_id = "0***";          // 投资者代码   tthostftdcpasswordtype  password = "*****";         // 用户密码   char *ppinstrumentid[] = { "***", "***" };            // 行情订阅列表   int iinstrumentid = 2;                                  // 行情订阅数量    // 请求编号   int irequestid = 0;  void main(void) {     // 初始化userapi       char file = 'f';     puserapi = cthostftdcmdapi::createftdcmdapi();          // 创建userapi       cthostftdcmdspi* puserspi = new cmdspi();     puserapi->registerspi(puserspi);                     // 注册事件类       puserapi->registerfront(front_addr);                 // connect       puserapi->init();      puserapi->join();     //  puserapi->release();   } 

i truncated code bit, because verbose.

class md_api_export cthostftdcmdapi { public:     ///创建mdapi     ///@param pszflowpath 存贮订阅信息文件的目录,默认为当前目录     ///@return 创建出的userapi     ///modify udp marketdata     static cthostftdcmdapi *createftdcmdapi(const char *pszflowpath = "", const bool bisusingudp=false, const bool bismulticast=false);      ///获取api的版本信息     ///@retrun 获取到的版本号     static const char *getapiversion();     } 

error:

 1>------ build started: project: challenges, configuration: debug win32 ------ 1>challenges.obj : error lnk2019: unresolved external symbol "public: static class cthostftdcmdapi * __cdecl cthostftdcmdapi::createftdcmdapi(char const *,bool,bool)" (?createftdcmdapi@cthostftdcmdapi@@sapav1@pbd_n1@z) referenced in function _main 1>d:\documents\visual studio 2013\projects\challenges\debug\challenges.exe : fatal error lnk1120: 1 unresolved externals ========== build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -