Skip to content

Commit

Permalink
Fix ltp_test compiling failed.
Browse files Browse the repository at this point in the history
1. remove "#pragma comment(lib, xxx.lib)", the name is not right any more. Instead of use this command to automatically link the library, use the library explicitly.
  • Loading branch information
fseasy committed Jun 5, 2017
1 parent c413b33 commit a247098
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 23 deletions.
16 changes: 8 additions & 8 deletions src/ltp/LTPResource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
#include "srl/SRL_DLL.h"
#include "utils/logging.hpp"

#if _WIN32
#pragma warning(disable: 4786 4284)
#pragma comment(lib, "segmentor.lib")
#pragma comment(lib, "postagger.lib")
#pragma comment(lib, "parser.lib")
#pragma comment(lib, "ner.lib")
#pragma comment(lib, "srl.lib")
#endif
// #if _WIN32
// #pragma warning(disable: 4786 4284)
// #pragma comment(lib, "segmentor.lib")
// #pragma comment(lib, "postagger.lib")
// #pragma comment(lib, "parser.lib")
// #pragma comment(lib, "ner.lib")
// #pragma comment(lib, "srl.lib")
// #endif

LTPResource::LTPResource() :
m_segmentor(NULL),
Expand Down
16 changes: 8 additions & 8 deletions src/ltp/Ltp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
#include "utils/codecs.hpp"
#include "utils/logging.hpp"

#if _WIN32
#pragma warning(disable: 4786 4284)
#pragma comment(lib, "segmentor.lib")
#pragma comment(lib, "postagger.lib")
#pragma comment(lib, "parser.lib")
#pragma comment(lib, "ner.lib")
#pragma comment(lib, "srl.lib")
#endif
//#if _WIN32
//#pragma warning(disable: 4786 4284)
//#pragma comment(lib, "segmentor.lib")
//#pragma comment(lib, "postagger.lib")
//#pragma comment(lib, "parser.lib")
//#pragma comment(lib, "ner.lib")
//#pragma comment(lib, "srl.lib")
//#endif

// create a platform
LTP::LTP(const std::string& last_stage,
Expand Down
2 changes: 1 addition & 1 deletion src/ner/ner_dll.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define NER_DLL_API extern "C" _declspec(dllexport)
#else
#define NER_DLL_API extern "C" _deslspec(dllimport)
#pragma comment(lib, "ner.lib")
//#pragma comment(lib, "ner.lib")
#endif // end for NER_DLL_API_EXPORT
#endif // end for _WIN32

Expand Down
2 changes: 1 addition & 1 deletion src/parser.n/parser_dll.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define PARSER_DLL_API extern "C" _declspec(dllexport)
#else
#define PARSER_DLL_API extern "C" _deslspec(dllimport)
#pragma comment(lib, "parser.lib")
//#pragma comment(lib, "parser.lib")
#endif // end for PARSER_DLL_API
#endif // end for _WIN32

Expand Down
2 changes: 1 addition & 1 deletion src/parser/parser_dll.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define PARSER_DLL_API extern "C" _declspec(dllexport)
#else
#define PARSER_DLL_API extern "C" _deslspec(dllimport)
#pragma comment(lib, "parser.lib")
//#pragma comment(lib, "parser.lib")
#endif // end for PARSER_DLL_API
#endif // end for _WIN32

Expand Down
2 changes: 1 addition & 1 deletion src/postagger/postag_dll.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define POSTAGGER_DLL_API extern "C" _declspec(dllexport)
#else
#define POSTAGGER_DLL_API extern "C" _deslspec(dllimport)
#pragma comment(lib, "postagger.lib")
//#pragma comment(lib, "postagger.lib")
#endif // end for PARSER_DLL_API
#endif // end for _WIN32

Expand Down
2 changes: 1 addition & 1 deletion src/segmentor/segment_dll.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define SEGMENTOR_DLL_API extern "C" _declspec(dllexport)
#else
#define SEGMENTOR_DLL_API extern "C" _deslspec(dllimport)
#pragma comment(lib, "segmentor.lib")
//#pragma comment(lib, "segmentor.lib")
#endif // end for SEGMENTOR_DLL_API_EXPORT
#endif // end for _WIN32

Expand Down
2 changes: 1 addition & 1 deletion src/splitsnt/SplitSentence.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define SPLIT_SENTENCE_DLL_API extern "C" _declspec(dllexport)
#else
#define SPLIT_SENTENCE_DLL_API extern "C" _deslspec(dllimport)
#pragma comment(lib, "splitsnt.lib")
//#pragma comment(lib, "splitsnt.lib")
#endif // end for SPLIT_SENTENCE_DLL_API
#endif // end for _WIN32

Expand Down
2 changes: 1 addition & 1 deletion src/srl/SRL_DLL.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ using namespace std;
#define SRL_DLL_API extern "C" _declspec(dllexport)
#else
#define SRL_DLL_API extern "C" _declspec(dllimport)
#pragma comment(lib, "srl.lib")
//#pragma comment(lib, "srl.lib")
#endif
#endif
/**
Expand Down

0 comments on commit a247098

Please sign in to comment.