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