I have the next problem, when i intent to generate the executable of my application, the system show me the next message :
undefined reference to `sum'
undefined reference to `rest'
undefined reference to `multi'
With the case of div, the application show me a false result.
I can create the package, also I can compile using Cmake, and the system don't show me errors but when i intent to generate my executable the system show me those messages, and I don't know why, so I show you my consumer files like CMakeLists and conanfile. I excpect that you can help me !!
CMakeLists. txt
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(Example C)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
SET(MyExample_SRC
"main.c")
add_executable(example ${MyExample_SRC})
target_link_libraries(example ${CONAN_LIBS})
conanfile.txt
[requires]
Exa/0.1@edwin/testing
[generators]
cmake
This the conanfile.py that I used to create my package:
from conans import ConanFile, CMake, tools
class ExaConan(ConanFile):
name = "Exa"
version = "0.1"
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
def source(self):
#self.run("CD C:/projects/connan-example/pkg")
pass
def build(self):
self.run("CD C:/projects/connan-example/pkg/ & Compile.bat")
#cmake = CMake(self)
#make.configure(source_folder="connan-example")
#cmake.build()
def package(self):
self.copy("MultiDiv.obj", dst="objects", keep_path=False)
self.copy("SumRest.c", dst="source", keep_path=False)
#self.copy("*.lib", dst="lib", keep_path=False)
def package_info(self):
#self.c_info.libs = ["example"]
pass
The Compile.bat is just to create the file .obj for MultDiv, and like the file shows, I'm packing MultiDiv and SumRest. When i compile and generate the executable with gcc commands, I can do it successfully