-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add general option and/or per library setting to save shared libs to the project #22
Comments
Bump for this feature. I need to compile from a local-to-project library instead of the normal shared library because of a naming conflict between two shared libraries. Being able to disable the use of shared libraries completely, and only compile from local-to-project libraries would be useful as well, for tighter source control. C| |
As a workaround you can copy the library to the lib folder (don't add it in VisualTeensy). Then start VisualTeensy and open the project. It will detect the manually copied library and add it to the relevant jsons. Save the project and you should be ready to go. |
I tried that but VT is detecting both libraries (local and shared) and I still get class redefinition errors on compile. Do I need to delete some files manually before running VT (or something)? C| |
Can you post the generated makefile? |
Sure, included below. Thanks for the quick assistance BTW! `#****************************************************************************** Generated by VisualTeensy V1.4.0 on 2/21/2022 at 1:52 PMBoard Teensy 4.1USB Type SerialCPU Speed 600 MHzOptimize FasterKeyboard Layout US Englishhttps://github.com/luni64/VisualTeensy#****************************************************************************** TARGET_NAME := MotorInterfaceBoard MCU := imxrt1062 LIBS_SHARED_BASE := C:\Users\Chris\Documents\Arduino\libraries LIBS_LOCAL_BASE := lib CORE_BASE := C:\PROGRA #****************************************************************************** Flags and Defines#****************************************************************************** FLAGS_CPU := -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 FLAGS_CPP := -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing LIBS := -larm_cortexM7lfsp_math -lm -lstdc++ DEFINES := -D__IMXRT1062__ -DTEENSYDUINO=156 -DARDUINO_TEENSY41 -DARDUINO=10813 CPP_FLAGS := #****************************************************************************** Colors#****************************************************************************** #****************************************************************************** Folders and Files#****************************************************************************** BIN := .vsteensy/build #****************************************************************************** BINARIES#****************************************************************************** #****************************************************************************** Source and Include Files#****************************************************************************** Recursively create list of source and object files in USR_SRC and CORE_SRCand corresponding subdirectories.The function rwildcard is taken from http://stackoverflow.com/a/12959694)rwildcard =$(wildcard $1$2) #User Sources ----------------------------------------------------------------- Core library sources --------------------------------------------------------CORE_CPP_FILES := User library sources (see https://github.com/arduino/arduino/wiki/arduino-ide-1.5:-library-specification)LIB_DIRS_SHARED := LIB_DIRS_LOCAL := LIB_CPP_SHARED := LIB_CPP_LOCAL := LIB_OBJ := Includes -------------------------------------------------------------INCLUDE := -I./$(USR_SRC) -I$(CORE_SRC) Generate directories --------------------------------------------------------DIRECTORIES := #$(info dirs: $(DIRECTORIES)) #****************************************************************************** Rules:#****************************************************************************** .PHONY: directories all rebuild upload uploadTy uploadCLI clean cleanUser cleanCore all: rebuild: cleanUser all clean: cleanUser cleanCore cleanLib upload: all uploadTy: all uploadCLI: all uploadJLink: all Core library ----------------------------------------------------------------
Shared Libraries ------------------------------------------------------------
Local Libraries -------------------------------------------------------------
Handle user sources ---------------------------------------------------------
Linking ---------------------------------------------------------------------
%.lst: %.elf %.sym: %.elf %.hex: %.elf Cleaning --------------------------------------------------------------------cleanUser: cleanCore: cleanLib: compiler generated dependency info -------------------------------------------include $(CORE_OBJ:.o=.d) |
So I did finally get it to work. I had to delete all the VT generated files and run it again with all the libraries copied to the local lib folder. If you don't delete the old files first it seems to get confused. Anyway I think I'm good for now, thanks! C| |
@WMXZ-EU
https://forum.pjrc.com/threads/57245-VisualTeensy-upgraded-to-support-Teensy-4-projects?p=232320&viewfull=1#post232320
That is already working for all but shared libraries.
The text was updated successfully, but these errors were encountered: