From 6c0ebe83b163dfa552dca4b78673cdba08b555a5 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Thu, 29 Jun 2017 21:21:06 -0400 Subject: [PATCH] fix build errors --- osx_objective_c_to_cpp_links.h | 7 ++++--- platform_mac/mac_4ed.cpp | 2 -- platform_mac/mac_4ed.m | 10 +++++++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/osx_objective_c_to_cpp_links.h b/osx_objective_c_to_cpp_links.h index d16f441f..13132f5b 100644 --- a/osx_objective_c_to_cpp_links.h +++ b/osx_objective_c_to_cpp_links.h @@ -41,9 +41,6 @@ typedef struct OSX_Vars{ // In C++ layer. extern OSX_Vars osx; -void -osx_post_to_clipboard(char *str); - internal void* osx_allocate(umem size); @@ -65,6 +62,10 @@ osx_step(); internal void osx_init(); +// In Objective-C layer. +void +osx_post_to_clipboard(char *str); + #endif // BOTTOM diff --git a/platform_mac/mac_4ed.cpp b/platform_mac/mac_4ed.cpp index f6024212..601e3437 100644 --- a/platform_mac/mac_4ed.cpp +++ b/platform_mac/mac_4ed.cpp @@ -12,8 +12,6 @@ #include "4tech_defines.h" #include "4coder_API/version.h" -#define WINDOW_TITLE "4coder" VERSION - #include "osx_objective_c_to_cpp_links.h" OSX_Vars osx; diff --git a/platform_mac/mac_4ed.m b/platform_mac/mac_4ed.m index dbad608f..924afc64 100644 --- a/platform_mac/mac_4ed.m +++ b/platform_mac/mac_4ed.m @@ -10,18 +10,22 @@ // TOP #include "4tech_defines.h" -#include "osx_objective_c_to_cpp_links.h" +#include "4coder_API/version.h" + +#define WINDOW_NAME "4coder" VERSION #undef internal #undef global +#include "osx_objective_c_to_cpp_links.h" + #import #import #import #import #import -static void +void osx_post_to_clipboard(char *str){ NSPasteboard *board = [NSPasteboard generalPasteboard]; NSString *utf8_type = @"public.utf8-plain-text"; @@ -299,7 +303,7 @@ main(int argc, char **argv){ [[window contentView] addSubview:view]; [window setMinSize:NSMakeSize(100, 100)]; - [window setTitle:@WINDOW_TITLE]; + [window setTitle:@WINDOW_NAME]; [window makeKeyAndOrderFront:nil]; [NSApp run];