Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matplotplusplus build error #4669

Closed
TabNahida opened this issue Jul 16, 2024 · 2 comments
Closed

Matplotplusplus build error #4669

TabNahida opened this issue Jul 16, 2024 · 2 comments
Labels

Comments

@TabNahida
Copy link
Contributor

Xmake 版本

v2.9.3

操作系统版本和架构

Windows 11 23H2

描述问题

When i am building a test project with matplotplusplus, it fail with symbol error. When I add cxxflags="/utf-8", it pass but fail to run. Then I switch to debug mode and the matplotplusplus does not pass the build.

期待的结果

Successfully show the plot image

工程配置

add_languages("cxx23")
add_requires("matplotplusplus", {config = {cxxflags="/utf-8", debug=true}})

target("test")
    set_kind("binary")
    add_files("test.cpp")
    add_packages("matplotplusplus")
target_end()
#include <array>
#include <chrono>
#include <cmath>
#include <format>
#include <functional>
#include <iostream>
#include <matplot/matplot.h>
#include <print>

#define i64 long long

double dfn(double x, double y)
{
    return y;
}

int main()
{
    std::vector<i64> x_list(100);
    for (i64 i = 0; i < x_list.size(); i++)
    {
        x_list[i] = i;
    }
    std::vector<i64> y_list(100);
    y_list[0] = 0;
    for (i64 i = 1; i < y_list.size(); i++)
    {
        y_list[i] = dfn(x_list[i], y_list[i - 1]);
    }
    matplot::plot(x_list, y_list, "-o");
    matplot::hold(matplot::on);
    matplot::show();

    return 0;
}
xmake config -m debug
xmake run -d test

附加信息和错误日志

install.txt

@TabNahida TabNahida added the bug label Jul 16, 2024
@star-hengxing
Copy link
Contributor

Fixed eb5cd65, xmake repo -u

@star-hengxing
Copy link
Contributor

It should work now xmake-io/xmake#5353

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants