Skip to content

Undefined references linker error on nvc++ #220

@Tomcat-42

Description

@Tomcat-42

Environment

toml++ version and/or commit hash:
v3.4.0

Compiler:
nvc++ 23.11:

nvc++ 23.11-0 64-bit target on x86-64 Linux -tp tigerlake
NVIDIA Compilers and Tools
Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES.  All rights reserved.

C++ standard mode:
17, 20 and 23

Target arch:
x64

Library configuration overrides:
None.

Relevant compilation flags:
None.

Describe the bug

Every time I try to use the toml::parse_file function I get those undefined references errors:

/usr/bin/ld: build/.objs/simulator/linux/x86_64/release/src/simulator/util/toml.cpp.o: in function `toml::v3::impl::impl_ex::parser::parse_table_header()':                                                                                                                                 
/home/pablo/.xmake/packages/t/toml++/v3.4.0/305579b325f940cbb9bfa2d2a8effc4b/include/toml++/impl/parser.inl:3269:(.text+0x1872c): undefined reference to `toml::v3::node::is_table() const'                                                                                                 
/usr/bin/ld: /home/pablo/.xmake/packages/t/toml++/v3.4.0/305579b325f940cbb9bfa2d2a8effc4b/include/toml++/impl/parser.inl:3269:(.text+0x18738): undefined reference to `toml::v3::node::is_array_of_tables() const'              

Steps to reproduce (or a small repro code sample)

./example.toml

key = "val"

./main.cpp:

#include <iostream>

#include "toml.hpp"

int main() {
  toml::table t = toml::parse_file("example.toml");
  std::cout << t << std::endl;
}

./toml.hpp:
toml v3.4.0 header

Additional information

Perhaps is something related to #198?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions