Hi,
I'm new to the Necto Studio, currently using the version V2.0.0.
I have installed "Relay Click" & "TempHum 4 Click" in the Package Manager.
In my new created project, i add in #include "relay.h", #include "temphum4.h"
But after build it provide the following error,
error (C:\Users\gohic\Documents\MIKROE\Projects\test2\main.c,11): error: Can't open include file "relay.h" #include "relay.h"
error (C:\Users\gohic\Documents\MIKROE\Projects\test2\main.c,12): error: Can't open include file "temphum4.h" #include "temphum4.h" 2 errors in preprocessor.
ninja: build stopped: subcommand failed.
is there any step that i miss out?
Necto Studio V2.0.0 - How to add installed package library into my project?
Necto Studio V2.0.0 - How to add installed package library into my project?
- Attachments
-
- Capture2.PNG (10.34 KiB) Viewed 1677 times
-
- Capture1.PNG (15.03 KiB) Viewed 1677 times
Re: Necto Studio V2.0.0 - How to add installed package library into my project?
Hi,
Have you tried copying the header files to your new project ?
Regards,
Filip.
Have you tried copying the header files to your new project ?
Regards,
Filip.
-
- Posts: 96
- Joined: 09 Apr 2021 20:37
Re: Necto Studio V2.0.0 - How to add installed package library into my project?
Hi chyun3,
I think this is a known issue of Necto 2.0 with the packages. Would you please post your Cmake file. Typically the wrong include directory is set.
At least this was the case in my case.
I think this is a known issue of Necto 2.0 with the packages. Would you please post your Cmake file. Typically the wrong include directory is set.
At least this was the case in my case.
Kind regards
Frank
Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2
Frank
Fusion for STM32 v8, STM32F407ZG@168MHz, 4" TFT capacitive
mikromedia 3, PIC32MZ2048EFH100@200MHz, 3" TFT capacitive
NECTO Studio 3.0.0, mikroC AI for ARM/PIC32, mikroSDK v.2.7.2
- IvanJeremic
- mikroElektronika team
- Posts: 316
- Joined: 05 Sep 2022 14:32
Re: Necto Studio V2.0.0 - How to add installed package library into my project?
Hi,
To convert memake project to Cmake, you need to do the following :
1. Create CMakeLists.txt file and put it in the folder where your memake file is (you don't have to delete the memake file) - see the CMakeLists.txt file below for the Balancer 4 click board :
2. Open this file and replace each occurrence of the balancer4 string to click board you want to use (for example change the balancer4 to balancer2 for Balancer 2 click board).
3. After you done this, in the same folder make a subfolder (folder name should go something like lib_balancer4 if you are using the balancer 4 click).
4. Create a second CMakeLists.txt file and put it in this folder, it should look like this (again, change the click board name accordingly) :
5. Inside the lib_balancer4 folder make 2 sub folders, one named include (this is where you will place already existing header file) an one named src (this is where you will place existing source file).
6. When you do all this go to Open Project in NECTO Studio and choose the first CMakeLists.txt file you made.
Regards,
Ivan.
To convert memake project to Cmake, you need to do the following :
1. Create CMakeLists.txt file and put it in the folder where your memake file is (you don't have to delete the memake file) - see the CMakeLists.txt file below for the Balancer 4 click board :
Code: Select all
cmake_minimum_required(VERSION 3.21)
if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
project(example_balancer4 LANGUAGES MikroC)
else()
project(example_balancer4 LANGUAGES C ASM)
endif()
add_executable(example_balancer4
main.c
)
find_package(MikroC.Core REQUIRED)
target_link_libraries(example_balancer4 PUBLIC MikroC.Core)
find_package(MikroSDK.Board REQUIRED)
target_link_libraries(example_balancer4 PUBLIC MikroSDK.Board)
find_package(MikroSDK.Log REQUIRED)
target_link_libraries(example_balancer4 PUBLIC MikroSDK.Log)
add_subdirectory(lib_balancer4)
target_link_libraries(example_balancer4 PUBLIC Click.Balancer4)
3. After you done this, in the same folder make a subfolder (folder name should go something like lib_balancer4 if you are using the balancer 4 click).
4. Create a second CMakeLists.txt file and put it in this folder, it should look like this (again, change the click board name accordingly) :
Code: Select all
cmake_minimum_required(VERSION 3.21)
if (${TOOLCHAIN_LANGUAGE} MATCHES "MikroC")
project(lib_balancer4 LANGUAGES MikroC)
else()
project(lib_balancer4 LANGUAGES C ASM)
endif()
add_library(lib_balancer4 STATIC
src/balancer4.c
include/balancer4.h
)
add_library(Click.Balancer4 ALIAS lib_balancer4)
target_include_directories(lib_balancer4 PUBLIC
include
)
find_package(MikroC.Core REQUIRED)
target_link_libraries(lib_balancer4 PUBLIC MikroC.Core)
find_package(MikroSDK.Driver REQUIRED)
target_link_libraries(lib_balancer4 PUBLIC MikroSDK.Driver)
6. When you do all this go to Open Project in NECTO Studio and choose the first CMakeLists.txt file you made.
Regards,
Ivan.
-
- Posts: 4
- Joined: 30 Sep 2021 15:01
Re: Necto Studio V2.0.0 - How to add installed package library into my project?
Good morning.
I am in Argentina, the land of Leo Messi.
In this time of the World Cup I have time to try Necto Studio, which from what I read in this forum is very good. I use Windows 7. I have the problem that I can't download or install the software. I download Necto Studio-x64-online but when I run it it gives me a msg that it can't find the tree. In configuration I can select something from the proxy. I tried but I couldn't. I would like to try it so I can buy it.
If someone could help me. I sent filip a msg and he didn't reply.
Thank you
I am in Argentina, the land of Leo Messi.
In this time of the World Cup I have time to try Necto Studio, which from what I read in this forum is very good. I use Windows 7. I have the problem that I can't download or install the software. I download Necto Studio-x64-online but when I run it it gives me a msg that it can't find the tree. In configuration I can select something from the proxy. I tried but I couldn't. I would like to try it so I can buy it.
If someone could help me. I sent filip a msg and he didn't reply.
Thank you
- IvanJeremic
- mikroElektronika team
- Posts: 316
- Joined: 05 Sep 2022 14:32
Re: Necto Studio V2.0.0 - How to add installed package library into my project?
Hi,
For everyone having a similar issue as Cachin Gimenez, we are continuing this conversation on the forum in the link below:
viewtopic.php?f=237&t=79678&p=315906#p315906
Regards,
Ivan.
For everyone having a similar issue as Cachin Gimenez, we are continuing this conversation on the forum in the link below:
viewtopic.php?f=237&t=79678&p=315906#p315906
Regards,
Ivan.