Skip to content
Snippets Groups Projects
Commit 835f4bee authored by Nicolas Pope's avatar Nicolas Pope
Browse files

All code now works in Visual Studio

parent 875ef71a
No related branches found
No related tags found
No related merge requests found
Pipeline #9633 passed
...@@ -35,14 +35,14 @@ Street, Fifth Floor, Boston, MA 02110-1301, USA ...@@ -35,14 +35,14 @@ Street, Fifth Floor, Boston, MA 02110-1301, USA
#ifndef _MSC_VER #ifndef _MSC_VER
#include <stdint.h> #include <stdint.h>
#else #else
typedef __int8 int8_t; // typedef __int8 int8_t;
typedef __int16 int16_t; // typedef __int16 int16_t;
typedef __int32 int32_t; // typedef __int32 int32_t;
typedef __int64 int64_t; // typedef __int64 int64_t;
typedef unsigned __int8 uint8_t; // typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t; // typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t; // typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t; // typedef unsigned __int64 uint64_t;
#endif #endif
#ifdef PROFILE #ifdef PROFILE
......
...@@ -36,14 +36,14 @@ Street, Fifth Floor, Boston, MA 02110-1301, USA ...@@ -36,14 +36,14 @@ Street, Fifth Floor, Boston, MA 02110-1301, USA
#ifndef _MSC_VER #ifndef _MSC_VER
#include <stdint.h> #include <stdint.h>
#else #else
typedef __int8 int8_t; // typedef __int8 int8_t;
typedef __int16 int16_t; // typedef __int16 int16_t;
typedef __int32 int32_t; // typedef __int32 int32_t;
typedef __int64 int64_t; // typedef __int64 int64_t;
typedef unsigned __int8 uint8_t; // typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t; // typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t; // typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t; // typedef unsigned __int64 uint64_t;
#endif #endif
class Descriptor { class Descriptor {
......
...@@ -26,18 +26,18 @@ Street, Fifth Floor, Boston, MA 02110-1301, USA ...@@ -26,18 +26,18 @@ Street, Fifth Floor, Boston, MA 02110-1301, USA
#include "filter.h" #include "filter.h"
// define fixed-width datatypes for Visual Studio projects // define fixed-width datatypes for Visual Studio projects
#ifndef _MSC_VER //#ifndef _MSC_VER
#include <stdint.h> #include <stdint.h>
#else //#else
typedef __int8 int8_t; // typedef __int8 int8_t;
typedef __int16 int16_t; // typedef __int16 int16_t;
typedef __int32 int32_t; // typedef __int32 int32_t;
typedef __int64 int64_t; // typedef __int64 int64_t;
typedef unsigned __int8 uint8_t; // typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t; // typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t; // typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t; // typedef unsigned __int64 uint64_t;
#endif //#endif
// fast filters: implements 3x3 and 5x5 sobel filters and // fast filters: implements 3x3 and 5x5 sobel filters and
// 5x5 blob and corner filters based on SSE2/3 instructions // 5x5 blob and corner filters based on SSE2/3 instructions
......
...@@ -26,18 +26,18 @@ Street, Fifth Floor, Boston, MA 02110-1301, USA ...@@ -26,18 +26,18 @@ Street, Fifth Floor, Boston, MA 02110-1301, USA
#include <pmmintrin.h> #include <pmmintrin.h>
// define fixed-width datatypes for Visual Studio projects // define fixed-width datatypes for Visual Studio projects
#ifndef _MSC_VER //#ifndef _MSC_VER
#include <stdint.h> #include <stdint.h>
#else //#else
typedef __int8 int8_t; // typedef __int8 int8_t;
typedef __int16 int16_t; // typedef __int16 int16_t;
typedef __int32 int32_t; // typedef __int32 int32_t;
typedef __int64 int64_t; // typedef __int64 int64_t;
typedef unsigned __int8 uint8_t; // typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t; // typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t; // typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t; // typedef unsigned __int64 uint64_t;
#endif //#endif
// fast filters: implements 3x3 and 5x5 sobel filters and // fast filters: implements 3x3 and 5x5 sobel filters and
// 5x5 blob and corner filters based on SSE2/3 instructions // 5x5 blob and corner filters based on SSE2/3 instructions
......
...@@ -31,14 +31,14 @@ Street, Fifth Floor, Boston, MA 02110-1301, USA ...@@ -31,14 +31,14 @@ Street, Fifth Floor, Boston, MA 02110-1301, USA
#ifndef _MSC_VER #ifndef _MSC_VER
#include <stdint.h> #include <stdint.h>
#else #else
typedef __int8 int8_t; // typedef __int8 int8_t;
typedef __int16 int16_t; // typedef __int16 int16_t;
typedef __int32 int32_t; // typedef __int32 int32_t;
typedef __int64 int64_t; // typedef __int64 int64_t;
typedef unsigned __int8 uint8_t; // typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t; // typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t; // typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t; // typedef unsigned __int64 uint64_t;
#endif #endif
#define endll endl << endl // double end line definition #define endll endl << endl // double end line definition
......
...@@ -26,6 +26,10 @@ ...@@ -26,6 +26,10 @@
#include "opencv2/highgui.hpp" #include "opencv2/highgui.hpp"
#include "opencv2/core/utility.hpp" #include "opencv2/core/utility.hpp"
#ifdef WIN32
#pragma comment(lib, "Rpcrt4.lib")
#endif
using ftl::Calibrate; using ftl::Calibrate;
using ftl::LocalSource; using ftl::LocalSource;
using ftl::Display; using ftl::Display;
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#ifdef WIN32 #ifdef WIN32
#pragma comment(lib, "Ws2_32.lib") #pragma comment(lib, "Ws2_32.lib")
#pragma comment(lib, "Rpcrt4.lib")
#endif #endif
using std::string; using std::string;
...@@ -78,7 +79,12 @@ int main(int argc, const char **argv) { ...@@ -78,7 +79,12 @@ int main(int argc, const char **argv) {
std::thread nthread(run); std::thread nthread(run);
while (!stop) { while (!stop) {
#ifndef WIN32
char *line = readline("> "); char *line = readline("> ");
#else
char line[300];
fgets(line, 299, stdin);
#endif
if (!line) break; if (!line) break;
handle_command(line); handle_command(line);
......
...@@ -32,7 +32,6 @@ add_dependencies(p2p_base_unit ftlnet) ...@@ -32,7 +32,6 @@ add_dependencies(p2p_base_unit ftlnet)
target_link_libraries(p2p_base_unit target_link_libraries(p2p_base_unit
ftlnet ftlnet
${URIPARSER_LIBRARIES} ${URIPARSER_LIBRARIES}
gflags
glog::glog glog::glog
${UUID_LIBRARIES}) ${UUID_LIBRARIES})
......
...@@ -11,6 +11,11 @@ ...@@ -11,6 +11,11 @@
typedef int ssize_t; typedef int ssize_t;
#endif #endif
#ifdef WIN32
#pragma comment(lib, "Ws2_32.lib")
#pragma comment(lib, "Rpcrt4.lib")
#endif
using ftl::net::Dispatcher; using ftl::net::Dispatcher;
using ftl::net::Protocol; using ftl::net::Protocol;
using ftl::net::Socket; using ftl::net::Socket;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment