Looking for hxcpp to create static lib and included files link into visual studio sln?
is there any tutorial about that? thanks.
Looking for hxcpp to create static lib and included files link into visual studio sln?
is there any tutorial about that? thanks.
#include <iostream>
#include <hxcpp.h>
//include main.h
#include "Test.h"
#include "Main.h"
int main()
{
Main_obj::main();
}
how to fixed this error
Haxe-C-Bridge might help
Checkout the sample in test/unit/. In that case haxe code is compiled to a dll and used by a separate C program. A static lib could work too
oh,I fixed by myself
#include <cstdio>
#include "hxcpp.h"
#include "HxcppConfig-19.h"
#include "fmt/core.h"
#include "Empty.h"
extern "C" {
extern void hxcpp_set_top_of_stack();
extern const char* hxRunLibrary();
int run_haxe()
{
printf("fuck %s\n", "call from haxe");
hxcpp_set_top_of_stack();
const char* err = hxRunLibrary();
if (err)
{
printf("Error %s\n", err);
return -1;
}
return 0;
} //run_haxe
}
int main(void) {
// start the haxe thread
fmt::print("Hello, World!\n");
run_haxe();
fmt::print("Hello, World!\n");
Empty_obj::doTest();
return 0;
}
and build.hxml
-cp src
-main Empty
--cpp bin/cpp
-D static_link
-D HXCPP_M64
© 2018-2020 Haxe Foundation - Powered by Discourse